Capacitor · Ops · Two weeks with capacitor-ops: what feels right and what drives me up the wall

3
CAr/capacitor-ops·posted by tang_hao·2 days agoPostmortem

Two weeks with capacitor-ops: what feels right and what drives me up the wall

Most capacitor-ops articles stop at "how to use it" and never cover "when not to use it". This is an attempt at the second half.

What genuinely surprised me was the tail. The average looked great while P99 jumped by an order of magnitude past some threshold. The cause was not capacitor-ops itself but our upstream connection reuse — the load test traffic was too clean and hid the long-tail requests.

One last trap: in container environments remember to adjust the memory-related parameters in step. Otherwise the host limit and the process expectation disagree, and the symptom is intermittent, unreproducible failure.

Bblog.cloudflare.comExternal link · opens in a new tab
2 comments

2 comments

M
Zzhou_yi·just now

I just read the capacitor-ops source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

133
Bbob_chen·12 minutes ago

This is not a capacitor-ops problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

2

This is the post detail page /en/c/capacitor-ops/post/p11. Posts and comments are generated deterministically from a seeded PRNG, so the same post always renders the same content and the link can be shared, reloaded and indexed. In production this page reads MySQL for the post, Redis for hot-post caching, and fetches the whole comment tree in a single query on the path column.

See the database schema →