zlacker

[parent] [thread] 1 comments
1. noitpm+(OP)[view] [source] 2023-06-01 01:32:45
This wouldn't really be an issue for there to still be a massive advantage to even a simple caching layer.

Imagine one has 10 request for thread {X} every second (probably a massive under estimation of the actual traffic). If you cache that single thread with a lifetime of a second you have instantly cut out 90% of your API usage for that thread.

Obviously the final benefit depends on what the actual distribution of {users} per {threads} per {time} -- but if your goal is to shave redundant API requests than it definitely makes sense, especially if the alternative is untenable in terms of cost.

replies(1): >>gsk22+pa
2. gsk22+pa[view] [source] 2023-06-01 03:35:15
>>noitpm+(OP)
My point is that for caching to be cost-effective, it requires long lifetimes -- especially if your # of users is relatively low.

Especially for an app like Reddit with millions of subreddits. There is no monolithic "reddit"; the experience is tailored to each user based on the subs they've joined. So your % of requests that will be asking for a cached resource is lower than other high-volume websites. I think your 99-to-1 estimate is _way_ off.

[go to top]