Loading...
POST api/v1/shorten
request param : longUrl
return shortURL
GET api/v1/{shortUrl}
return longURL
post flow:
client send a long url to be converted to a short url
request reaches load balancer
load balancer redirects to proper server
server looks if long url is converted and stored in db already
if yes, it is cached and returned
else it is send to shortener service
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
shortener service:
it takes in the long url and use base 62 representation to convert into short url