We all know Nginx (used for reverse proxy) 

But what happens under the hood ?

=> Reverse Proxy : 

It sits between clients and servers handling incoming
requests and forwarding them to the appropriate
backend server.

=> Nginx handles requests : 

Client sends a request: GET /api/users
Nginx receives the request on a specific port ( e.g., 
80 for HTTP, 443 for HTTPS)
Nginx checks its configuration to decide: 
 - where to forward the request
 - which server to route to

=> Real life analogy:

Think of a reverse proxy as a receptionist :
Clients (visitors) make requests.
The receptionist (proxy) routes them to the right person
(backend server).

=> Load balancing:
If multiple servers are configured Nginx can act as a
load balancer using algorithms like:

- Round Robin (default)
- Least Connections
- IP Hash