A HIT ends at Nginx. A MISS continues to the Catalog Service and PostgreSQL.
Latest cache resultWAITING
Execute the first request to begin.
Client requests0
Proxy requests0
Catalog requests0
Backend calls avoided0
1
Start the lessonThe trace will show whether Nginx forwards or answers the request.
What this teaches
Add a reverse proxy in front of the service.
The next logical and meaningful improvement is to add a reverse proxy.
A reverse proxy is a server that sits in front of your application server. Clients send requests to the reverse proxy, and it forwards those requests to the appropriate backend server.
It can take over several request-related responsibilities:
SSL/TLS terminationThe proxy completes the HTTPS handshake and forwards a plain internal request to the application.
Encryption and decryptionThe proxy converts data between readable form and its protected network representation.
Compression and decompressionThe proxy can reduce response size before transfer and expand incoming compressed data.
A reverse proxy can also cache selected responses. If the same request arrives again, it can return the cached response without reaching the application server.
Origin shielding is another advantage: clients see only the reverse proxy address while the original application-server URL remains hidden. Blocking direct backend access reduces its public exposure and improves security.
This reduces backend load and lets the application server focus more on business logic.
What this gives us
One client-facing address
Application-server address remains hidden
Reduced public exposure: when direct backend access is blocked by network rules, clients can reach only the Reverse Proxy
Infrastructure work can move away from the application
Cacheable responses avoid backend work
Lower application-server load
What still remains
Only one Catalog Service instance
No load distribution
The Reverse Proxy may become a Single Point of Failure (SPOF)
The next design pressure
How do we scale the application server?
The proxy gives us one entry point, but every cache miss still reaches the same Catalog Service instance.