Skip to content

feat(grounds-gamemode): give matchmade servers a broker instead of a dialled port - #151

Open
hbrombeer wants to merge 1 commit into
mainfrom
feat/gamemode-nats
Open

feat(grounds-gamemode): give matchmade servers a broker instead of a dialled port#151
hbrombeer wants to merge 1 commit into
mainfrom
feat/gamemode-nats

Conversation

@hbrombeer

Copy link
Copy Markdown
Member

A matchmade server now waits for its matches on match.host.<gameServerName>.start rather than listening on a port the matchmaker dials. Agones names the pod after the GameServer, so the server derives that subject from its own HOSTNAME — which matters because these fleets run portPolicy: None and therefore have neither a Service nor a DNS name, leaving the matchmaker to read the PodIP off the GameServer status.

grpcPort and the matchhost container port stay for one release: a runtime image that has not been rebuilt has no NATS responder, and service-match falls back rather than letting the match form and then silently never start.

Only rendered when matchmaking is enabled, so an ordinary fleet is untouched. Verified with helm template.


Landing order

This is one cutover across seven repos. The order is not cosmetic:

  1. service-match feat/rest-api — serves REST alongside gRPC and pushes matches over NATS with a gRPC fallback. Safe on its own; nothing else may land before it is deployed.
  2. charts feat/gamemode-nats — gives matchmade fleets NATS_URL. Inert until a runtime that reads it ships.
  3. deploy feat/match-nats — gives service-match NATS_URL. Land together with the image bump to the release cut from (1).
  4. grounds-minestom-runtime feat/matchhost-nats — removes the gRPC MatchHost server. Needs a release cut afterwards.
  5. game-bedwars / duel feat/rest-client — REST clients; both also need to repin the runtime released in (4) to actually receive matches over NATS.
  6. plugin-match feat/rest-client — REST client.

Only after every matchmade fleet answers on NATS: set GAMESERVER_GRPC_FALLBACK=false, then delete MatchGrpcService, quarkus-grpc and the MatchHost service block from the contract.

…dialled port

A matchmade server now waits for its matches on
`match.host.<gameServerName>.start` rather than listening on a port the
matchmaker dials. Agones names the pod after the GameServer, so the
server derives that subject from its own HOSTNAME and service-match no
longer has to know where the pod is — which mattered because these
fleets run portPolicy: None and therefore have neither a Service nor a
DNS name, leaving the matchmaker to read the PodIP off the GameServer
status.

`grpcPort` and the matchhost container port stay for one release. A
runtime image that has not been rebuilt has no NATS responder, and
service-match falls back to the old route rather than letting the match
form and then silently never start. Both come out once every matchmade
fleet answers on NATS.

Only rendered when matchmaking is enabled, so an ordinary fleet is
untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant