This week in caching: Varnish vs Nginx FastCGI cache
Both do full-page caching at the edge of your origin — pick by your TLS and invalidation needs:
— Nginx FastCGI cache wins on simplicity: it's already terminating your TLS, one config block, no extra daemon, and fastcgi_cache_purge handles single-URL purges fine for a blog.
— Varnish wins on power: VCL lets you normalize cookies, do grace mode (serve stale while revalidating), and ban-by-regex invalidation that Nginx can't match without Lua.
— The gotcha: Varnish speaks plain HTTP, so you bolt on a TLS terminator (Hitch/Nginx) in front — two moving parts instead of one.
Small-to-mid WP/Drupal site → Nginx FastCGI cache. High-traffic site needing grace mode and surgical bans → Varnish earns its complexity.
Bookmark: the Varnish 'grace mode' docs — serving stale-while-revalidate is the feature people switch for.
Cache Catch
@CacheCatch
This week in caching: Varnish vs Nginx FastCGI cache
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.