Back to course home
0% completed
Vote For New Content
In section 9: - Let’s suppose we need a rate limiting of 500 requests per hour ....
Prabhakar
Mar 21, 2022
In section 9:
- Let’s suppose we need a rate limiting of 500 requests per hour ... followed by the calculation 8 + (4 + 20 (sorted set overhead)) * 500 + 20 (hash-table overhead) = 12KB
Can you please elaborate (4+20)*500? Why is 500 multiplied by the 'Sorted set (4+20)'?
0
0
Comments
Comments
Design Gurus4 years ago
500 represents the number of requests. For each request, how much data will we be storing in memory?
For each request we need to add an epoch time to the sorted set. Hence 4 bytes for epoch and 20 bytes sorted set overhead.