Vue · Remote · vue-remote logging: what separates "readable" from "usable"

355
VUr/vue-remote·posted by rase·just nowOpen source

vue-remote logging: what separates "readable" from "usable"

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

Worth noting: the official docs do cover this, just in a very inconspicuous spot. I only found it reading the source comments, where the author explains the reasoning — roughly "so that it degrades into predictable behaviour in extreme cases".

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

168 comments

· first 120 loaded
M
Sswoole_leeOP·28 minutes ago

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

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

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

473
Hhuang_ke·2 days ago

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

466
Cchen_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.

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

456
Llinlin·2 days ago

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

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

387
Bbob_chenOP·just now

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

266
Zzhu_zong·2 days ago

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

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

488
Hhuang_ke·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
Lli_ming·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.

11
WwinterOP·3 minutes ago

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

199
Kkernel_panic·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.

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

1
Zzhu_zong·28 minutes 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.

206
Lli_mingOP·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.

23
Ttang_hao·2 days ago

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

310
Kkernel_panic·2 days ago

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

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

231
Ttang_hao·2 days ago

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

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

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

286
Sswoole_leeMod·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.

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

251
Zzhu_zongOP·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.

189
Lli_ming·2 days ago

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

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

130
Rran_boOP·2 days ago

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

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

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

2
Kkernel_panicOP·3 minutes ago

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

157
Hhuang_ke·1 hour ago

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

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

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

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

382
Oops_wang·2 days agoLevel 6

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
Oops_wang·2 days agoLevel 6

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.

71
Hhuang_ke·2 days ago

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

54
Sslow_queryOP·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.

381
Kkernel_panic·2 days ago

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

61
Sslow_query·2 days agoLevel 6

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.

224
Lli_mingMod·2 days agoeditedLevel 6

One counter-example: below vue-remote 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
Ddev_zhou·2 days ago

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

39
Lli_ming·2 days ago

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

6
Sswoole_leeMod·2 days ago

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

340
Cchen_dev·2 days agoLevel 6

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

234
NnikicMod·1 hour 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.

44
Hhuang_ke·2 days agoLevel 6

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

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

2
Bbob_chen·3 minutes ago

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

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

500
KkiteOP·2 days ago

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

452
Ddev_zhou·2 days ago

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

33
Cchen_devOPMod·2 days agoLevel 6

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

104
Kkite·2 days agoLevel 6

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.

61
Sswoole_lee·yesterdayLevel 6

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.

38
Cchen_devMod·2 days ago

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

268
Zzhu_zong·yesterday

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

270
Bbob_chen·2 days ago

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

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

21
Mmike_xuMod·2 days ago

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

53
Oops_wang·2 days agoLevel 6

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

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

155
Ttang_hao·2 days ago

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

389
NnikicOP·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.

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

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

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

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

105
Hhuang_ke·2 days ago

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

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

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

25
Zzhu_zong·5 hours agoedited

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

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

223
Wwinter·2 hours agoLevel 6

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.

417
Lli_ming·2 days agoLevel 6

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.

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

117
Cchen_devOP·2 hours agoLevel 6

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.

3
Wwinter·2 days ago

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

145
Llinlin·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.

190
Zzhou_yiOP·2 days agoedited

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

128
Kkite·2 days ago

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

183
Sswoole_leeOP·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.

101
Sslow_query·just now

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

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

6
Bbob_chen·2 days ago

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

133
Zzhu_zong·just now

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

127
Kkernel_panic·2 days ago

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

90
WwinterOP·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.

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

64
RraseOP·2 days ago

One counter-example: below vue-remote 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
Hhuang_ke·2 days ago

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

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

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

21
Llinlin·12 minutes ago

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

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

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

17
Oops_wang·2 days ago

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

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

12
Bbob_chen·2 days ago

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

8
Cchen_dev·1 hour 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.

6
Zzhu_zong·2 days ago

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

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

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

5
Rrase·2 days ago

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

227
Mmike_xu·2 days ago

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

418
Ddev_zhou·2 hours agoedited

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

62
Hhuang_ke·2 days ago

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

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

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

18
Zzhou_yi·2 days agoLevel 6

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

81
Bbob_chen·2 days ago

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

43
Lli_ming·2 days ago

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

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

3
Bbob_chen·2 days ago

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

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.

1
Sswoole_lee·2 days ago

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

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

70

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