TikTok’s payment service struggled at 100,000 queries per second until engineers rewrote critical APIs in Rust
lord.technology·1d
Flag this post

6 minute read

At exactly 100,000 queries per second, TikTok’s payment service stopped being an engineering problem and became an economic one. The APIs fetching user balances and transaction statistics consumed so much CPU that continuing to scale horizontally meant spending hundreds of thousands on additional servers annually. The team faced a choice: keep optimising Go code that was already well-written, or rewrite the bottlenecks in Rust and risk everything that could go wrong.

They rewrote precisely three endpoints. Everything else - the business logic, integrations, operational tooling - stayed in Go. The Rust code doubled throughput, cut infrastructure costs by $300,000 yearly, and shipped within months. More remarkably, it worked.

When microseconds become money

TikTok’…

Similar Posts

Loading similar posts...