Q. How does a NLB Node know that a client session has been retained by an application or Application maintain the client connections?
A. For Affinity: If affinity is selected as “Single”, NLB randomly picks up the hosts to maintain the same connection. For example:
one client sends the TCP packet on port 20 to 21. It works like this:
1. Checks the Affinity Table – it checks if the client IP address is listed in this list or not.
if it is listed in the table then checks the Host Name who served the traffic last time and then forward the request to that host each time the
same client sends the request.
2. If client IP is not mentioned in the Affinity Table then it randomly picks up a host from the Host Table. NLB append this in the Affinity Table
and continue to serve the client.