GithubHelp home page GithubHelp logo

Adding GameServerSet Metric about agones HOT 8 OPEN

Reasonably avatar Reasonably commented on September 22, 2024
Adding GameServerSet Metric

from agones.

Comments (8)

Kalaiselvi84 avatar Kalaiselvi84 commented on September 22, 2024

@Reasonably, We're looking into adding this feature in a way that won't make things more expensive or complex. We're also thinking about showing updates at the fleet level. Can you please check if this requirement is similar to #2817?

cc: @markmandel @roberthbailey

from agones.

markmandel avatar markmandel commented on September 22, 2024

Good questions @Kalaiselvi84

To that point, if we had metrics for each GameServerSet we hit cardinality explosion, and that would be bad - but to the point of what you want, some metric based on Fleet scale out guage metric would probably also work?

from agones.

Reasonably avatar Reasonably commented on September 22, 2024

@Kalaiselvi84 Thank you for sharing a good feature, which is similar to my requirements.

However, I wanted to understand the situation more precisely.
For example, when you update the game version of the fleets that are serving the game, it is possible to determine if the update of those fleets is complete with that feature.
However, if the update strategy is currently set to an inadequate value (small surge, unavailable) for incoming allocate requests, the update may take longer than scheduled. In this case, simply whether or not the update is complete is not enough. So if �I can visually see how gameserverset's allocated, ready, and desired have changed, it will greatly help me find the right strategy.

@markmandel
The reason I �wrote this issue is because I expected the cardinality would not be high. gameserverset essentially takes a form very similar to fleet, and fleet is already exposing metrics.
When a fleet is updated, a new gameserverset is created and the existing gameserverset will be disappeared , so I anticipated that the cardinality would increase linearly. And as I know, there is no labels about gss in fleet gauge metric. Is there anything I might be misunderstanding?

from agones.

markmandel avatar markmandel commented on September 22, 2024

For example, when you update the game version of the fleets that are serving the game, it is possible to determine if the update of those fleets is complete with that feature.

I would suggest reading the ticket in it's entirety - what "complete" means with a rollout can be tricky, so we outlined a few use cases with that ticket.

But what I'm hearing here is - exposing rollout state specifically through metrics is not a requirement of this ticket?

@markmandel The reason I �wrote this issue is because I expected the cardinality would not be high. gameserverset essentially takes a form very similar to fleet, and fleet is already exposing metrics. When a fleet is updated, a new gameserverset is created and the existing gameserverset will be disappeared , so I anticipated that the cardinality would increase linearly. And as I know, there is no labels about gss in fleet gauge metric. Is there anything I might be misunderstanding?

Yes, but metric labels don't necessarily go away immediately from the metric storage - and Fleet can be relatively high cardiality (depending on how you use it), so n number of GameServerSets per Fleet, whenever you do an update makes it increase 2 times for each update -- so it can be a lot. It seems like a decent risk, when it's likely we can resolve this in a different way.

from agones.

Reasonably avatar Reasonably commented on September 22, 2024

@markmandel I already read the ticket entirely. The requirement of this ticket was to have the desired, current, and allocated statuses of gameserversets created during the rollout process reported as gauge metrics.
If feature #2817 is applied and the current state of the fleet is exposed through metrics, it would be possible to determine the completion of the rollout through these metrics. However, this approach would not enable detailed analysis after the rollout in the event of delays during the rollout process.

I thought it would not be a sigificant issue to have gss metric that have cardinality of n times the number of fleets. Because some user may find 5 fleets sufficient, while others might use up to 100 fleets.
And each user may have different strategies for version updates and allocations. So, I think that being able to visually see the update process after it has been completed is considered a significant advantage. What about optionally exposing the GSS metrics?

from agones.

markmandel avatar markmandel commented on September 22, 2024

We were chatting about this offline, and wanted to come back to it - I'm wondering if we have a metrics that was more of a gauge of agones_fleets_gamserverset_count with the label of the Fleet name.

Then we don't hit cardinality explosion, but if you look at the number, you know if it's 1 there's no rollout, and if it's > 1 you know it's still rolling out / new versions are in flight.

WDYT? Seems like it would be useful!

from agones.

markmandel avatar markmandel commented on September 22, 2024

I'm also wondering if we could instead / additionally actually expose a percentage (agones_fleet_rollout_percent ?) of rollout that has happened to the active GameServerSet over the Fleet - and do that as a Gauge with a Fleet label. I think this would be doable and probably more inline with what you are looking for.

Does that make more sense?

from agones.

markmandel avatar markmandel commented on September 22, 2024

@ashutosji have a look and see what you think,

Some resources to look at:

https://github.com/googleforgames/agones/tree/main/pkg/metrics (this is where we calculate our aggregate metrics)

Grab all GameServerSets for a Fleet

func ListGameServerSetsByFleetOwner(gameServerSetLister listerv1.GameServerSetLister, f *agonesv1.Fleet) ([]*agonesv1.GameServerSet, error) {

How we get which GameServerSet is "active":

active, rest := c.filterGameServerSetByActive(fleet, list)
// if there isn't an active gameServerSet, create one (but don't persist yet)
if active == nil {
loggerForFleet(fleet, c.baseLogger).Debug("could not find active GameServerSet, creating")
active = fleet.GameServerSet()
}

func (c *Controller) filterGameServerSetByActive(fleet *agonesv1.Fleet, list []*agonesv1.GameServerSet) (*agonesv1.GameServerSet, []*agonesv1.GameServerSet) {

So the logic would be - create a percentage value (integer) based on the active GameServerSet's Current count vs the Fleet's desired count (I think that math works).

from agones.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.