https://www.youtube.com/watch?v=Cg3XIqs_-4c

Problem Statement: Given a long URL, we have to create a short URL. Given a short URL, we have to redirect the user to the long URL. Has to be low latency and have high availability.

Areas to cover:

API Design

Questions to ask:

Design:

Simple - User → Load Balancer → Web Servers → DB

First thing to try: Add a cache to the web servers

Next thing to try: Scale up web servers and cache cluster

Next: Eliminate cache, replace with zookeeper