Turborepo · Job board · Choosing turborepo-jobs: I turned 5 options into a side-by-side comparison

1.8K
TUr/turborepo-jobs·posted by linlin·6 hours agoTooling

Choosing turborepo-jobs: I turned 5 options into a side-by-side comparison

Short version: turborepo-jobs needs almost no tuning at small and medium scale — the point where it starts to hurt is much further out than most people assume. Full measurements below.

On trade-offs, my view is this: if nobody on the team owns this area long-term, do not introduce a second mechanism. With two coexistence you first have to work out which one is even in play when things break, and that costs far more than the performance you saved.

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

792 comments

· first 120 loaded
M
KkiteOP·2 hours ago

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

464
Zzhou_yiMod·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.

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

514
Kkite·2 days ago

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

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

485
Nnikic·2 days ago

One counter-example: below turborepo-jobs 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·1 hour agoedited

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

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

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

367
Nnikic·2 days ago

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

359
Zzhou_yiOP·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.

264
Llinlin·just now

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

82
Rrase·2 days ago

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

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

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

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

46
Rrase·2 days agoedited

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

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

291
Mmike_xu·just nowedited

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

277
Zzhu_zong·3 minutes agoedited

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

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

275
Oops_wang·2 days ago

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

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

239
Rran_bo·1 hour 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.

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

231
Mmike_xu·2 days ago

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

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

214
Rran_boOP·2 hours 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.

83
Sslow_query·2 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.

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

112
Oops_wang·5 hours 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.

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

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

326
Rran_bo·2 days ago

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

1
Nnikic·2 days ago

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

5
Rrase·yesterday

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

88
Kkite·just now

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

140
Zzhu_zong·2 days ago

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

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

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

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

463
Ddev_zhou·just nowLevel 6

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

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

156
Ttang_haoMod·2 days ago

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

116
NnikicMod·2 days agoeditedLevel 6

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

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

197
Lli_ming·2 days ago

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

47
Rran_bo·2 days ago

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

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

4
Lli_ming·28 minutes ago

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

270
Wwinter·just now

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

487
Kkernel_panic·2 hours ago

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

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

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

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

45
Kkernel_panic·2 days agoLevel 6

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

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

183
Hhuang_ke·2 days agoedited

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

159
Sswoole_lee·2 hours ago

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

122
Zzhou_yiMod·2 days agoeditedLevel 6

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

165
Zzhu_zong·12 minutes 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.

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

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

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.

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

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

269
Zzhu_zong·yesterday

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

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

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

363
Lli_ming·2 days agoedited

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

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

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

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

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

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

13
Oops_wang·2 days ago

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

189
Rran_bo·2 days ago

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

168
Sslow_query·2 days ago

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

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

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

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

151
Nnikic·2 days ago

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

144
Rrase·2 days ago

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

140
Bbob_chenOP·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.

70
Kkite·2 days agoedited

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

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

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

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

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

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

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

110
Lli_ming·2 days ago

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

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

106
Sswoole_leeOP·2 days ago

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

41
Ddev_zhou·2 days agoedited

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

99
Mmike_xu·2 days ago

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

88
Llinlin·2 days ago

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

87
Sswoole_leeOP·5 hours ago

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

21
Zzhu_zong·5 hours 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
Bbob_chen·yesterday

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

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

72
Llinlin·2 days ago

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

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

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

93
Zzhu_zong·2 days ago

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

33
Zzhou_yiMod·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.

28
Ddev_zhou·2 days ago

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

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

23
Mmike_xu·2 days ago

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

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

14
Bbob_chen·2 days ago

One counter-example: below turborepo-jobs 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
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.

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

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

9
Lli_ming·2 days ago

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

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

1
Rran_bo·2 days ago

One counter-example: below turborepo-jobs 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
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.

117
Bbob_chen·yesterday

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

1

This is the post detail page /en/c/turborepo-jobs/post/p1. 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 →