Why was the concert ticketing system changed to a real-name lottery? The ticket-buying crashes reveal the challenges of high-traffic ticketing systems and anti-scalping mechanisms.

歌迷在筆記型電腦前操作大型演唱會售票與實名登記系統,畫面呈現排隊與座席選取介面

Whenever a landmark singer performs at the Taipei Arena, ticket sales day is always a collective anxiety for fans across Taiwan. At the countdown to zero, hundreds of thousands of people simultaneously click "Buy Tickets Now," only to be met not with a seat selection screen, but with endless loading icons, 504 Gateway Timeout errors, or simply a "System Busy" message. A few minutes later, the system returns to normal, all shows are already sold out, but social media platforms are immediately flooded with scalped tickets sold at several times the original price.

Faced with public discontent and chaotic ticket-buying practices, many event organizers have recently shifted their rules from the previous "first-come, first-served" instant ticket sales to a "registration-based lottery" system. Fans have several days to leisurely fill in their ID numbers and preferred showtimes, and the system then uses an asynchronous algorithm to draw lots and allocate seats. Many people wonder: with cloud technology so advanced, couldn't simply running more servers solve the crash problem? Why go through all the trouble of changing to a registration-based lottery?

The crashes of ticketing systems and the rampant scalping are not fundamentally due to insufficient bandwidth, but rather to the complex engineering challenges arising from the interplay of "extremely high-concurrency transactions" and "automated script arbitrage." This article will start from the system's underlying architecture, dissecting the database bottlenecks during ticket-grabbing frenzy, the operating principles of scalper bots, and analyzing how real-name lottery can fundamentally reconstruct the traffic model and game rules.

The harsh reality behind the flash sales: Why did high concurrency traffic overwhelm the ticketing system?

When websites face high traffic, the most common approach is to cache static pages using a Content Delivery Network (CDN) and dynamically add application servers in the cloud via auto-scaling. This approach is very effective for simple content browsing (such as news reading or video playback) because millions of users are seeing the same content, preventing state conflicts between them.

However, concert ticket sales present a completely opposite scenario: it is a typicalExtreme write contentionScenario. Taking a 40,000-seat show at the Taipei Arena as an example, after deducting sponsors' and reserved seats, only 30,000 tickets may be released to the public. However, the number of requests that flood in at 12:00:00 noon may be as high as 300,000 to 500,000.

In distributed systems theory, this can trigger a severe "Thundering Herd Problem." When hundreds of thousands of connections simultaneously penetrate the front-end web server, sending direct commands to the back-end to "check seats, lock inventory, and generate orders," the number of transactions per second (TPS) the system needs to process can surge thousands of times. The back-end connection pool will be completely exhausted within hundreds of milliseconds, and subsequent requests will be queued in a waiting list. Once the timeout limit of the gateway is exceeded, front-end users will see server crash error codes.

The dilemma of inventory deduction: Why can't adding more servers prevent crashes?

Many people intuitively think, "Since the load is too high, why doesn't the platform add 100 or 1,000 servers to distribute the load?" The problem is that while front-end computing nodes can be scaled indefinitely, back-end nodes...Ticket inventory statusHowever, absolute consistency must be maintained.

In relational databases, to prevent "overselling" or "double booking" of seats, the system must strictly adhere to ACID transaction characteristics:

  1. Row-level Exclusive Lock: When a user attempts to select "Section A, Row 3, Seat 5", the database must add an exclusive lock to this seat record until the transaction is successfully written or canceled after a timeout.
  2. Lock contention: In high-demand zones, the same seat may be contested by thousands of requests simultaneously within the same millisecond. Requests at the back of the queue must remain in a blocking state, which can cause a rapid stacking of database threads, leading to deadlocks or resource exhaustion across the entire database engine.
  3. Boundaries of Distributed Locks: Even when using memory-based caches like Redis in conjunction with Lua scripts to implement pre-deducted inventory, and shifting the lock granularity from the relational database to the memory layer, physical limits still exist for the network interface card (NIC) throughput of the cache node, the CPU single-thread bottleneck, and the synchronization latency of the cluster node.

This is similar to a highway tollbooth: even if the entrance ramp is widened to 50 lanes, the single tunnel exit at the rear can still only accommodate a certain volume of traffic. For a further understanding of how massive computing nodes interconnect and collaborate within a physical data center, please refer to...Transmission principle and application of optical communication modulesFor a discussion of the infrastructure configurations supporting these massive server clusters, further reading is available.Basic structure of a 19-inch server rack in a data center.

How do scalpers snag these bots? The average person's hand speed is no match for them.

