r/DistributedComputing • u/cgeekgbda • 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.
- Is there any way to directly send response from server to client.
- Also when response goes through load balancer, does my source file also sits there temporarily to be sent to the client.
- Can't we use load balancer only to send request to my servers and response to directly go from server to client.
- 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
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)