-1

We are looking into scaling our servers and I am not sure where load will fall as visitor count increases.

I have one HAProzy 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?

Nilnoc
  • 3
  • 2

2 Answers2

0

As the traffic increases, it will be split across your application servers by the Haproxy and of course, the application servers which process the requests will be mostly affected.

Ajo Augustine
  • 1,252
  • 4
  • 16
  • 21
0

You really should have this setup differently. If you are going to have 2 of the 3 services running on the same server, it should be HAProxy and Varnish, with requests that cant be immediately returned from varnishes cache, then sent over to NGINX. You don't want the cache servers also doing the processing, you semi defeat the purpose. Also doing it this way allows you to create smaller instances because it's an in memory cache, so you don't need alot of other resources. While cache misses get sent back to a larger server that processes code regularly and responds to just those requests. The way you have it setup you have to scale based on volume of requests in the same way that you would without varnish, and using php cache or apc.

Having stated that, your Varnish/NGINX servers will have the highest load, as it's serving cache and processing all the web requests. HAProxy is just doing a hand off, not doing any processing or serving of content.

kalikid021
  • 377
  • 2
  • 3
  • I can certainly change how it is configured. It was my understanding that varnish made minimal difference in this case, because all of our HTML is static. I believed that varnish would not serve any purpose on a static site. Please correct me if I'm wrong. – Nilnoc Apr 11 '14 at 22:15
  • Varnish will cache the static content, and serve that from cache. – kalikid021 Apr 11 '14 at 23:05
  • Okay great. I will modify the configuration. I assume that the higher load would then fall on the Varnish servers with HAProxy? – Nilnoc Apr 12 '14 at 01:12