Designs from past workshops
URL Shortener
This problem is popular among all system design courses. Sadly, almost all existing solutions will fail a staff level interview. Common red flags: Choose KV storage over relational DB because we don’t need complex schema; Use a global ID generator to avoid hashing conflict, etc.
My design is here. Compare and make your judgement.
Design a quota service that determines keeps track of users’ quotas and determines if a new uploading request should be served. This quota service is used by a uploading feature or product like Google Drive, Dropbox, and S3.
The hardest part is recovering quota from failed uploading, especially when the failure is caused by crash of the uploading server. One intuitive solution is to periodically heartbeat each ongoing uploading request to detect such failures. We will provide a much cleaner and graceful solution. Another hard failure case is when the uploading is finished but we failed to update quota usage on DB.
My design is here.
Webhooks
The hard questions are how to ensure eventual event processing once the system received an event trigger; how to scale event processing capacity.
My design is here.
Distributed Job Scheduler
Many engineers feel daunted by this seemingly vague problem. As part of our problem solving formula, we disambiguate by translate to a vague description into a clearly defined user flow; then we identify the hard questions: how to sleep sufficiently to save CPU cycles without missing any existing schedules; how to gracefully respond to new job registration during sleep.
My design is here.
Taxi Haling App Like Uber
This is a hard problem and almost every existing solution on the Internet are unacceptable. While our design meet the bar, it’s overwhelming for inexperienced engineers. So only read it if you have the appetite.
Hard questions include: How to retry so that each ride request is eventually served facing all internal and external uncertainties? How to make sure one ride is served by only one driver? How to achieve all consistency and speed while scaling to Uber’s traffic level?
My design is here.