React · Architecture · Interview notes: how I answered a question about the react-design concurrency model

8
REr/react-design·posted by dev_zhou·2 days agoTutorial

Interview notes: how I answered a question about the react-design concurrency model

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.

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.

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

3 comments

M
Kkernel_panic·3 minutes ago

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

258
Ttang_haoMod·12 minutes ago

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

71
Rrase·just now

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

4

This is the post detail page /en/c/react-design/post/p6. 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 →