← all projects
Backend · Java · Spring Boot · Kafka

Seat-Selection Service

Core backend services for seat selection on a large-scale ticketing platform — designed for correctness under heavy contention, horizontal scale and extensibility across venues and seat-map rules.

millions
users served
high
concurrency
safe
under seat contention
in prod
long-running service

The challenge

Seat selection becomes a distributed-systems problem during high-demand events: many buyers can request the same limited inventory at nearly the same moment, while the platform must respond quickly, preserve a single source of truth and never allow the same seat to be held by two buyers.

What I worked on

I designed and implemented core backend components for seat availability and reservation using Java and Spring Boot. The service was structured around stateless APIs, a contention-safe reservation path, durable seat state and event-driven integration so new venue layouts and business rules could be introduced without rewriting the core flow.

Architecture below is a generalized reconstruction of the production design. Exact proprietary implementation details are intentionally omitted. Tap any layer to explore.
Clients Seat API Reservation Kafka Cassandra Async Consumers
Tap a layer to explore →

Concurrency & consistency

The critical path is the seat hold. A request first validates the seat and reservation rules, then attempts an atomic conditional state change in the persistence layer. Only one competing request can transition an available seat into a held state; losing requests receive a conflict rather than overwriting the winner.

Event-driven flow

After a successful state transition, the service publishes reservation events to Kafka. Downstream consumers can react to events such as a seat being held, confirmed, released or expired without coupling those workflows to the latency-sensitive reservation API.

This keeps the source-of-truth reservation decision separate from asynchronous processing and avoids treating Kafka itself as the locking mechanism.

Failure handling

Testing for the hard case

The most important tests were not simple CRUD tests. They exercised many simultaneous requests against the same seat or small inventory set and verified that one request could win while every competing request observed a deterministic conflict. Additional tests covered retries, expiry and event-processing behavior.

Impact

The service shipped into production and supported seat-selection workflows at large scale. The design emphasized correctness first, then horizontal scalability and extensibility so the platform could support new venues, seat maps and reservation rules without rebuilding the core reservation path.

JavaSpring BootKafkaMicroservicesKubernetesCassandraRESTJUnitConcurrencyDistributed Systems
Next project → Starship