Varnish for PHP developers
summary
Varnish is an HTTP cache/reverse proxy that turns many backend PHP requests into one by honoring or overriding TTLs, using vcl_recv, vcl_hash, vcl_backend_response, vcl_deliver to strip cookies, rewrite Host, set TTLs and enable ESI fragments and grace mode for stale‑while‑revalidate. Config changes live in VCL, extensions come as vmods (cookie parser), and cache invalidation uses curl PURGE, varnishadm ban or restarting. Debug with varnishlog, varnishhist and varnishncsa; examples show rewritten responses cached for minutes while backends only see far fewer hits.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:21WHAT'S THIS TALK ABOUT? • What is Varnish? Why need it? . (small) introduction to HTTP headers
- 2:32WHY USE VARNISH?
- 3:53REQUEST HEADERS • Example: user requests
- 5:41RESPONSE HEADERS
- 6:56HOW VARNISH WORKS
- 10:19VARNISH CONFIGURATION LANGUAGE
- 11:03MANIPULATING THE CLIENT REQUEST
- 14:09MANIPULATING THE RESPONSE
- 16:27MANIPULATING THE DELIVERY
- 17:30CHALLENGE: VISUALISING CHANGES
- 18:10EXAMPLE MODIFY USER REQUEST
- 22:33DETERMINING HASH KEYS
- 23:49CHALLENGE: URLS
- 25:09CHALLENGE: COOKIES
- 27:35CHALLENGE: HOST
- 28:55CACHING API REQUESTS
- 32:22BAN REQUEST
- 34:48EDGE SIDE INCLUDES
- 39:28TTL: HOW LONG TO CACHE?
- 40:54GRACE MODE Delivering objects beyond their TTL
- 44:59GETTING STARTED
related talks
37mVarnish tips & tricks
28mCaching the uncacheable in Varnish
58mCaching the uncacheable: delivering personalized experiences without sacrificing performance
01h 00mReverse caching proxies: Varnish or Nginx?
56mCaching the uncacheable in Varnish
38mThe power of cache in a slow world
28mTaking Laravel to the edge with HTTP caching & Varnish
21mDebugging, Website Performance Issues & Real-Time Statistics
