0% completed
Memory estimates: Calculation -
Sachin Puranik
Feb 7, 2024
The calculation in documentation is based on how many users read in 24 hours. Shouldn't it be based on how many users actually create the new URL's instead. Do I have some different understanding?
Instead of -
20K * 3600 seconds * 24 hours = ~1.7 billion
0.2 * 1.7 billion * 500 bytes = ~170GB
should it be -
~200 * 3600 seconds * 24 hours = 17.28 Million
0.2 * 17.28 * 500bytes = Approx 1.7 GB.
Ultimately - we have only 17.28 new URL created in 24 hours.
1
0
Comments
Reno 2 years ago
This is for the cache which will be serving read traffic. The most popular URLs today could be the URLs created last week - we wouldn't gain anything from caching today's written data in that case, but would see performance improvement from caching today's read traffic.
Robert Chena year ago
Hi @Sachin Puranik, I have the same thought too. It seems to me that memory calculation should be "write request (QPS)" times "Cache-Expiration-Time (TTL)" since the cached data are from written/created data. Let's say the cached data can stay in cache 10 days only, the...
On this page
- Why do we need URL shortening?
Try it yourself
Designing URL Shortener (video)
- Requirements and Goals of the System
- Capacity Estimation and Constraints
- System Interface Definition
- Create Short URL API
- Redirect API
- Analytics API
- URL Management API
- Delete Short URL API
- Database Design
- Basic System Design and Algorithm
a. Encoding actual URL
b. Generating keys offline
- Data Partitioning and Replication
- Cache
- Load Balancer (LB)
- Purging or DB cleanup
- Telemetry
- Security and Permissions