Rust Community · I built a small tool with Rust — code is open, feedback welcome

18
Rsr/rust·posted by chen_dev·1 hour agoTranslation

I built a small tool with Rust — code is open, feedback welcome

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

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

Ggithub.comExternal link · opens in a new tab
3 comments

3 comments

M
Hhuang_ke·just now

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

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

39
Zzhou_yi·12 minutes ago

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

20

This is the post detail page /en/c/rust/post/p3. 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 →