Taking Laravel to the edge with HTTP caching & Varnish
summary
Varnish proves it can sit in front of Laravel and cut work by serving cached responses at 500 Gbps and handling 100k requests/sec on a single box; it honors HTTP cache headers, supports stale-while-revalidate 300 (grace), and creates variations with Vary so language and encoding aren’t poisoned. Practical fixes: strip unnecessary cookies or mark routes public, emit ETags and short‑circuit with middleware so unchanged pages return 304 early, and assemble dynamic bits using ESI via a custom Blade directive and surrogate-control headers.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:17Varnish and web performance
- 5:45How Varnish works
- 7:28HTTP caching headers
- 12:02Caching Laravel responses
- 15:12Partial page caching with ESI
- 19:25Cache objects and language variations
- 21:51Advanced VCL and middleware
- 23:15Beyond web acceleration
- 24:50Q&A
related talks
56mCaching the uncacheable in Varnish
58mCaching the uncacheable: delivering personalized experiences without sacrificing performance
38mHTTP Headers that Make Your Website Go Faster
39mLaravel: 7 Steps to Dramatically Improve Performance
28mCaching the uncacheable in Varnish
46mVarnish for PHP developers
38mThe power of cache in a slow world
35mTake your Http caching to the next level with xkey & Fastly
