This service is responsible for matchmaking players into games. It is a simple service that takes a list of players and matches them into games based on their skill level.
docker compose up --build- Run the matchmaking service
go run cmd/service/main.go- Run the workload generator
go run cmd/workload/main.go| Name | Description | Default |
|---|---|---|
PRIVATE_ADDRESS |
Private metrics address | :8081 |
GRPC_PROTOCOL |
gRPC protocol | tcp |
GRPC_ADDRESS |
gRPC address | :32023 |
LOG_LEVEL |
slog level | DEBUG |
QUEUE_SIZE |
Size of the matchmaking queue | 25 |
MIN_GROUP_SIZE |
Minimum group size | 10 |
MAX_LEVEL_DIFF |
Maximum level difference | 10 |
FIND_GROUP_EVERY_SECONDS |
Find group every seconds | 1 |
MATCH_TIMEOUT_AFTER_SECONDS |
Matchmaking timeout in seconds | 60 |
# HELP matchmaking_offline Total number of offline players in the matchmaking service.
# TYPE matchmaking_offline counter
matchmaking_offline 4034
# HELP matchmaking_online Total number of online players in the matchmaking service.
# TYPE matchmaking_online counter
matchmaking_online 4200
# HELP matchmaking_total Total number of players in the matchmaking service.
# TYPE matchmaking_total gauge
matchmaking_total{type="added"} 4200
matchmaking_total{type="matched"} 4140
matchmaking_total{type="removed"} 23
matchmaking_total{type="timeout"} 37
- Add players into matchmaking queue
- Delete players from matchmaking queue
- Return match ID and the list of players in the match
- Setup timeout for the matchmaking process
- Configure matchmaking group size
- Get metrics for the matchmaking process
- Make simple API for the service
- Security (authentication, authorization)
- Load balancing and high availability
- Monitoring and Tracing
- Permanent storage and restore after service restart
- How to process next matchmaking for players which can be in session now?