Every layer costs money. Add it only when it is needed
Platform architect, as an outside expert or on your team. Let’s talk
In 2021 I joined Wallet in Telegram early, as one senior engineer among about 30, without formal authority. The rules I wrote got a greenfield team running in two weeks; the product shipped in six months and grew past 30M monthly active users. It was a wallet inside Telegram with complex business rules: custody, KYC tiers, limits per tier, sanctions screening. I argued for keeping the architecture simple and adding a layer only when a real need showed up. Every layer costs money to build, run and understand.
Rules the build checks
I wrote the guidelines, the project structure and a set of architecture tests that check the boundaries on every build. Kotlin added compile-time type safety. That is what let the team start in two weeks.
Domain-driven design, event-driven services and CQRS came in too, in stages, with explicit service boundaries.
P2P and anti-fraud at up to 3,000 requests a second
That growth was the work of many people. What I can speak to is what growth asked of the parts I owned or worked on, P2P transfers and anti-fraud, on services handling 10–30M Kafka events a day and 1,000–3,000 requests a second at peak.
Caching went where reads were hot: profiles and balances cache-aside, price feeds with short lifetimes, anti-fraud counters and temporary block lists in Redis. When a viral launch on the platform brought ten times the usual traffic, the bottlenecks were in user management, and that is where the work went.
Anti-fraud, built with the compliance team, is a rule engine and a store of facts about users and transactions, with one way to plug in a new rule or a new source of facts. Most of the rules I wrote myself.
What to copy
- Make the rules executable. Architecture tests check the constraints on every build.
- Add a pattern when the domain asks for it. Explicit boundaries, and the heavier patterns in stages.
- Let traffic pick the next layer. Cache what is read, scale what is hot, and leave the rest plain.