Creative case study
Remote Gaming Server (RGS) Architecture
A complete blueprint of an enterprise iGaming backend system: from the Seven-Layer Model and 48ms game transaction loops to GLI compliance and scaling pipelines.
Creative case study
A complete blueprint of an enterprise iGaming backend system: from the Seven-Layer Model and 48ms game transaction loops to GLI compliance and scaling pipelines.
Client
Internal Research & iGaming Infrastructure Reference
Role
Backend Architect
Year
2026
Discipline
System Architecture
Designed a certified, enterprise-grade RGS supporting 50,000+ concurrent players with a P50 transaction latency under 48ms and a 99.97% uptime SLA.
The hero image is loaded from the MDX coverImage field. Replace the demo URL with your own gameplay capture, PixiJS canvas screenshot, or rendered artwork.
< 48ms
P50 Latency
99.97%
Uptime SLA
50x Spike
Peak Capacity
A Remote Gaming Server (RGS) is the central nervous system of any regulated iGaming operation. It is not simply a server that hosts games — it is a distributed system of specialised microservices that simultaneously manages game logic execution, Random Number Generation (RNG), transaction processing, player session integrity, regulatory compliance, content distribution to 300+ providers, and real-time analytics across millions of concurrent players.
Without a certified, enterprise-grade RGS, an operator cannot obtain a gambling licence in any major regulated jurisdiction. The RGS is what regulators audit, what testing labs certify, and what ultimately determines latency, uptime, fraud protection, and GGR growth ceiling.
| KPI / Metric | Value |
|---|---|
| Global iGaming GGR (2024) | $78.7 billion |
| Projected GGR (2027) | $112 billion+ |
| RGS Market Size (2027) | $2.5 billion |
| RGS Market CAGR (2024–2027) | 12.3% |
| Mobile as Primary Channel | ~80% of all sessions |
| Average Games per Top Aggregator | 2,400+ |
| Full Game Round Trip (P50) | < 48 milliseconds |
| Achievable Platform Uptime SLA | 99.97% (< 2.5 hr/yr) |
| Peak Traffic Spike Capacity | 50× normal volume |
| Redis Cache Hit Rate (peak) | 98% |
| Kubernetes HPA Scale Time | 45–90 seconds (cold start) |
| P99 Latency Target | < 80 ms globally |
An enterprise RGS is a distributed system of specialised microservices, each responsible for one critical function, all operating in concert at sub-50ms speeds.
| Layer | Name | Technologies | Responsibility |
|---|---|---|---|
| L1 | Client & Delivery | WebSocket REST API HTML5 SDK iOS Android | Player-facing interface. All game logic stays server-side; client renders visual output only. |
| L2 | API Gateway & Security | Kong JWT Auth Rate Limiting WAF Cloudflare DDoS | First line of defence. Validates tokens, enforces rate limits, terminates SSL, and routes requests. |
| L3 | Core Game Services | RNG Engine Game Logic Session Manager Bonus Engine Odds Service | Heart of the RGS. Processes bets, invokes RNG, applies math models, tracks session state. |
| L4 | Wallet & Transactions | ACID Transactions Multi-Currency Crypto Support AML Hooks | Debits bets and credits wins atomically. Supports fiat, multi-currency, and crypto at the abstraction layer. |
| L5 | Cache, Queue & Events | Redis Cluster Apache Kafka RabbitMQ Event Streaming | Redis serves sessions in <1 ms; Kafka decouples analytics/compliance from the core game path. |
| L6 | Data Persistence & Analytics | MongoDB PostgreSQL ClickHouse Elasticsearch TimescaleDB | Immutable game logs, financial records, high-speed analytics, and regulator-accessible audit data. |
| L7 | Cloud Infra & Observability | Kubernetes Docker AWS/Azure Multi-Region Grafana Prometheus ELK | Active-active multi-region deployment for 99.97% uptime SLA. Full observability stack. |
A monolithic RGS is a single point of failure — if the billing module crashes, all games go down. Microservices isolate each function (RNG, wallet, session). One module can fail, be updated, or scaled independently without touching any other. This architecture is non-negotiable for a 99.97% uptime SLA across regulated markets.
Database queries take 5–20ms each. For a single game round needing 3–5 lookups, that is 75ms before any game logic runs. Redis serves the same data in under 0.5ms from in-memory storage. At 50,000 concurrent sessions, this difference separates a functional platform from an unusable one.
The core game transaction must complete in under 10ms. Analytics, fraud detection, and compliance logging are important but not time-critical. Kafka decouples these: the transaction commits instantly, and downstream processes consume the event stream asynchronously — so they never block a player's game round.
UKGC and MGA require game logs to be immutable, tamper-evident, and accessible for independent audit at any time. A separate PostgreSQL instance with write-only access from the game engine (no UPDATE, no DELETE) ensures a forensically sound audit trail — a certification prerequisite in most tier-1 jurisdictions.
A single game round — from the moment a player clicks Spin to the moment the result appears on screen — involves seven distinct technical operations across three infrastructure layers.
| Step | Timing | Operation | Technology | Detail |
|---|---|---|---|---|
| 1 | 0–1 ms | Player Initiates Bet | WebSocket / TLS 1.3 | Player clicks Spin. Signed, encrypted bet payload sent over persistent WebSocket. Payload < 2 KB compressed. |
| 2 | 1–3 ms | API Gateway Auth & Routing | JWT / Redis / Kong | JWT validated against Redis session (<0.5 ms). Account checked for limits/suspension. Request routed to Game Logic service. |
| 3 | 3–8 ms | Wallet Debit & Balance Lock | ACID Transaction / PostgreSQL | Bet amount debited atomically before RNG is invoked. Optimistic locking prevents concurrency issues. |
| 4 | 8–15 ms | RNG & Game Logic Execution | CSPRNG / Math Engine | Certified CSPRNG generates random seed. Math engine applies game model (RTP, volatility, bonus triggers). SHA-256 round hash generated. |
| 5 | 15–22 ms | Win Calculation & Wallet Credit | ACID Credit / Bonus Engine | Win amount calculated and wallet credit committed atomically. Jackpot/bonus triggers dispatched asynchronously. |
| 6 | 22–30 ms (async) | Compliance Logging & Event Stream | Kafka / Write-only PostgreSQL | Immutable round record written (player ID, bet, RNG seed hash, outcome, timestamp). Kafka publishes to analytics/fraud queue. |
| 7 | 30–48 ms total | Result Delivered to Player | WebSocket / CDN Edge | Game result payload returned over WebSocket. Client renders animation. CDN edge serves static assets. |
Both the bet debit and win credit are committed in the same ACID database transaction that records the round result. It is therefore impossible for a win to be credited without the corresponding bet being recorded, or for a bet to be deducted without a valid round result being persisted. This design eliminates all double-spending and fund-loss scenarios.
Every bet request carries a unique idempotency key generated client-side. If a network interruption causes the client to retry the same request, the RGS recognises the key and returns the already-computed result rather than processing a duplicate round — preventing any possibility of charging a player twice for the same spin.
Session state is persisted in Redis before the bet is confirmed. If connectivity is lost mid-round:
The Random Number Generator is the most scrutinised component of any RGS. It is the mathematical proof that a game is fair — that outcomes cannot be predicted, manipulated, or biased. Every regulated jurisdiction requires an RGS's RNG to be independently tested and certified before a single game round can go live.
| Certification Body | Reach | Key Markets | Testing Scope |
|---|---|---|---|
| GLI — Gaming Laboratories International | 475+ jurisdictions | UKGC, MGA, AGCO, most major markets | 41 statistical tests + full source code review. Widest global acceptance. |
| BMM Testlabs | 300+ regulatory authorities | Australia, Asia-Pacific, Europe | Math model validation, RTP verification, complex system testing. |
| eCOGRA | Ongoing (monthly testing) | Online-focused, player-trust markets | Issues "Safe and Fair" seal. Continuous compliance rather than one-time certification. |
| iTech Labs | 140+ jurisdictions | APAC, Australia, New Zealand | Strong in online poker RNG testing; full statistical and source code testing. |
Compliance is not a checkbox. Each regulated jurisdiction has specific, technically-detailed requirements that must be built into RGS architecture from Day 1 — not retrofitted later.
| Regulator | Full Name | Key RGS Technical Requirements | Top Mandates |
|---|---|---|---|
| UKGC 🇬🇧 | UK Gambling Commission | Strictest globally. 5-year immutable log retention, 24-hour audit access. GamStop self-exclusion at wallet level. RTP displayed pre-session. Affordability checks on deposit velocity. GLI or BMM certification mandatory. | 5-yr logs, GamStop, RTP display, affordability checks, GLI cert |
| MGA 🇲🇹 | Malta Gaming Authority | Most internationally recognised B2B licence. KYC verified before first game round. Real-time transaction reporting to MGA system. Configurable deposit limits, reality checks, cooling-off periods. MGA-approved lab certification required per game. | Real-time reporting, pre-bet KYC, reality checks, MGA lab cert |
| AGCO 🇨🇦 | Ontario — Canada | Data residency: player data on Canadian or US soil. GameSense self-exclusion integration. Bonus metadata transparency requirements. Marketing suppression for registered problem gamblers. High-velocity deposit intervention flows. | Canadian data residency, GameSense, bonus transparency |
| Spelinspektionen 🇸🇪 | Sweden | Weekly deposit limits (default 5,000 SEK/week). Session time tracked and displayed. Mandatory 24-hour break after extended play. Welcome bonuses for casino prohibited; RGS must block non-compliant promotional mechanics. | Sweden limits, mandatory breaks, bonus restrictions engine |
| DGOJ 🇪🇸 | Spain | Pre-approval of all game content before activation. Live register of approved games in RGS. AML reporting: single tx > EUR 2K, daily cumulative > EUR 10K. Player identity verified before game loads (not just before deposit). | Pre-approved game register, EUR 2K AML, pre-game ID |
| Curacao eGaming 🇨🇼 | Offshore / Emerging Markets | Most accessible licence for LATAM, APAC, emerging markets. Basic RNG certification (GLI equivalent), standard KYC/AML, player protection minimums. No data residency requirements. | Basic RNG cert, standard KYC/AML, no data residency |
During high-profile sporting events or peak weekend hours, player traffic can spike 50× normal volume in under 60 seconds. An enterprise RGS must absorb this without any degradation.
Every operator faces the decision of whether to license a pre-built RGS or build a custom solution.
More Case Studies
A technical deep-dive into how production iGaming studios store, version, and serve complex game math configurations across operators, jurisdictions, and variants.

An educational compiler project translating academic Computer Science theory into a working plain-English general-purpose compiler that compiles directly to zero-overhead x64 assembly.
A cinematic, AI-driven 'Command Center' featuring intelligent site control, predictive autocomplete, and hardware-accelerated animations built with Next.js 15.