To cache 20% of these requests, we will need 170GB of memory.0.2 * 1.7 billion * 500 bytes = ~170GB Since we have 19K requests per second, we will be getting 1.7 billion requests per day:19K * 3600 seconds * 24 hours = ~1.7 billion Memory estimates: If we want to cache some of the hot URLs that are frequently accessed, how much memory will we need to store them? If we follow the 80-20 rule, meaning 20% of URLs generate 80% of traffic, we would like to cache these 20% hot URLs. We will need 15TB of total storage:30 billion * 500 bytes = 15 TBSAVERESETīandwidth estimates: For write requests, since we expect 200 new URLs every second, total incoming data for our service will be 100KB per second:200 * 500 bytes = 100 KB/sįor read requests, since every second we expect ~19K URLs redirections, total outgoing data for our service would be 9MB per second.19K * 500 bytes = ~9 MB/s Let’s assume that each stored object will be approximately 500 bytes (just a ballpark estimate–we will dig into it later). Since we expect to have 500M new URLs every month, the total number of objects we expect to store will be 30 billion:500 million * 5 years * 12 months = 30 billion Storage estimates: Let’s assume we store every URL shortening request (and associated shortened link) for 5 years. URLs redirections per second, considering 100:1 read/write ratio:50 billion / (30 days * 24 hours * 3600 sec) = ~19K/s New URLs shortenings per second:500 million / (30 days * 24 hours * 3600 seconds) = ~200 URLs/s What would be Queries Per Second (QPS) for our system? Traffic estimates: If we assume we will have 500M new URL shortenings per month, we can expect (100 * 500M => 50B) redirections during that same period. Let’s assume 100:1 ratio between read and write. There will be lots of redirection requests compared to new URL shortenings. Our service should also be accessible through REST APIs by other services.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |