Repository navigation
Add regional matchmaking to joinOrCreate() - #418
Open
erikdubbelboer wants to merge 1 commit into
Open
erikdubbelboer wants to merge 1 commit into
erikdubbelboer wants to merge 1 commit into
Conversation
erikdubbelboer
force-pushed
the
rm-lobby-latency
branch
from
November 9, 2026 02:46
7763375 to
af71714
Compare
erikdubbelboer
force-pushed
the
matchmaking_region
branch
3 times, most recently
from
November 9, 2026 09:14
2d66d0c to
11b661d
Compare
erikdubbelboer
marked this pull request as draft
November 18, 2026 08:44
erikdubbelboer
force-pushed
the
matchmaking_region
branch
2 times, most recently
from
November 29, 2026 05:19
10435bf to
a321f49
Compare
Derive each player's matchmaking region from the `CF-IPCountry` and `X-Geo-Region` headers, falling back to the `country` and `region` query parameters. Use `eu-west` when the location is unknown. `joinOrCreate()` takes a new method setting: - `low-latency` searches the player's region, then its configured neighbors in order. - `faster-matchmaking` (the default) does the same, then falls back to any eligible lobby worldwide, including lobbies without a region. If no lobby matches, create one in the player's region. Reject unknown methods. Search one region per query so a closer region always wins. Within a region, pick the fullest lobby, then the oldest, instead of a random one. Store the creator's region on lobbies made by `create()` and `joinOrCreate()`, and expose it as `matchmakingRegion`. `list()` and `joinOrCreate()` filters can match on it. Add a partial index for the regional lookups.
erikdubbelboer
force-pushed
the
matchmaking_region
branch
from
November 29, 2026 06:56
a321f49 to
d287282
Compare
erikdubbelboer
marked this pull request as ready for review
November 30, 2026 03:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Derive each player's matchmaking region from the
CF-IPCountryandX-Geo-Regionheaders, falling back to thecountryandregionquery parameters. Useeu-westwhen the location is unknown.joinOrCreate()takes a new method setting:low-latencysearches the player's region, then its configured neighbors in order.faster-matchmaking(the default) does the same, then falls back to any eligible lobby worldwide, including lobbies without a region.If no lobby matches, create one in the player's region. Reject unknown methods.
Search one region per query so a closer region always wins. Within a region, pick the fullest lobby, then the oldest, instead of a random one.
Store the creator's region on lobbies made by
create()andjoinOrCreate(), and expose it asmatchmakingRegion.list()andjoinOrCreate()filters can match on it. Add a partial index for the regional lookups.