Opinions on this structure

Let's say I currently have 2 websites that each get 5-10 million pageviews per month. More websites will be coming online in the future, and will eventually generate similar numbers. These sites are blogs on a PHP/MySQL platform. Content is updated once daily, and there are no public user logins or anything like that (just the admin). Basically, they are ideal for caching with long (relatively) expiration.

So here's what I'm thinking - the actual sites will be hosted on a single Linode running Debian/Apache/MySQL/PHP with an Apache virtual host for each site. Pretty simple/typical. On another Linode, I have Varnish. This is a larger Linode that only runs Varnish (on Debian) and is tuned to be optimized for this purpose. The caching server obviously points to the LAMP server that houses the sites. As mentioned earlier, expiration times are set long (several hours) so that actual hits to the LAMP server should be few and the Varnish server should take the brunt of the load. As traffic grows, I can scale the Varnish server or even add additional dedicated Varnish servers.

Does anyone see a problem with a structure like this or have any additional ideas/input that may work better?

2 Replies

What happens when the Varnish Linode goes down, or you need to take it down for maintenance?

What happens when the webserver Linode goes down, or you need to take it down for maintenance?

  • Les

@akerl:

What happens when the Varnish Linode goes down, or you need to take it down for maintenance?

What happens when the webserver Linode goes down, or you need to take it down for maintenance?

  • Les

When the webserver Linode goes down for maintenance, the Varnish grace period should serve as a backup and continue serving pages even if the server isn't responding. In the case that the Varnish server needs to be taken down, I would probably spin another one up to take it's place. I suppose the best solution would be to have 2 synced web servers and 2 or more Varnish servers with a loadbalancer distributing the load between them. That way everything is redundant and any one part being down wouldn't affect availability.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct