1

When using varnish as a load balancing server, does all data flow through the single varnish load balancer thus bottlenecked by upload speed on well optimized websites serving thousands concurrent visitors?

Bram z
  • 113
  • 5
  • Specific tech aside, any load balancer will create an ingress bottleneck at a minimum. If your concern is return traffic and if you do not need to inspect the return traffic in your load balancer to make decisions, then you could investigate DSR (direct server return). Very few orgs implement DSR, as it is non trivial to shim into existing environments. – Aaron Feb 23 '17 at 23:30

1 Answers1

0

does all data flow through the single varnish load balancer

In short, yes.

Think things though - the client establishes a TCP connection with your load balancer's IP. How would it receive replies for its HTTP requests except if they came back through that same connection? For obvious reasons, the backend servers cannot proactively generate their own TCP connections back to the client.

on well optimized websites serving thousands concurrent visitors?

I'm not sure what that has to do with anything - varnish behaves the same regardless of number of visitors or relative optimization level of the site.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • Well if you have a website that is 1MB big and your Varnish balancing server can only upload 50MB per second. Wouldn't it only be able to serve 50 visitors per second? – Bram z Feb 23 '17 at 19:41
  • Roughly, yes. Minus protocol overhead. – EEAA Feb 23 '17 at 19:42
  • It sounds like having a varnish load balancing server is pretty useless then. What's the usual way of serving 10k+ visitors concurrently? – Bram z Feb 23 '17 at 19:46
  • 1
    Well, you build an infrastructure that doesn't have minuscule bandwidth limits placed on it. – EEAA Feb 23 '17 at 19:46
  • plus if you serve a very large website you certainly make use of cdn like akamai. you can also have multiple varnish servers load balanced via an external LB as HAProxy – Benjamin Baumann Feb 26 '17 at 07:25