Redis stampede on a three-locale list
After a deploy, twenty PHP workers rebuilt the same notes list three times. Redis filled up, then started evicting the keys that had just been written.
Notes on solutions, code, and trade-offs. Written while the problem is still fresh.
After a deploy, twenty PHP workers rebuilt the same notes list three times. Redis filled up, then started evicting the keys that had just been written.
The Vue SSR process cached full HTML in Memcached. Large article pages locked RAM into fat slabs. Small tile fragments had nowhere to live, so the hit rate fell while RSS stayed high.
List endpoints selected the whole notes row. The body column is JSON with English, Russian, and German HTML. The buffer pool filled with text the grid never rendered.
A 10 second HTML microcache in shared memory is cheap. It is also wrong the moment auth_token is on the request. Bypass on the cookie, not on a guess.
The server rendered Russian from the URL. The first client pass read navigator.language. Vue threw the tree. The page still worked, so the bug hid until the header jumped.
Sanctum writes auth_token as httpOnly. The login JSON has no token field. If the page can read the session, XSS can send it away.
LaraBoom keeps the resource, its fields, and the Service next to each other. Host routes and app/Http are the folders I do not create.
The worker can die after the provider call and before the commit. Redis will deliver the job again. The second run has to be empty.
memory_get_usage() went back down at the end of the request. The host still grew. Copy-on-write turned shared OPcache pages into private RSS after Eloquent hydrate.
A GIN on payload looks complete. WHERE title->>'ru' still seq-scans. Containment and extract are different jobs.
Redis transport redelivers after a crash. Horizon has the same rule. Ack after the provider call is how you charge twice.
Compose waits until php-fpm listens. Kubelet kills a pod that is still compiling OPcache. Readiness and liveness are different knobs.
The public site is Vue SSR. The CMS is often React. One webpack graph ships both. TTI on the catalog pays for the editor.
Laravel owns /api/login and the httpOnly auth_token. Nest maps DTOs. A second JWT in memory is a second identity.