Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Shyamalp16/CloudGaming/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
The Matchmaking API connects Clients (Gamers) to available Hosts (Gaming PCs) by tracking host availability in Redis. The service automatically manages host lifecycle and enables seamless peer-to-peer connections through WebRTC signaling.Base URL
Authentication
Currently, the Matchmaking API does not require authentication. All endpoints are publicly accessible.Data Model
The service uses Redis to track active hosts with automatic expiration.Active Hosts
Hosts are stored as individual keys with a TTL (Time To Live). If a host crashes or loses internet connectivity, it automatically disappears from the available pool. Redis Key Pattern:host:{hostId}
TTL: 30 seconds (refreshed by heartbeat)
Data Structure:
Status Values
idle- Host is ready to accept new connectionsbusy- Host is currently in an active session
Regions
Supported region codes:us-east-1- US Eastus-west-1- US Westeu-central- Europe Centrallocal- Local/Development
Common Response Codes
Request successful. Response body contains requested data.
Resource not found. For matchmaking, this indicates no available hosts.
Invalid request body or missing required parameters.
Server error occurred while processing the request.
API Endpoints
The API is organized into two main categories:Host Endpoints
Used by the C++ Host application to register and update status:- POST /api/host/heartbeat - Register or refresh host availability
- POST /api/host/status - Update host status
Client Endpoints
Used by Web/Electron clients to find available hosts:- POST /api/match/find - Find available host for matchmaking
Matchmaking Logic
The service uses a simple but effective algorithm:- Receive matchmaking request from client
- Scan Redis for all keys matching
host:* - Filter hosts where
status === 'idle' - Apply optional region filter
- Select a random available host
- Mark host as allocated (prevents race conditions)
- Generate TURN credentials for WebRTC
- Return connection details to client