← Back to Writing

How Does Seat Blocking Actually Work? — Lessons from RedBus

·3 min read
System DesignDistributed SystemsBackend Engineering
How Does Seat Blocking Actually Work? — Lessons from RedBus

While booking on RedBus, I wondered: "How does seat blocking actually work?"

My first thought: "Just block seats in Redis for 10 mins, easy!"

But here's the catch — if RedBus blocks a seat, it's still available on AbhiBus. Someone else books the same seat. Double booking. Chaos.

The Problem

Each platform blocking independently = race conditions + angry customers.

The Actual Solution: One Source of Truth

The bus operator owns the seat inventory. When you click "Book":

  • Platform requests a lock from the operator
  • Seat gets locked everywhere (5–10 min TTL)
  • Payment succeeds? → Confirmed
  • Payment fails? → Auto-released

Redis is still used — just behind the centralized system, not per platform.

Takeaway

Simple concept. Hard to get right. Distributed systems are fun… How would you design this?