Jupyter · Advanced · Why this jupyter-pro pattern gets slow in production: a source-level explanation

10
JUr/jupyter-pro·posted by zhou_yi·2 hours agoExperience

Why this jupyter-pro pattern gets slow in production: a source-level explanation

It took me two weeks of on-and-off digging and plenty of wrong turns. Writing the process down as it happened so the next person spends less time.

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

On trade-offs, my view is this: if nobody on the team owns this area long-term, do not introduce a second mechanism. With two coexistence you first have to work out which one is even in play when things break, and that costs far more than the performance you saved.

Ddeveloper.mozilla.orgExternal link · opens in a new tab
5 comments

5 comments

M
Zzhou_yi·28 minutes ago

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

174
Rrase·3 minutes ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

59
Aalice_dev·1 hour 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.

2
Lli_ming·just now

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

184
Oops_wang·2 hours ago

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

12

This is the post detail page /en/c/jupyter-pro/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 →