Under the "first come, first served" rule, in addition to the issue of system capacity, ordinary consumers also have to face an opponent they simply cannot defeat:Ticketing Bots (Automated Ticket-Grabbing Scripts).

Many fans believe that getting tickets is a matter of individual internet speed and hand speed, but scalpers have already industrialized this behavior:

  • Bypassing browser rendering and making direct API requests: Normally, users need to wait for the webpage to download HTML, CSS, and JavaScript and fully render the seating chart (taking approximately 1,000–3,000 milliseconds) before submitting it via mouse click. Scalpers, however, reverse engineer the ticketing platform's API endpoints and use a lightweight HTTP client to skip the rendering process. Within 80–150 milliseconds of receiving the server's sale signal, they can directly complete the "identity verification, seat grabbing, and locking" payload transmission.
  • Distributed rotating residential proxies: Platforms often set "rate limiting" to defend against malicious requests. Scalper teams, on the other hand, rent proxy networks containing hundreds of thousands of real home broadband IPs, disguising each ticket purchase request as a regular home connection from different counties and cities or different telecom companies, thus rendering traditional IP blacklist filtering mechanisms completely ineffective.
  • Optical Recognition (OCR) and AI: Bypassing Image Captchas To block bots, platforms often design CAPTCHAs with English letters and numbers or arithmetic questions and answers. However, modern deep learning models (such as convolutional neural networks CNNs) have already achieved an accuracy rate of over 95% in recognizing deformed characters and simple questions and answers, with a recognition time of less than 50 milliseconds. Some professional scalpers have even integrated overseas third-party human-in-the-loop CAPTCHA Solving platforms, which can complete the CAPTCHAs for them in 2-3 seconds.

When thousands of automated robots are pressing the system in parallel at millisecond speeds, even if ordinary users are incredibly fast, their requests to the server are already queued up behind tens of thousands of crawlers, making them victims of system crashes.

The essence of the real-name lottery system is to transform "instantaneous bursts" into "asynchronous batch processing".

Since "instant inventory deduction upon sale" is physically and algorithmically unsustainable in the face of sudden surges in demand, from a systems engineering perspective, the most thorough solution is not to endlessly build up server hardware, but rather...Reconstructing the "temporal distribution model" of traffic.This is precisely the core value of "real-name registration and lottery".

The system underwent a qualitative change in architecture by switching from instant ticket grabbing to real-name lottery:

  1. Traffic shaving: spreading the pressure of a few seconds over several days. In the lottery model, the organizers typically open registration for fans for 3 to 5 days. The visit time of 500,000 users is evenly distributed over hundreds of thousands of seconds, and the system's peak request per second (QPS) drops instantly from "hundreds of thousands" to "tens to hundreds", which can even be handled by a typical web server.
  2. Decoupled Asynchronous Processing: During the registration period, users only submit a "registration intention" rather than a "final transaction". The system only needs to securely write the registration data to the database through a message queue (such as Kafka or RabbitMQ), without having to perform high-conflict "inventory locking" or "payment deduction" operations at that time.
  3. Batch random algorithm coordination: After the registration deadline, the server can use a cryptographically secure pseudorandom number generator (CSPRNG) and the Fisher-Yates shuffle algorithm to draw lots in an offline environment without external traffic interference, and reserve seats for the winners according to their voluntary batches.

This shift eliminates the need for engineering teams to routinely rent expensive cloud fault-tolerant resources for extreme spikes that occur only a few times a year and last only a few minutes, significantly reducing the complexity and cost of system maintenance.

How can real-name authentication significantly increase the cost of ticket laundering and transfer for scalpers?

Beyond traffic smoothing in terms of technical architecture, the more important task of "real-name registration" is to...From an economic perspective, this disrupts the arbitrage model of scalpers..

The reason why scalpers can make a profit lies in the fact that tickets have "low holding costs" and "high liquidity": after scalpers use robots to acquire tickets at the original price, they can anonymously and without restriction resell them to the highest bidder on the secondary market at any time.

Real-name registration significantly increases circulation friction through identity binding:

  • Dual binding of ID card number/passport number and mobile OTP: Each identity is limited to winning the lottery only once upon registration, which significantly restricts the ability of a single account to hoard tickets.
  • Tickets are non-transferable. The tickets are printed with the winner's real name and ID number, and physical identification documents must be presented upon entry. If the name on the ticket cannot be freely changed, the difficulty of resale increases exponentially.
  • Uncertainty Hits Pre-order Acquisition: Under the lottery mechanism, even if scalpers collect a large number of ID cards to register on their behalf, they cannot guarantee a successful lottery draw. This randomness undermines the commercial credibility of scalpers collecting deposits from end buyers, greatly increasing the risks and sunk costs of large-scale industrialized ticket speculation.

