Skip to main content

Architecture Overview

CloudGaming is a peer-to-peer cloud gaming and remote desktop solution that streams Windows applications to browsers with ultra-low latency using WebRTC.

Components

The platform consists of four main components:

Prerequisites

For All Components

  • Node.js 16+ and npm
  • Redis 6+ (for production multi-instance deployment)
  • Git

For Windows Host

The Windows host requires a modern NVIDIA, Intel, or AMD GPU with hardware encoding support.
  • Windows 10 version 1903+ or Windows 11
  • Visual Studio 2019 or 2022 with C++ desktop development workload
  • NVIDIA GPU (NVENC), Intel GPU (QuickSync), or AMD GPU (AMF)
  • FFmpeg with hardware encoding libraries
  • Go 1.19+ (for WebRTC stack)

For Production Deployment

  • Signaling Server: 1-2 GB RAM, websocket support
  • Matchmaker: 512 MB RAM minimum
  • Redis: 256 MB RAM minimum, persistent storage recommended
  • Windows Host: 4+ GB RAM, dedicated GPU, Windows Server or Desktop

Deployment Order

1

Deploy Redis

Set up Redis first as both the signaling server and matchmaker depend on it.
2

Deploy Signaling Server

Deploy the WebSocket signaling server that coordinates WebRTC connections.See Signaling Server Deployment
3

Deploy Matchmaker

Deploy the matchmaker service for host registration and client assignment.See Matchmaker Deployment
4

Build and Run Windows Host

Compile the C++ host application and configure it to connect to your signaling and matchmaker services.See Host Setup
5

Deploy Client

Host the static HTML client on any web server or CDN.See Client Deployment

Production Architecture

For production deployments, consider this setup:
  • Multiple Signaling Servers: Scale horizontally behind a load balancer, using Redis pub/sub for cross-instance communication
  • Matchmaker: Single instance or active-standby for high availability
  • Redis: Managed Redis with persistence and automatic failover
  • Windows Hosts: Multiple hosts in different regions for load distribution
  • Client: Served via CDN (Cloudflare, Vercel, etc.) with HTTPS

Environment Configuration

Key environment variables used across components:
All services support .env files for configuration. See individual deployment guides for complete variable lists.

Quick Start (Local Development)

For local testing, you can run all components on a single machine:

Security Considerations

Before deploying to production:
  • Change HOST_SECRET to a strong random value
  • Enable WSS (WebSocket Secure) by setting REQUIRE_WSS=true
  • Configure ALLOWED_ORIGINS to restrict client origins
  • Use HTTPS for the matchmaker API
  • Consider enabling JWT authentication with ENABLE_AUTH=true
  • Set up firewall rules to protect Redis

Next Steps