-1

Assuming the simple scenario of an Intranet with lot of users, there will be a DNS Server which translates IP address for the end user system. Now you also have a yourapp.intranet that is deployed over Apache for load balancing.

How will the load balancing work if each client maitains a dns cache like Windows does? The first request will get a "load-balanced" response but the next request onwards its going to go directly bypassing the Apache? Also would Apapche be able to track all these requests if the users directly hit the Node since it already knows the IP?

C1-----*-----S1
       |
      DNS
       |
C2-----*-----S1

Or is it like DNS only knows the IP of the Apache server, and the load balancing is at the level of Apache? So as far as the DNS is concerned it doesn't know the nodes at all. Which also means it kind of NATing that happens internally?

C1----*      S1
      |      |
     DNS-----*
      |      |
C2----*      S2
Nishant
  • 265
  • 3
  • 5
  • 11
  • It's the latter. – MadHatter Feb 17 '16 at 12:57
  • Why is this a bad question?! – Nishant Feb 17 '16 at 12:57
  • To me, it's a request for someone else to do your research for you (though of course others may disagree with me). All of this is pretty well-documented elsewhere. – MadHatter Feb 17 '16 at 12:58
  • Thanks. I probably read the wrong sources. It seemed like most document assumed readers knew this already. Epsecially the fact that there is some kind of NATing involved seemed not so obvious to me. Ofcourse probably it can be done without NATing but this one seems to indicate that there is a scope NATing if its a Server Cluster. – Nishant Feb 17 '16 at 13:00
  • It is done without NATting - or at least the NATting is incidental to LB service. The LB acts as a proxy, so all the requests seen on the service nodes come from the LB's address, thus ensuring that responses go to them for return to the client. – MadHatter Feb 17 '16 at 13:09

1 Answers1

1

It seems like you're asking about two different things. You can use DNS as a sort of load balancer by leveraging the round-robin nature of name resolution. But this leaves much to be desired.

The primary method of load balancing involves an actual load balancer whose singular IP address is resolved via DNS. So your clients don't know about the IPs of the backend servers.

Mark Caudill
  • 111
  • 6