3 ms·
The varnish caching lifecycle [1] has some great additional features. Coallate and hold multiple requests, refresh the cache while immediately serving cached co
by 8organicbits 3y ago
The varnish caching lifecycle [1] has some great additional features. Coallate and hold multiple requests, refresh the cache while immediately serving cached content to the requester, serve stale items when the backend is down.
[1] https://docs.varnish-software.com/tutorials/object-lifetime/ https://docs.varnish-software.com/tutorials/object-lifetime/
- kstrauser 3y agoI’ve loved Varnish so much when I’ve used it. I worked for a gaming company where players competed to guess the next play in a live sports game. The simplest and most resilient architecture is to have those client apps run a GET every 5 seconds to see if there’s a new opportunity to guess. Easy, but now scale that up to the Super Bowl or World Cup. We were looking at a ferocious front-end web server horizontal scaling bill until we plopped Varnish in front of it, made sure the backend was setting caching headers correctly for .5 seconds, and let it rip. Our backend traffic dropped from a potential 20,000,000 requests per second to… 2. Side lesson there: it’s amazing how much easier it is to scale the machine that doesn’t exist. Computer science is your friend when engineering throws you to the wolves.