Tableau · Code review · Help: tableau-review fails to start intermittently in containers, logs inside

798
TAr/tableau-review·posted by tang_hao·3 hours agoHelpPinned

Help: tableau-review fails to start intermittently in containers, logs inside

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

# Load test: do not jump straight to the max concurrency.
# Ramp it up, otherwise you miss the knee.
for c in 50 100 200 400 800; do
  wrk -t8 -c$c -d60s --latency http://127.0.0.1:8080/api/feed
  sleep 20
done

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

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 tableau-review itself but our upstream connection reuse — the load test traffic was too clean and hid the long-tail requests.

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.

One last trap: in container environments remember to adjust the memory-related parameters in step. Otherwise the host limit and the process expectation disagree, and the symptom is intermittent, unreproducible failure.

155 comments

155 comments

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

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

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

466
Llinlin·2 days agoedited

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

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

452
NnikicMod·just now

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.

451
Wwinter·2 days ago

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

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

372
Rrase·yesterday

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

165
Zzhu_zong·1 hour ago

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

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

259
Cchen_dev·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.

321
Mmike_xu·12 minutes ago

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

318
Cchen_devMod·5 hours agoedited

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

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

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

297
Cchen_dev·12 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.

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

102
LlinlinOP·just now

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.

235
LlinlinOP·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.

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

47
Cchen_dev·12 minutes 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.

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

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

15
Lli_ming·5 hours ago

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

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

126
Rrase·yesterday

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.

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

57
Rran_boMod·1 hour ago

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

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

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

151
Cchen_dev·2 days ago

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

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

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

220
Sslow_query·2 days ago

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

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

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

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

174
Aalice_dev·just now

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.

148
Cchen_devMod·3 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.

127
Rran_bo·2 days ago

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

76
Sswoole_lee·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
Aalice_dev·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.

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

75
KkiteOP·2 days ago

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

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

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

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

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

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

23
Zzhu_zong·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".

18
Nnikic·2 days ago

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

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

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

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

15
KkiteMod·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.

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

11
Lli_ming·just now

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.

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

519
Cchen_dev·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.

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

517
RraseMod·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
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.

84
Bbob_chen·2 days ago

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

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

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

507
Kkite·2 days ago

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

234
Rrase·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".

444
Cchen_dev·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.

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

1
Bbob_chen·2 days ago

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

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

374
Ttang_haoMod·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.

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

5
Kkernel_panic·just now

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.

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

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

2
Kkite·28 minutes ago

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

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

2
Kkernel_panic·28 minutes ago

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

1
Lli_ming·2 days ago

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

39
Wwinter·2 days ago

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

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

84
WwinterMod·2 days ago

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

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

161
Bbob_chen·3 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".

1
Kkite·12 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.

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

508
Ddev_zhou·3 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".

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

219
Aalice_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.

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

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

44
Ttang_haoOP·1 hour ago

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

340
Ddev_zhou·2 days ago

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

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

194
Zzhu_zong·2 days ago

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

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

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

11
Wwinter·12 minutes 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.

67
Ddev_zhouOP·just now

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

515
Rrase·2 days agoLevel 6

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

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

5
Sslow_query·2 days ago

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

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

117
Kkite·just nowLevel 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.

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

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

1
Zzhou_yi·2 days agoedited

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

8
KkiteMod·2 days ago

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

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

3
Mmike_xu·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
LlinlinMod·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".

80
Sswoole_lee·yesterdayedited

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.

173
Aalice_dev·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
Zzhu_zong·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".

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

1
Sslow_query·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
RraseMod·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

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