Instant ticket booking vs. real-name lottery: A comparison of the engineering and user experience of the two architectures.

To better understand the fundamental differences between the two models in terms of technical architecture and practical operation, we can summarize the core metrics as follows:

Evaluation DimensionsTraditional instant ticket grabbing (first come, first served)Real-name registration lottery
Flow patternsMillions of burst traffic spikes are generated within seconds.The QPS remained at a low level with a smooth distribution over several days.
Database loadExtremely high write conflicts, frequent row-level locking, and connection pool exhaustionNo inventory lock-in pressure, purely batch write and read operations
Anti-robot thresholdLow cost; the script directly uses the API and round-robin proxy IPs to instantly kill them.High; requires verification of real identity documents and mobile phone number.
System fault toleranceExtremely low; any microservice timeout will cause a complete system crash.Extremely high; even occasional brief delays will not affect the right to register.
Server maintenance costsA large, flexible architecture and high-frequency DDoS protection specifications are required.Standard cloud specifications are sufficient, minimizing resource waste.
User experienceExtremely anxious, requires punctuality and is very likely to be disappointed.Fill out your college application with ease, avoiding the frustration of server crashes and endless loops.
On-site ticket verification operation burdenExtremely low; simply scan the QR code to pass.Extremely high; physical identification documents must be checked one by one, significantly slowing down the entry process.

The comparison shows that real-name lottery is not a "perfect" solution. Instead, it transforms the technical pressure of concurrency and anti-scraping costs into subsequent business management and on-site verification costs.

Real-name registration is not a panacea: New challenges for personal data protection, ticket release mechanisms, and on-site ticket verification.

While the real-name registration lottery system has proven highly effective in preventing scalping and server crashes, it also presents significant new technological and operational challenges.

First of allSecure storage of large amounts of personally identifiable information (PII)During the registration phase, the platform collected hundreds of thousands of names, ID card numbers, passport numbers, and phone numbers. If this highly sensitive information is not strictly encrypted during transmission, or if the database lacks proper field-level data masking and access controls, the platform will face catastrophic legal liabilities and reputational damage should a data breach occur.

followed byPhysical bottlenecks of on-site ticket verificationLarge stadiums (such as the Taipei Arena) typically need to accommodate nearly 40,000 spectators over 2 to 3 hours. If only electronic ticket barcodes are verified, each spectator's gate passage time is only about 2-3 seconds; however, if strict verification of personal identification and ticket information is implemented, the verification time per person may extend to 15-30 seconds. Without a robust flow control system and facial/ID recognition assistance, extremely congested physical queues will quickly form around the stadium. This is exactly what we are discussing...End-to-end link for World Cup live broadcast delayAs observed in practice, the speed of the entire link is often not determined by the fastest segment, but rather by the capacity limit of the bottleneck segment.

Finally,Secondary distribution mechanism for unpaid tickets and refunded ticketsIf tickets won by lottery winners are not paid for within the deadline and are put back into the online instant ticketing system, the nightmare of crashing and fighting with scalpers will be partially repeated. Therefore, mature systems usually need to plan automatic allocation algorithms for second and third rounds of waitlists, which also places higher demands on the asynchronous state machine design of the system.

From competing for internet speeds to restructuring rules, technology ultimately serves fairness.

Behind the crashes that occurred when tickets went on sale for large concerts lies a problem of "extreme supply-demand imbalance" that cannot be easily solved with traditional expansion technology. With 40,000 physical seats facing the demand of 400,000 people, even if the server's computing speed reaches the speed of light, 90% people are still destined to be unable to obtain tickets.

In a "first come, first served" game, scalpers who control high-frequency scripts and cloud proxy resources have an overwhelming asymmetric advantage, and system architects are forced to devote a lot of energy to dealing with the sudden surge of traffic that is almost impossible to completely prevent.

The implementation of real-name registration and random selection represents a shift in the approach from a "hard-hitting infrastructure arms race" to a "redesign of game rules and software architecture." It resolves lock contention in the backend database through asynchronous queuing, eliminates the time advantage of bots through random distribution, and further deprives the second-hand market of liquidity through identity-based binding.

The next time you participate in a real-name lottery and calmly fill out your application, you might as well reflect on the system evolution behind it: the best engineering architecture is often not about blindly piling up hardware performance, but about finding the most suitable rule model to keep the system stable and to protect the most basic fairness for every music lover.

Recommended Posts