Loading...
Use client-side browser caching as much as possible by returning a 301 Moved Permanently along with the appropriate Cache control headers so that for a given client, there is no further complete GET request on our side.
It's a low-write, heavy-read situation so we can use a SQL database to store the mapping between short and long URL acting as a source of truth.
We have two services:
We're always sending the same response so we could put a CDN in front
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.