r/programming • u/nickcraver • Feb 17 '16
Stack Overflow: The Architecture - 2016 Edition
http://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/
1.7k
Upvotes
r/programming • u/nickcraver • Feb 17 '16
View all comments
Show parent comment
1
u/coworker Feb 18 '16
Taking the most popular post of all time, there is literally no data on that page that could not be hours or even days stale. The core content (question and comments) will probably never change again, or if it does, very infrequently. It is effectively static. The vast majority of your content is like this. Even data that gets updated "frequently", like user points, still never really needs to be real-time. Shit after 3 years, even relative dates probably only need to be re-computed once a day.
In terms of caching, it could make a lot of sense to have javascript pull this core "static" content from an api fronted by your CDN. You would then get easy speedups from geo-locality as well as multi-threaded rendering via modern browser pipelining. Obviously, there's a lot of caveats and requirements I am ignorant of so really I was just trying to justify some of the thought process of my original comment. You have said you use an internal redis cache but it doesn't sound like any of the intermediate content is cached which seems odd since I can't imagine any users actually caring about it being stale.