Vue · Advanced · Built a visual debugging panel for vue-pro over the weekend

866
VUr/vue-pro·posted by linlin·just nowTranslation

Built a visual debugging panel for vue-pro over the weekend

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 vue-pro 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
166 comments

166 comments

· first 120 loaded
M
Sswoole_lee·3 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.

515
Kkernel_panic·2 days ago

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

493
Lli_ming·2 days ago

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

480
Oops_wang·2 days ago

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

461
Hhuang_ke·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.

457
Bbob_chen·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.

175
NnikicOP·2 days agoedited

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.

359
Bbob_chen·2 days ago

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

414
NnikicOP·2 days ago

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

340
Kkite·2 hours 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.

383
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.

357
Llinlin·2 days ago

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

352
Kkernel_panicMod·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.

267
Bbob_chen·12 minutes ago

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

317
Bbob_chen·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.

28
Sswoole_lee·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.

1
Sswoole_lee·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.

52
Nnikic·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.

309
Bbob_chen·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.

294
Bbob_chen·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.

246
Oops_wang·2 days ago

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

236
Lli_ming·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.

231
Bbob_chen·28 minutes ago

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

219
Sslow_query·just now

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.

338
Kkernel_panic·1 hour ago

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

35
Sswoole_lee·just now

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

419
Zzhou_yi·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.

476
Kkite·28 minutes ago

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

134
Aalice_devOP·2 days ago

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

25
Sswoole_lee·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.

398
Oops_wang·1 hour 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.

254
Wwinter·2 days ago

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

201
Rrase·2 days agoLevel 6

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

3
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.

236
Mmike_xu·2 days ago

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

231
Kkite·2 days agoedited

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

57
Sslow_query·just nowedited

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.

166
Zzhou_yi·5 hours 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.

92
Oops_wang·2 days ago

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

442
Nnikic·1 hour ago

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

131
Aalice_dev·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.

295
Hhuang_ke·2 days ago

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

494
Hhuang_ke·1 hour 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.

507
Kkernel_panic·2 days agoLevel 6

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

3
Ttang_hao·2 days ago

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

253
Ddev_zhou·2 days ago

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

32
Wwinter·5 hours agoeditedLevel 6

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

392
Nnikic·2 days agoLevel 6

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

44
Oops_wangMod·2 days ago

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

5
LlinlinMod·1 hour ago

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

1
Sswoole_lee·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.

28
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.

212
Ttang_hao·28 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.

190
Lli_ming·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.

166
Oops_wang·just now

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.

189
Nnikic·2 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.

187
Hhuang_keOP·2 days ago

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

83
Lli_ming·2 days ago

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

396
Hhuang_ke·2 days ago

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

135
Sswoole_lee·2 days ago

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

3
Rran_bo·2 days ago

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

1
Zzhou_yi·12 minutes ago

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

102
Zzhu_zong·2 days ago

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

101
Wwinter·2 days ago

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

95
Wwinter·2 days ago

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

83
Kkite·12 minutes agoedited

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

64
Rrase·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.

372
Hhuang_ke·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.

361
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.

49
Cchen_dev·just now

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

39
Mmike_xuMod·3 minutes 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.

23
Ttang_hao·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.

374
Oops_wang·2 days ago

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

1
Cchen_devOP·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.

233
Kkite·1 hour ago

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

22
Rran_bo·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.

357
Oops_wang·2 days ago

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

186
Kkernel_panic·12 minutes agoedited

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

281
Lli_ming·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.

177
Zzhu_zong·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.

167
Hhuang_ke·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.

51
Kkite·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.

20
Bbob_chen·2 days ago

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

20
Lli_ming·yesterday

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
Bbob_chen·2 days ago

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

18
Cchen_dev·12 minutes agoedited

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.

16
KkiteOP·1 hour ago

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

276
Zzhu_zong·2 days ago

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

173
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.

341
Wwinter·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.

278
Zzhu_zong·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.

406
Oops_wang·2 days ago

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

53
Ddev_zhou·2 days agoedited

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

130
Wwinter·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.

118
Ddev_zhou·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.

17
Mmike_xu·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.

146
Aalice_dev·yesterday

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.

115
Oops_wang·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.

71
Sslow_query·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.

25
Kkite·2 days ago

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

409
Ddev_zhou·2 days ago

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

310
Cchen_dev·2 hours ago

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

150
Ddev_zhou·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.

136
Wwinter·2 days ago

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

91
Llinlin·2 days agoedited

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

1
Kkernel_panicMod·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.

9
Cchen_devMod·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.

16
WwinterOP·yesterday

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

204
Aalice_dev·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.

18
Wwinter·12 minutes ago

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

11
Sswoole_lee·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.

8
Lli_ming·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.

8
Mmike_xu·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.

7
Nnikic·2 days ago

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

6
Zzhou_yi·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.

4
Sswoole_lee·just now

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

3
Wwinter·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.

236
Ddev_zhou·2 days ago

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

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

70
Nnikic·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.

2

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