zlacker

[parent] [thread] 2 comments
1. gsk22+(OP)[view] [source] 2023-06-01 00:59:48
Would you use a client where the most popular threads are constantly out of date due to caching? I certainly wouldn't.
replies(1): >>noitpm+n3
2. noitpm+n3[view] [source] 2023-06-01 01:32:45
>>gsk22+(OP)
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+Md
◧◩
3. gsk22+Md[view] [source] [discussion] 2023-06-01 03:35:15
>>noitpm+n3
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]