Skip to content

Server Coordinator (Overlord)

giongto35 edited this page Aug 31, 2019 · 3 revisions

Introduction

Server Coordinator (or Overlord) is workers pairing and metadata exchanging happens. All workers and users will connect to the coordinator over WebSocket connections.

Development

Find best server for a user session

The main function to pick the most suitable server for a user is at overlord/handlers.go.

  1. Overlord collects all available workers that don't serve game session.
  2. Overlord sends addresses of those workers to clients.
  3. On the Client side, it will test the latency from the list of addresses and sends back to overlord all latencies from that address list.
  4. Overlord picks the most suiltable worker which is the one with smallest latency: