System requirements


Functional:

User authentication

Search tweets

Tweet

Notifications

Timeline

Like/favorites

Follow users


Non-Functional:

Scalable - design the system to handle a large number of potential users by utilizing cloud provider such as AWS


Reliability

Performance


Capacity estimation

On average each user tweet, 10 times a day. With each tweet being around 200 characters and each character costing 4 bytes. So each user uses 8000 bytes a day. Which means 1 million users uses 8 terabytes per day.


Efficient data storage. Data partition, caching would be needed in our design.



API design

/create Tweet

/Get tweets

/Get timeline

/Like

/Favorite

/Login

/Signup

/Logout

/Comment




Database design

Tweet

User

Comment





High-level design

You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design...







Request flows

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...






Detailed component design

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...






Trade offs/Tech choices

Explain any trade offs you have made and why you made certain tech choices...






Failure scenarios/bottlenecks

Try to discuss as many failure scenarios/bottlenecks as possible.






Future improvements

What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?