In this architecture, the primary proxy server is configured with Nginx + Varnish 3.0. For DNS management, Amazon Route 53 is used. The domain must point to the primary proxy server.
In Varnish configuration, backend servers are specified and the load balancer is configured in round-robin using varnish director. So the request will serve as round-robin manner, The CPU usage is balanced.
All the static contents are cached on the varnish server and Grace Mode is enabled for 6 hours which reduce the CPU overhead.
We have two backend servers to serve website contents. The database server is set up on Amazon RDS with Multi-AZ replication. The Multi-AZ setup acts as failover – new DB instance will immediately act as the primary, if the primary RDS instance fails or crash.