This week in caching: Redis round-trip reduction
The cache was fast; the network wasn't. How teams fixed the gap:
— Feed service — replacing 300 sequential GETs with one MGET / pipeline dropped page render from 240ms to 18ms; same Redis, the win was killing 300 network round-trips.
— Laravel app — moving Redis off a remote managed host onto a local unix socket cut per-call latency from 0.8ms to 0.05ms; on a page doing 200 cache calls that's a real 150ms.
— API — Lua scripting a read-modify-write into one atomic call removed a race and a round-trip at once.
The lesson: cache hit latency is dominated by network round-trips, not Redis itself. Batch and co-locate.
Bookmark: redis-cli --latency and --intrinsic-latency — separate network cost from server cost before you tune.
The cache was fast; the network wasn't. How teams fixed the gap:
— Feed service — replacing 300 sequential GETs with one MGET / pipeline dropped page render from 240ms to 18ms; same Redis, the win was killing 300 network round-trips.
— Laravel app — moving Redis off a remote managed host onto a local unix socket cut per-call latency from 0.8ms to 0.05ms; on a page doing 200 cache calls that's a real 150ms.
— API — Lua scripting a read-modify-write into one atomic call removed a race and a round-trip at once.
The lesson: cache hit latency is dominated by network round-trips, not Redis itself. Batch and co-locate.
Bookmark: redis-cli --latency and --intrinsic-latency — separate network cost from server cost before you tune.
Forwarded from AffPapa! Клуб спящих бизнесменов! Потрачено!
This media is not supported in your browser
VIEW IN TELEGRAM
Совсем скоро запуск ШЕСТОГО проекта на RU GEO от создателей APEX, EVA, KUSH, BANDA и LEEBET!
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from AFF.TOP - про арбитраж трафика и CPA рынок!
This media is not supported in your browser
VIEW IN TELEGRAM
Microsoft планирует вставлять рекламу в игры
➡️ Читайте на сайте: https://aff.top/blog/microsoft-planiruet-vstavliat-reklamu-v-igry
🧠 Ещё больше инсайтов → в канале AFF.top
➡️ Читайте на сайте: https://aff.top/blog/microsoft-planiruet-vstavliat-reklamu-v-igry
🧠 Ещё больше инсайтов → в канале AFF.top
Myth: more cache layers always means faster
This week in caching, the layering fallacy:
— The claim: stack page cache + object cache + CDN + browser cache and speed compounds.
— The correction: each layer adds an invalidation surface; a stale object cache can poison your fresh page cache, so a miss now costs a multi-layer rebuild instead of one.
— Worth your time: audit which layer actually owns the TTL for a given URL before adding another. Two coherent layers beat four that fight over the same key.
Bookmark: map your stack as a dependency tree, not a pile. The bottom layer's staleness window caps everything above it.
This week in caching, the layering fallacy:
— The claim: stack page cache + object cache + CDN + browser cache and speed compounds.
— The correction: each layer adds an invalidation surface; a stale object cache can poison your fresh page cache, so a miss now costs a multi-layer rebuild instead of one.
— Worth your time: audit which layer actually owns the TTL for a given URL before adding another. Two coherent layers beat four that fight over the same key.
Bookmark: map your stack as a dependency tree, not a pile. The bottom layer's staleness window caps everything above it.
This week in caching: private browser cache vs shared CDN cache
The header nuance that causes the most cache bugs:
—
—
— The killer:
Classic outage: serving a logged-in page as
Bookmark: MDN's Cache-Control reference — keep the private/public/s-maxage section open while you debug.
The header nuance that causes the most cache bugs:
—
Cache-Control: private means only the user's browser may store it — correct for logged-in dashboards. A CDN must skip it.—
public opens it to shared caches (CDN, proxies) — correct for anonymous pages.— The killer:
s-maxage overrides max-age for shared caches only. So you can tell the CDN 'cache 1 hour' while telling browsers 'cache 1 minute' — long edge life, fresh-ish clients, no header conflict.Classic outage: serving a logged-in page as
public and leaking one user's cart to everyone behind the CDN. Always pair user-specific responses with private AND a Vary on the auth cookie.Bookmark: MDN's Cache-Control reference — keep the private/public/s-maxage section open while you debug.