Cache Catch
Cache Catch
@CacheCatch

This week in caching: VCL cookie hygiene, before/after

This week in caching: VCL cookie hygiene, before/after

Cookies quietly destroy hit rate. The teams who fixed it:

— Publisher — analytics cookies (_ga, _fbp) made every request 'unique' to Varnish; stripping them in vcl_recv before lookup took hit rate from 34% to 91%. Same content, just stopped fragmenting the key.
— WordPress — only passing wordpress_logged_in cookies through and dropping the rest meant anonymous traffic finally cached; origin req/s fell ~80% at peak.
— Store — preserving the cart cookie but stripping marketing ones kept commerce working while caching the catalog.

The principle: Varnish caches per cache-key, and unstripped cookies make the key unique per visitor. You're not caching, you're proxying.

Bookmark: varnishlog -g request -i ReqHeader -I Cookie — see exactly which cookies are poisoning your hit rate.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.