4 ms·
Question for the Github people: Why not keep serving non-stale cached data while your databases are down? You can do this with proxies or by modifying your cod
by peterwwillis 14y ago
Question for the Github people: Why not keep serving non-stale cached data while your databases are down?
You can do this with proxies or by modifying your code to always serve out of cache, and the db updates the cache, so if the db is down, the cache is your temporary failover while you fail over to the secondary db. ('cache' is anything memcached-like that's separate from your db)
- jeremymcanally 14y agoWe do in a lot of cases. We just don't have every detail in the whole app cached. :)
- peterwwillis 14y agoFor the stuff you haven't got serving out of cache yet, might I recommend putting a proxy on the frontend layer? It can reverse proxy almost all of your stuff, and cache/proxy the remaining content which isn't dynamic (or even dynamic stuff, given the right voodoo). Cheap and codeless.
- benatkin 14y agoYou don't have some things cached that should be obvious to cache, like the HTML for the most popular repos. Loading the commit messages from JSON for a page that's being accessed tens of thousands of time a day is less than ideal. It isn't just github, it seems like a lot of web apps don't use the lessons learned for web sites.
- peterwwillis 14y agoI think there's a culture with modern developers that says using older, less sexy technology isn't going to work as well as newer, sexier technology. "Cache HTML?! That's so inefficient!" Yeah, it also just works, too. When all your databases, content engines, storage services, deployment tools, etc all take a crap, your clunky little web proxy cache keeps right on humming and your customers get at least a half-functioning site, if they notice at all.