with 80% of them visiting the website in peak 4 hours of the day . Each user doing 10 searches on average . This works to be about (( 800000 / (3600*4)) * 10) 550 tps of peak traffic.
Estimate the scale of the system you are going to design...
GET /suggestions?prefix=
Response:
200 OK
[
{
"display_text":"chiicken soup",
"url":""
"title":"",
"category":""
"tags":[ "t1", "t2" ...]
}
]
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
graph
B["Ingress Proxy\nPrefix based Request Partitioner"];
C["Search Service Cluster\n (for a prefix range)"];
F["Prefix Range Master"];
G["Resource Manager"];
H[" Load Balancer"];
C1["Search Service \n Cluster Coordinator"];
n1[("catalog store \n Lexicographically partititoned")];
C --> B;
n1 --> C;
F --> C;
C1 --> C;
F --> G;
H --> B;
B --> H;
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...