I estimate about 200 URL creations per second and about 20,000 URL accesses per second
Since read capacity is quite high, we're going to want to go with a NoSQL database, something like DynamoDB or MongoDB. The key-value pair model will work well for our data since the key would be the shortened URL and the value would be the long form URL that we are redirecting to.
flowchart TD
B["User"];
C{"API Gateway"};
D["Lambda Function"]
E["DynamoDB"];
B --> C;
C --> D;
D --> E;
E --> D;
D --> C;
C --> B;
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?