Use Load Balancers for distributing traffic
A set of servers providing same service is registered to the load balancer(s), so that the load balancer(s) know where to redirect incoming traffic
Any external request for the service behind the load balancer(s) will use the "virtual" IP as the destination
There are two ways of returning traffic from servers:
- the servers return the packets to the load balancer(s), and the load balancer(s) return to the source. This method hides the IPs of servers. However, the load balancer(s) need to hold states of traffic, which make it more expensive and harder for expansion
- the servers return the packets to the source directly, exposing their IPs to the outside, which introduces security issues. Hence it's rare in practice.