0
votes

I am new to the caching world, keeping scaling in mind

should I install Varnish on a separate EC2 instance, so its a varnish only instance, and then have the EC2 instances that have my CMS (Drupal) read from it?

OR

Should I install Varnish in the same instance where my CMS is located, so when I replicated the instance, to scale horizontally, I will have a Varnish for each my CMS EC2 instances?

1

1 Answers

2
votes

This is an architecture decision. There is not right/wrong answer that applies to all cases.

If you are going to have a dedicated instance for Varnish, you'll need two of them to avoid having a single point of failure. From a cost perspective it would be cheaper to install a Varnish instance on each of your Drupal instances.

Personally I favour the latter option, as long as you can handle cache invalidation across multiple Varnish servers.