Edge Computing · Showcase · Building an internal platform with edge-computing-show from scratch: architecture and decision log

233
ECr/edge-computing-show·posted by rase·6 hours agoJobs

Building an internal platform with edge-computing-show from scratch: architecture and decision log

Short version: edge-computing-show 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.

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.

Documentation first44%
Source code first28%
Just ask someone17%
Run a demo and learn by error11%

396 votes total

120 comments

120 comments

M
Oops_wang·2 days ago

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

516
Wwinter·2 hours ago

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

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

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

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

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

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

175
Kkite·2 days agoedited

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

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

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

435
Rrase·2 days agoedited

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

14
Zzhu_zong·2 days ago

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

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

388
Sswoole_lee·2 days ago

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

385
Rran_bo·2 days ago

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

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

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

300
Bbob_chenOP·2 days ago

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

235
Zzhou_yi·2 hours ago

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

272
Rran_bo·yesterday

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

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

265
Hhuang_ke·yesterdayedited

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

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

235
Ddev_zhou·2 days ago

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

1
Hhuang_ke·2 hours agoedited

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

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

212
Ttang_hao·2 days agoedited

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

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

130
Nnikic·2 days ago

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

168
Mmike_xu·2 days agoedited

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

100
Aalice_devMod·just now

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

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

56
Zzhu_zong·2 days ago

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

188
Llinlin·12 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.

31
Sslow_query·2 days agoedited

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

33
LlinlinMod·2 days ago

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

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

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

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

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

38
Bbob_chen·2 days ago

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

3
Aalice_dev·2 days ago

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

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

74
Kkite·2 days ago

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

31
Cchen_dev·2 days ago

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

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

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

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

105
KkiteOP·1 hour agoedited

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

37
Aalice_dev·28 minutes ago

One counter-example: below edge-computing-show 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
Kkite·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.

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

5
Zzhou_yi·3 minutes ago

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

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

114
Ddev_zhou·2 days agoLevel 6

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

407
Zzhu_zong·2 days agoedited

One counter-example: below edge-computing-show 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
Llinlin·2 days ago

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

1
Aalice_dev·2 days agoLevel 6

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.

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

5
Kkite·1 hour agoedited

One counter-example: below edge-computing-show 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
Sswoole_lee·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.

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

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

292
Hhuang_ke·2 days agoeditedLevel 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.

8
Hhuang_ke·2 days agoLevel 6

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.

8
Sswoole_lee·1 hour ago

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

22
Sswoole_lee·2 days agoLevel 6

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

25
Hhuang_ke·5 hours ago

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

16
Sslow_query·2 days agoLevel 6

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

437
RraseOP·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.

48
Sswoole_leeMod·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
Wwinter·2 days ago

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

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

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

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

20
Rrase·2 days ago

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

75
Mmike_xu·2 days ago

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

52
Oops_wang·12 minutes ago

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

43
Rran_boOP·5 hours 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.

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

2
Kkite·2 days ago

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

517
Zzhou_yi·2 days ago

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

93
Zzhou_yi·2 days ago

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

32
Bbob_chen·2 days ago

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

5
Mmike_xu·28 minutes ago

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

22
Oops_wangOP·3 minutes ago

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

338
Llinlin·3 minutes ago

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

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

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

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

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

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

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

6
Nnikic·2 days agoLevel 6

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

15
Ttang_hao·1 hour 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.

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

328
Bbob_chen·2 days agoLevel 6

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

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

21
Mmike_xu·2 days agoLevel 6

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

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

34
Kkite·28 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.

28
Oops_wang·yesterday

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

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

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

295
Sswoole_lee·2 days ago

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

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

16
Ddev_zhou·2 days ago

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

16
NnikicMod·3 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.

10
Bbob_chen·2 hours ago

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

8
Cchen_dev·12 minutes ago

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

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

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

45
Zzhu_zong·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
Ttang_hao·2 days ago

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

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

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

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

2
Mmike_xu·2 days ago

I just read the edge-computing-show 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

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

1

This is the post detail page /en/c/edge-computing-show/post/p13. 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 →