Why Cloud-First Event Check-ins Fail at 10k Scale And How We Built an Edge-First Alternative
If you have ever built an event registration or ticketing app, the default architecture usually looks clean on paper: Attendee shows a QR code on their phone. A scanner app hits a cloud REST API ( POST /api/v1/checkin ). An auth token is verified, PostgreSQL flips checked_in = true , and a 200 OK returns. Total round-trip time: ~180ms. In staging, this works flawlessly. Even with synthetic loads…
If you've ever built an event registration or ticketing app, the usual architecture appears simple on paper. Attendees present a QR code on their phone, which a scanner app sends to a cloud REST API (POST /api/v1/checkin). The API verifies an auth token, updates a database entry with checked_in = true, and returns a 200 OK response.
The round-trip time is approximately 180ms. In testing environments, this function perfectly. Even with synthetic loads of 500 requests per second across several load balancers, everything remains stable. However, during a real production event at a large expo center in Riyadh, within just 40 minutes, 8,000 attendees arrived simultaneously.
Local cellular towers quickly became saturated. The venue's commercial fiber line decreased from 300 Mbps to intermittent 2 Mbps bursts. Latency escalated from 180ms to 9 seconds, gateways began returning 504 Gateway Timeout errors, turnstiles stopped opening, and the physical line stretched out the entrance. This post-mortem explores why cloud-first check-in systems fail under high concurrency and how we redesigned the physical gate stack using edge nodes, SQLite WAL journaling, and passive UHF radio telemetry.
The primary issue arises from the synchronous cloud dependency. When physical gate hardware waits for a network handshake before activating a barrier or thermal print head, network latency directly affects physical throughput. At 200ms per scan, a single lane processes approximately 5 delegates per minute. However, when latency reaches 3,000ms (common when 4G/5G degrades under dense crowds), that lane's throughput drops below 1.5 delegates per minute.
With 20 lanes processing 6,000 delegates arriving between 8:15 AM and 8:45 AM, a queue of over 2,000 people forms within 12 minutes. To ensure zero wait time, the gate controller must never make blocking remote network calls during the transaction. The admission decision must occur solely on local hardware within 10 milliseconds.
To address this, we implemented edge nodes with localized SQLite databases using Write-Ahead Logging (WAL). Instead of thin clients querying a central database, each gate lane runs a hardened Linux edge controller connected directly to the thermal printer and RFID reader via RS-232/Ethernet. SQLite, configured for high-concurrency write operations, stores gate transaction data in a specific format.
The WAL mode decouples writes from reads, allowing writes to append sequentially to a companion .wal file. This decoupling ensures scans commit in less than 4ms, readers do not block writers, and writers do not block readers. Even in the event of a power interruption during a write, SQLite recovery maintains database consistency without corruption.
Another critical aspect is the sub-3-second physical credential issuance. Instead of pre-printing thousands of badges and dealing with lost passes or last-minute changes, we employ on-demand thermal issuance with concurrent RFID encoding. When a delegate scans a QR pass, the local edge controller performs a SQLite check in just 3 milliseconds.
If authorized, the gate controller instantly generates a badge using a direct thermal print head and a near-field UHF antenna. The EPC memory bank within the badge is encrypted with a cryptographically signed token that uniquely identifies the attendee. This process ensures that no two delegates can share or duplicate physical passes, creating secure and efficient badge issuance in under 3 seconds.
Passive UHF radio telemetry replaces manual door scans with UHF overhead portals. These portals operate between 865-868 MHz, broadcasting RF fields as attendees naturally walk through the archway. Passive inlays inside the badges harvest this RF energy, wake up, and backscatter their unique UHF ID up to 8 meters away. The portals utilize dynamic Q-algorithm arbitration to resolve up to 400 tag IDs per second simultaneously.
By recording exact entry and exit timestamps, we calculate genuine session attendance and sponsor booth dwell times without requiring attendees to stop or manually scan. This passive telemetry system eliminates secondary queues formed by manual door scans, streamlining the event experience for attendees and staff alike.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.