Skip to main content

Architecture

Overview

Hathora Cloud hosts headless/custom servers at scale for any engine, platform, and game-type in 12+ regions.

When you request a game server instance, our platform dynamically boots it with a unique host and port. Once the match is complete and there are no active connections to the instance, Hathora automatically shuts it down to minimize your compute costs.

In the diagram below, we show a typical integration flow using a matchmaker (most commonly used for games with large player bases). However, you can use any of our common integrations to request server instances on Hathora.

Common game integrations

Request server instances on Hathora Cloud by calling the CreateRoom() API. A room is 1:1 with a match/game session on our platform.

Depending on how your game starts matches/ game sessions, you can use any of the following Hathora match creation workflows:

Matchmaking

When your matchmaker finds a match, it should request a room from Hathora Cloud in a specified region. Your matchmaker will get connection details to the room, which it can share with all matched players. Using the connection details, players can directly connect to the room.

To place players in a more optimal location, use our Discovery Service to get ping times to all Hathora regions.

Lobbies

You can enable player-driven server browsing by using a lobby service to:

  1. Create rooms with private or public visibility
  2. List all active public rooms
  3. Share room codes to join private rooms
  4. Display room metadata
    (i.e. number of active players, map type, etc)

You can either use Hathora's lightweight Lobby Service or integrate with your own.

Auto-join

When a player visits your game, you can automatically place them into a room with available player capacity. If no rooms are available, you can create and place them into a new room. You will need some middleware (e.g. our Lobby Service) to check for available rooms and create new ones.