Offline First · Open source · War story: offline-first-opensource timezone handling almost cost us a full day of billing

3
OFr/offline-first-opensource·posted by dev_zhou·3 hours agoReview

War story: offline-first-opensource timezone handling almost cost us a full day of billing

Short version: offline-first-opensource needs almost no tuning at small and medium scale — the point where it starts to hurt is much further out than most people assume. Full measurements below.

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 offline-first-opensource itself but our upstream connection reuse — the load test traffic was too clean and hid the long-tail requests.

Image placeholder · object storage in production
POST /api/uploads → CDN origin pull
3 comments

3 comments

M
Kkernel_panic·12 minutes ago

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

367
Cchen_dev·3 minutes ago

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

29
Bbob_chen·3 minutes ago

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

19

This is the post detail page /en/c/offline-first-opensource/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 →