Reputation: 101
We are looking into scaling our servers and I am not sure where load will fall as visitor count increases.
I have one HAProxy load balancer, that proxies to two Varnish Nginx static content servers. As our load increases, which server(s) will take the largest hit in terms of resource impact? They are all Digital Ocean droplets so I can scale them up as needed. Would the load be highest on the HAProxy server, or the Varnish servers?
I appreciate any input.
Upvotes: 0
Views: 669
Reputation: 16666
In my experience with static content servers, the highest load will be on Nginx. This of course depends on your Varnish VCL setup, as a poorly configured VCL will put increased load on Varnish. However, you shouldn't see load issues on HAProxy for a while.
A well tuned setup with Varnish and Nginx should allow you to server 8000-12000 requests/sec on each box, with a fairly reasonably sized box.
The best solution is to of course have monitoring. I recommend setting up munin. It gives you a bunch of graphs and has plugins for nginx, varnish and haproxy. You should monitor each server's CPU and RAM utilization, fork rate, etc. This will give you insight into bottlenecks.
Upvotes: 1