Home > Software design >  Does load balancer handle request from server to another server?
Does load balancer handle request from server to another server?

Time:02-22

As far as I know, the load balancer usually handles requests from client to server and then returns the response back to the client. In this case, both request and response will pass through the load balancer.

But, what if the server makes a request to another server? Will that request also pass through the load balancer then reaching to the destinated server or it will directly be sent from the server to the public internet and then to the server? I'm confused about this part.

CodePudding user response:

If the server behind your load balancer makes a call to another server, the request will NOT go through the load balancer.

If the 'target' server is running on the public internet (e.g. www.google.com), and your own server is running in a private subnet, the traffic will from from your own server to a NAT gateway. The NAT gateway passes traffic to the internet gateway, and then your call goes over the public internet to the target server. Responses from the target server travel over the same path in reverse.

I can highly recommend spending some time in getting a better understanding of basic networking concepts. To start, this is a nice blogpost about some fundamental concepts that is not overly theoretical: https://medium.com/codenation-engineering/fundamentals-of-networking-in-aws-3ad3d0dc01dd.

  • Related