Monorepo Frontend · Q&A · Newbie question: how should a monorepo-frontend-qa config file be organised?

407
MFr/monorepo-frontend-qa·posted by zhu_zong·2 days agoDiscussion

Newbie question: how should a monorepo-frontend-qa config file be organised?

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

We also fixed monitoring along the way: replaced average-based alerts with percentiles and split them per endpoint. False alerts dropped by about seventy percent and the on-call rotation visibly cheered up.

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

163 comments

· first 120 loaded
M
Kkernel_panic·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

486
Kkite·2 days ago

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

86
Sslow_query·2 days ago

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

38
Oops_wang·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

438
Kkite·2 days agoedited

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.

299
Hhuang_ke·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

281
Mmike_xuMod·2 days ago

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

272
Cchen_dev·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

80
Kkernel_panic·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

301
Zzhu_zongMod·2 days agoedited

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

262
Lli_mingOP·2 days ago

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

197
Cchen_dev·just now

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

225
Kkernel_panic·1 hour agoedited

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

475
Aalice_devOPMod·2 days ago

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.

92
Cchen_dev·28 minutes ago

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

403
Zzhou_yi·28 minutes ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

97
Hhuang_ke·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

65
LlinlinOP·2 days agoLevel 6

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

295
Ddev_zhou·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

24
Llinlin·2 days agoeditedLevel 6

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.

104
Lli_ming·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

38
Kkernel_panic·5 hours ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

57
Zzhu_zong·12 minutes ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

56
Ttang_hao·2 days ago

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

157
Rran_bo·2 days agoLevel 6

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

322
Sswoole_lee·2 days ago

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

1
Hhuang_ke·2 days ago

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

143
Sslow_query·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

37
Oops_wang·2 days ago

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

220
Mmike_xu·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

209
Sslow_query·2 days ago

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

185
Nnikic·2 days ago

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

178
Kkernel_panic·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

178
Ttang_hao·2 days agoedited

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

177
Rrase·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

164
KkiteMod·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

163
Lli_ming·2 days ago

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

150
Rrase·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

1
Nnikic·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

105
Kkernel_panic·3 minutes ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

68
Ttang_hao·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

53
Mmike_xu·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

137
Rran_bo·2 days 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.

128
Sslow_query·12 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.

124
Mmike_xu·2 days ago

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.

400
Rran_bo·28 minutes ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

2
Kkernel_panicOP·2 days ago

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

58
Lli_ming·28 minutes ago

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

114
Ddev_zhou·yesterday

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

79
Ddev_zhou·2 days ago

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

455
Kkite·2 days ago

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.

169
Mmike_xu·1 hour ago

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

80
Wwinter·5 hours ago

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

497
Rran_bo·2 days agoLevel 6

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

14
Nnikic·2 days agoLevel 6

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

1
Aalice_dev·2 days 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.

267
Zzhou_yi·2 days agoLevel 6

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

34
Hhuang_ke·2 days agoLevel 6

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

2
Cchen_dev·2 days ago

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

229
Hhuang_ke·2 days ago

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

328
Hhuang_ke·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

192
Sslow_query·1 hour agoedited

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

114
Bbob_chen·2 days agoedited

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

59
Zzhou_yiOP·2 days ago

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

14
Lli_ming·2 days ago

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

1
Bbob_chen·yesterdayLevel 6

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

372
Mmike_xu·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

48
KkiteOP·2 days ago

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.

50
Oops_wang·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

107
Rrase·2 days ago

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

99
Cchen_dev·yesterday

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

79
Rran_bo·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

245
Sswoole_lee·2 days ago

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

71
Rran_boOP·2 days ago

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

11
KkiteOP·2 days agoedited

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

8
Kkernel_panic·2 days 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.

55
Lli_ming·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

53
Zzhou_yi·2 days ago

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

370
Rran_bo·2 hours agoedited

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

490
Kkernel_panic·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

109
Ddev_zhou·2 days ago

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

4
Hhuang_ke·yesterday

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

47
Mmike_xu·1 hour ago

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

45
Wwinter·2 days ago

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

116
Rran_bo·28 minutes ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

58
Mmike_xu·5 hours ago

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

25
Hhuang_ke·28 minutes ago

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

23
Rrase·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

17
Ttang_hao·5 hours ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

14
Kkite·2 days ago

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

1
Zzhou_yi·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

120
Oops_wang·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

23
Kkite·2 days agoedited

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.

486
Hhuang_ke·2 days ago

One counter-example: below monorepo-frontend-qa 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

13
Bbob_chen·2 days ago

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

10
Rran_bo·1 hour ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

8
Kkernel_panic·2 days agoedited

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

112
Lli_ming·just now

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

480
Nnikic·3 minutes ago

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.

111
Zzhu_zongOP·2 days ago

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

6
Zzhu_zong·2 days ago

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

32
Llinlin·3 minutes agoedited

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

244
Mmike_xuOP·3 minutes ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

451
Oops_wang·2 days 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.

39
Rrase·1 hour ago

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.

58
RraseMod·5 hours ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

450
Wwinter·2 days agoedited

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

355
Aalice_dev·2 days agoLevel 6

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

64
Kkernel_panic·2 days ago

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

69
Kkernel_panic·28 minutes ago

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

55
Kkite·2 days agoedited

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

7
Aalice_dev·3 minutes ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

5
Rrase·2 days ago

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

2
Zzhou_yi·28 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.

1
Lli_ming·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

470
Rrase·just now

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

377
Sslow_query·2 days ago

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.

25
Hhuang_ke·2 days agoedited

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

305
Rran_bo·2 days ago

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

1
Bbob_chen·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

1

This is the post detail page /en/c/monorepo-frontend-qa/post/p12. 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 →