Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(allocation): maxMatches limit to 100 #655

Merged

Conversation

hspedro
Copy link
Collaborator

@hspedro hspedro commented Jan 8, 2025

Some games might choose to run larger pod resources and increase number of matches running in each room/instance, thus increasing from 30 to 100. The limit in the max matches is useful so configuration stays in a sane number to help in autoscaling and roundings.

@hspedro hspedro requested a review from reinaldooli January 8, 2025 12:41
@hspedro hspedro force-pushed the fix/increase-max-matches-limit branch from f4e828e to 30ae1f1 Compare January 8, 2025 12:42
Some games might choose to run larger pod resources and increase number
of matches running in each room/instance, thus increasing from 30 to 35.
The limit in the max matches is useful so configuration stays in a sane
number to help in autoscaling and roundings.
@hspedro hspedro force-pushed the fix/increase-max-matches-limit branch from 30ae1f1 to ae587b8 Compare January 8, 2025 14:20
@reinaldooli reinaldooli merged commit 5f7ed06 into feature/multiple-matches Jan 8, 2025
6 checks passed
@reinaldooli reinaldooli deleted the fix/increase-max-matches-limit branch January 8, 2025 16:34
reinaldooli added a commit that referenced this pull request Jan 22, 2025
* feat: add occupied slots to game rooms api (#641)
* feat: add occupied slots to game rooms api
* fix: rename api parameter
* fix: failing tests
* chore: upgrade and remove some dependencies (#644)
* chore: upgrade and remove some dependecies
* feat: allow maestro to deal with multiple matches per game server (#646)
* feat: allow maestro to deaul with multiple matches per game server
* fix: removing cooling status
* feat: add new metrics (#649)
* feat: add new metrics
* fix: metrics reporter tests
* fix: protobuf linter offenses
* fix: update buf dependencies before running linter
* fix: add max validation to minFreeSlots fields
* feat: removing unused field minFreeSlots
* chore: update dependencies
* fix: project dependencies
* chore: upgrading go version on CI
* chore: upgrade docker image for build step
* fix: backward compatibility with exiting schedulers
* fix: linter offenses
* fix: adding default match allocation configuration when not provided
* fix: missing match allocation configuration
* feat: create simulation service
* fix: missing license headers
* fix(policy): compute desired number of matches before rooms (#654)
If we first divide the number of running matches per maxMatches
we might end up with a number between 0 and 1, which is quirky
when using math.Ceil because it would propagate the error to when
computing number of desired rooms. To simplify and fix this, instead
we now compute how many matches is the desired and then convert
the final number to the amount of rooms/instances/pods needed to
provide this number of matches:

1. How many running matches we have?
* Get the value from the redis: scheduler:<scheduler_name>:occupancy
2. How many matches do we need to have based on readyTarget?
* Divide running matches by 1 - readyTarget
3. How many game rooms are needed to provide this amount of matches?
* Get the desired number of matches and divide by the max number of matches
per room as defined in the scheduler

* fix(allocation): maxMatches limit to 35 (#655)
Some games might choose to run larger pod resources and increase number
of matches running in each room/instance, thus increasing from 30 to 35.
The limit in the max matches is useful so configuration stays in a sane
number to help in autoscaling and roundings.

* fix: setting running matches when not given
* fix: adding transition from unready to active
* fix: adding transition from occupied to active
* fix: multiple matches status calculation
* feat: report metric with scheduler max matches
* fix: sync scheduler before sending metrics

---------

Co-authored-by: Pedro Soares <[email protected]>
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.

2 participants