Event Seat Booking with Real-Time Seat Map and Atomic Holds

Note: When tickets for a popular band go on sale, the server receives up to 10,000 booking requests in the first 30 seconds. The system must atomically hold selected seats, prevent double bookings, and display an up-to-date seat map to thousands of users simultaneously. Without a well-architected so

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1287
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1248
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    986
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1034
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1111
  • image_website-_0.webp
    Website development for Red Pear
    556

Note: When tickets for a popular band go on sale, the server receives up to 10,000 booking requests in the first 30 seconds. The system must atomically hold selected seats, prevent double bookings, and display an up-to-date seat map to thousands of users simultaneously. Without a well-architected solution, the server crashes, revenue is lost, and negative reviews pile up. We developed a booking system that handles such loads: we use PostgreSQL atomic transactions, Redis 7 caching, WebSocket synchronization, and an interactive SVG seat map built with React 18. Over the years, we've deployed this solution for 50+ events, from 200 to 50,000 seats. Our clients report a 35% reduction in infrastructure costs and a return on investment within 2-3 events (saving up to 250,000 RUB per event).

Key Problems and Their Solutions

Seat booking presents three core challenges:

  • Double bookings. Two customers select the same seat simultaneously. Solution: atomic transactions with a 10-minute hold. If the seat is already held, the transaction rolls back, and the customer sees an error without a page reload.
  • Peak load. Thousands of concurrent requests at onsale. Solution: caching the seat map in Redis, asynchronous status updates, and WebSocket for real-time sync. This cuts database load by 10x.
  • Complex seat map. SVG with seat coordinates, correct rendering, and clickability. We use React with useRef for rendering, memoization via React.memo and useCallback. The seat map loads in 50–100 ms even for halls with 5,000 seats.

How to Prevent Double Bookings?

When a customer selects seats, they are temporarily blocked until payment completes or a timer expires. Example implementation in Python with PostgreSQL:

Example of seat hold implementation
HOLD_TTL_SECONDS = 600 # 10 minutes def hold_seats(seat_ids: list[int], session_id: str) -> bool: with db.transaction(): # Atomically check and lock result = db.execute(""" UPDATE seats SET status = 'held', held_by = %(session)s, held_until = NOW() + INTERVAL '10 minutes' WHERE id = ANY(%(ids)s) AND status = 'available' RETURNING id """, {'ids': seat_ids, 'session': session_id}) held_count = len(result) if held_count < len(seat_ids): # Not all seats available — rollback transaction raise db.Rollback("Some seats are no longer available") return True 

Background process releases expired holds every minute:

UPDATE seats SET status = 'available', held_by = NULL, held_until = NULL WHERE status = 'held' AND held_until < NOW(); 

More on atomic transactions in PostgreSQL.

Real-Time Seat Map

The visual seat map renders on SVG. Seat data comes from the backend:

{ "sections": [ { "id": 1, "name": "Orchestra", "rows": [ { "label": "A", "seats": [ { "id": 1001, "number": "1", "x": 100, "y": 200, "status": "available", "price": 2500 }, { "id": 1002, "number": "2", "x": 130, "y": 200, "status": "sold", "price": 2500 } ] } ] } ] } 

The customer clicks a seat, it highlights and adds to the cart. If attempting to add an already taken seat, an error appears without a page reload (WebSocket or 5-second polling). Thanks to Redis caching, the seat map loads in 50–100 ms even for halls with 5,000 seats.

Optimization tip: use virtual DOM and component memoization to avoid unnecessary re-renders on rapid clicks. In React — React.memo and useCallback.

Why Our System Handles Peaks

Criterion Our System Typical Solution
Seat hold Atomic transactions with TTL Only statuses in DB
Real-time WebSocket + Redis Polling (5-10 sec)
Seat map SVG with coordinates Static image, no clicks
Sales waves Automated tiers with quotas Manual toggling

We also performed load testing: the system handles up to 10,000 concurrent requests at onsale — 3x faster than typical alternatives. The cart abandonment rate drops by 30% due to smooth holds and real-time updates. Infrastructure savings amount to about 150,000 RUB per month compared to traditional solutions.

Performance comparison:

Metric Our System Typical Alternative
Response time at peak (95th percentile) 200 ms 1.5 s
Lost bookings (due to conflicts) 0.01% 2%
Seat map load time 80 ms 500 ms

Work Process

  1. Analysis: study the seat map, sales wave requirements, payment methods.
  2. Design: choose stack (PostgreSQL, Redis, React), design data model.
  3. Development: implement API, seat map, seat holds, payment gateway integration.
  4. Testing: load testing (e.g., 1,000 concurrent bookings), consistency checks.
  5. Deployment: deploy on your hosting or cloud (Vercel, AWS).
  6. Support: updates, monitoring, backups.

What's Included

  • Data model (tables: events, seat_categories, seats, ticket_bookings).
  • API for booking, holding, cancellation.
  • Interactive seat map (SVG) with real-time updates.
  • Electronic tickets with QR code (PDF, Apple Wallet, Google Pay).
  • Payment system integration (optional).
  • Documentation and staff training.

Timeline

  • Basic version (no seat map, simple seat numbering, online payment) — from 10 business days.
  • Full version (seat map, real-time, price tiers, electronic tickets) — from 16 business days.

Pricing is individual after auditing your project. To get an accurate estimate, reach out to us — we'll send a commercial proposal within one day. Order an audit to discuss details.

Typical Mistakes in Implementation

  • Ignoring seat hold mechanism → double bookings.
  • No background release of expired holds → seats "hang".
  • Poor query optimization for seat map → slow loading.
  • No caching → crash under peak load.

Our team guarantees these errors will be avoided. Get a consultation to discuss your project. Contact us for an audit — we'll prepare a tailored proposal.