Skip to content

Target Strategy Adapter

Strategy adapters select which backend server to send each player to from the discovered targets.

Always selects the first available target.

[target_strategy]
adapter = "fixed"

Fills servers to capacity sequentially.

[target_strategy]
adapter = "player_fill"
[target_strategy.player_fill]
field = "players" # Metadata field containing player count
max_players = 50
# Optional: Filter by domain and metadata
[[target_strategy.player_fill.target_filters]]
server_host = "lobby.example.com"
meta = { type = "lobby" }
[[target_strategy.player_fill.target_filters]]
server_host = "survival.example.com"
meta = { type = "survival" }

How it works: Selects the fullest server below max_players capacity.

Player count source: The field metadata must be provided by the discovery adapter (static in Fixed, dynamic in gRPC/Agones).

Custom gRPC service for complex routing (region-based, skill-based matchmaking, queue systems, etc.).

[target_strategy]
adapter = "grpc"
[target_strategy.grpc]
address = "http://strategy-service:3030"

See Custom gRPC Adapters for implementation examples.