Load test · October 2025
Published · 3 min read
Why I ran a ticketing backend on two Raspberry Pis
Tixin, the pilot that became tunyt, ran on a Kubernetes cluster I built by hand on two Raspberry Pi 5s, and held about 16K requests a second in a load test. Why I built it that way, what CQRS costs, and why I don't quote 16K as capacity.
Tixin's backend ran on two Raspberry Pis, and it held about 16,000 requests a second in a load test. Here's how I built it and why I made each call.
Hardware that's too small, on purpose
Tixin was the ticketing pilot that grew into tunyt. I built its Kubernetes cluster by hand on two Raspberry Pi 5s.
On a big cloud instance a slow query costs you nothing you can see. You have headroom, so you leave it, and it stays forever. Two small boards have no headroom. Every slow query, chatty service and lazy default shows up straight away, and the only way past it is to fix it.
I wanted that pressure. I'd do it again.
How ticket traffic behaves
Most of the day almost nothing happens. Then sales open and a lot of people hit the system at the same moment. Most of them are reading: looking at the event, checking prices, refreshing to see what's left. A smaller group is writing, which means booking. If reads and writes share one path and one database, they slow each other down right when it matters.
Split reads from writes
So Tixin splits them. The pattern is CQRS (command query responsibility segregation): the code that changes things and the code that reads things take different paths.
Commands like "book this ticket" go onto Kafka. Queries like "show me this event" are served from a Redis cache and never touch Kafka. Someone refreshing an event page and someone booking a seat run on different infrastructure.
Kafka on the write path
Kafka is an append-only log, and appending is about the cheapest thing a computer can do. A burst of bookings becomes a burst of appends. The log absorbs the spike and the work behind it catches up at its own pace. At peak the pipeline sustained more than 50K events a second.
What CQRS costs
When reads come from a cache and writes go somewhere else, there's a moment where the two disagree: a booking has happened and the read side hasn't caught up. The window is usually tiny, but in ticketing it forces real questions. What does someone see in that window? Where do you make sure a seat can't be sold twice? Which side holds the truth?
CQRS doesn't answer those for you. You have to answer them on purpose.
Tune the boring parts
The split was most of the win. The rest was tuning. After I tuned PostgreSQL and MongoDB on the booking read path, query latency dropped 70%. Rebuilding the CI/CD automation cut deploy time 60%.
None of that is clever, and the hardware forced all of it. On a big instance I'd have left it. On a Pi it decided whether the system held or fell over.
I don't quote 16K as capacity
A load test isn't production. I picked the workload, so the result shows where the limits are under my conditions. It says nothing about real people on flaky phones, retries, double-taps on the pay button and everything else real users do.
16K tells me one thing: the architecture wasn't the bottleneck. That's useful. It isn't a promise, and if I passed it off as one, any senior engineer reading this would stop trusting my other numbers.
What I took into tunyt
Tixin is retired, but two things from it are in everything I build. I measure first and fix what the measurements show. And I kept the pattern: I pulled the read/write split out of Tixin into its own repo, cqrs, so you can read it without a product around it.
By Aditya Dutt Pandey, CTO of tunyt