User Management:
Advertisement Management:
Search Functionality:
Messaging System:
Here's the calculation for storage requirements based on the provided assumptions:
Monthly Data
Monthly Storage
Total Monthly Storage
Total storage = User data storage + Advertisement data storage + Media Storage
Total monthly storage = 1 GB + 1 GB
Yearly Storage Requirements (in Gigabytes)
Total Yearly Storage = Total monthly storage * Months in a year
Total Yearly Storage = 2 GB * 12
Total Yearly Storage = 24 GB
Therefore, based on the assumptions, the estimated storage requirement for the system would be around 24 GB per year.
Here's a breakdown of essential APIs for our Craigslist-like platform, categorized by functionality:
1. User Data:
2. Advertisements, Messages:
Best Partitioning Strategy: Sharding by User ID
Consider Regional Partitioning: Yes, for advertisements
Best Sharding Strategy: User ID sharding for user and advertisement data
Here's a breakdown of the essential components and services required to build your Craigslist-like platform:
1. Frontend Client:
2. API Gateway:
3. User Service:
4. Advertisement Service:
5. Search Service:
6. Messaging Service:
7. Database Layer:
8. Security Layer:
9. Administration Panel (Optional):
10. Notification Service:
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
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?