Load balancing aims to optimize resource use, maximize throughput, minimize response time, and avoid overload.
A listener checks for connection requests from clients, using the protocol and port that you configure, and forwards requests to one or more target groups, based on the rules that you define. Each rule specifies a target group, condition, and priority. When the condition is met, the traffic is forwarded to the target group
So, there so many load balancing software we have like redcentrix Netsaler, Fortinet, AWS load balancers like Application load balancer,
Network Loadbalancer and classic load balancer.
All the load balancing software checks for connection requests from clients, using the protocol and port that you configure, and forwards requests to one or more registered instances using the protocol and port number that you configure.
You can configure health checks, which are used to monitor the health of the registered instances so that the load balancer only sends requests to the healthy instances
So, there is option called persistance which decides the request processing whether it goes to same server or different server. so, basically it has cookieinsert,sourceip,destination ip...etc methods with round robin approach.
you have to configure this with common landing page in both servers so that your web servers will be enabled to operate load balancing.