Tableau · Code review · tableau-review logging: what separates "readable" from "usable"

367
TAr/tableau-review·posted by nikic·1 hour agoDiscussion

tableau-review logging: what separates "readable" from "usable"

Some background first. Our setup is tableau-review plus three downstream services, seven figures of daily requests, peaking around nine in the evening.

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.

Keep it and wait for an official fix44%
Switch to a third-party option now28%
Fork and maintain it ourselves17%
Write an adapter layer and wait11%

624 votes total

89 comments

89 comments

M
Ttang_hao·12 minutes agoedited

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

512
Oops_wang·12 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.

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

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

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

205
Zzhu_zong·1 hour 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.

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

495
Aalice_dev·12 minutes agoedited

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

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

240
Lli_ming·just now

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

27
Zzhou_yi·28 minutes ago

One counter-example: below tableau-review 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
Ddev_zhou·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.

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

346
Sswoole_lee·2 days agoedited

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.

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

201
Ddev_zhou·2 days ago

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

165
Zzhou_yi·2 days ago

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

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

48
Oops_wang·3 minutes agoLevel 6

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

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

125
Zzhu_zong·2 days agoLevel 6

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

286
Cchen_dev·2 hours 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.

46
Ddev_zhou·1 hour ago

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

4
Zzhou_yiOP·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
Lli_mingMod·28 minutes ago

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

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

215
Kkernel_panic·28 minutes agoeditedLevel 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.

104
Zzhou_yi·2 days agoeditedLevel 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.

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

58
Lli_ming·2 days agoLevel 6

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

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

44
Cchen_dev·1 hour agoLevel 6

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

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

20
Llinlin·28 minutes ago

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

2
Bbob_chen·2 days ago

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

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

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

147
Wwinter·2 days ago

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

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

325
Sswoole_lee·2 days ago

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

315
Nnikic·2 hours agoedited

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

305
Ddev_zhou·2 hours ago

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

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

376
Zzhou_yi·2 days ago

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

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

89
Llinlin·2 days agoedited

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.

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

284
Sswoole_leeOP·2 days ago

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

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

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

444
Ttang_hao·2 days agoedited

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

188
Ddev_zhou·2 days ago

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

167
Aalice_dev·2 days ago

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

126
WwinterOP·2 days ago

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

96
Rran_bo·3 minutes ago

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

139
Rrase·2 days ago

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

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

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

102
Cchen_dev·2 days agoedited

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

129
Cchen_dev·2 days ago

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

94
WwinterOP·12 minutes ago

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

32
Zzhou_yi·5 hours ago

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

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

6
Ddev_zhou·2 days ago

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

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

372
Zzhu_zong·2 days ago

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

70
Ddev_zhouOP·2 days ago

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

54
Rrase·2 days agoedited

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

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

44
Aalice_dev·2 days ago

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

43
Ttang_hao·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
Nnikic·2 days ago

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

7
Kkernel_panic·5 hours ago

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

6
Llinlin·just now

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

3
Llinlin·2 days ago

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

102
Mmike_xuMod·2 days ago

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

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

2
Kkite·12 minutes ago

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

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

1
Aalice_dev·yesterday

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

77
Zzhu_zong·2 days ago

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

333
Kkernel_panicMod·2 days ago

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

267
Rrase·12 minutes ago

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

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

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

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

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

500

This is the post detail page /en/c/tableau-review/post/p5. 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 →