Loading...
POST /api/v1/compress_url
GET /api/v1/decompress_url
a client sends an api request to compress a url and receive decompressed url, that request reaches urls service, there it is compressed and encoded then saved into the DB, the short url is returned.
returns success upon successful compression.
for the decompression request the client sends an api request containing the short url, if this is cached returned cached long url.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.