r/DistributedComputing • • Oct 20 '21

Request and response going through the load balancer creates bottleneck

I have multiple machines on my backend, all are connected to my load balancer running HAProxy. I just learnt that the response also goes through the load balancer, instead of one of server directly sending it to the client.

But will it not create a bottleneck in case of huge traffic and overload my load balancer itself.

  1. Is there any way to directly send response from server to client.
  2. Also when response goes through load balancer, does my source file also sits there temporarily to be sent to the client.
  3. Can't we use load balancer only to send request to my servers and response to directly go from server to client.
  4. My main goal to make my system distributed was to distribute traffic among my servers, now since load balancer is handling both request and response am I not back to where I started?
2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/sheepdog69 Oct 20 '21

Edit:

Your suggestion - to send responses directly to the client - is possible. But it adds a lot more complexity, and doesn't gain you anything until you get to a pretty large scale (many hundreds of thousands of responses per second), or you have to eek out every last millisecond of response time. I wouldn't even consider it if you aren't in one of those situations. (and if you are, you probably have the expertise to handle the situation anyway)