Comments (8)
Just today I wished there would be another thing we would update when we allocate: The safe-to-evict annotation. This is rather more annoying. For us Ready pods are safe to evict, but Allocated ones aren't.
@zmerlynn - Have we considered allowing Ready game servers to be evicted?
I think there is a race condition here:
- The cluster autoscaler decide to remove a node and evict all pods
- The game server gets allocated and Agones applies the annotation
- The pod gets drained and the allocated game server is shutdown abruptly
With kubernetes being eventually consistent, there isn't a way to guarantee that the cluster autoscaler doesn't decide to evict and remove a node while game servers are being allocated.
from agones.
The only other concern I have is that if as it doesn't appear that we are currently updating the Pod resource when we allocate (source), then this would increase the load on the kubernetes control plane (by requiring an update to a second object in etcd). This could have performance implications on allocation throughput.
from agones.
Would that really be that bad?
Just today I wished there were another thing we could update when we allocate: The safe-to-evict annotation. This is rather more annoying. For us, Ready
pods are safe to evict, but Allocated
ones aren't.
So I guess according your statement, that is also not possible?
from agones.
Would that really be that bad?
It depends on your use case. When agones was first envisioned the common scenario was game sessions would last tens of minutes, so doing a bit of extra work on an allocation wasn't a big deal. However, we now also see use cases where game sessions last tens of seconds and having a high allocation rate is critical.
from agones.
So to the original comment on this post:
Would that really be that bad?
Yes 😄 any extra load affects performance.
That being said, if this is something you want, this is where I would strongly advocate for you building this as a third party controller you could add to your Agones cluster (and please open source it! - we'd be happy to take a listing on the website). If it becomes something that's utilised by a large majority of users then we can consider it for main contribution.
We love our ecosystem projects: https://agones.dev/site/docs/third-party-content/libraries-tools/
And this wouldn't be a complicated controller to write either.
Just today I wished there would be another thing we would update when we allocate: The safe-to-evict annotation. This is rather more annoying. For us Ready pods are safe to evict, but Allocated ones aren't.
@roberthbailey captured the potential race condition perfectly.
But if you want to control eviction, https://agones.dev/site/docs/advanced/controlling-disruption/ is the place to read.
from agones.
@towolf What's your session length? And this is GKE if I remember, right?
Adding safe-to-evict=false
on allocation is infeasible due to the race that @roberthbailey mentioned - the best we could do in that situation is insist on a long terminationGracePeriodSeconds
, but CA by default will ignore tGPS > 10m, so that doesn't entirely close the race. If you're on GKE we might have options to talk about, though - happy to chat on Slack.
from agones.
@zmerlynn We have a wide range of session lengths, some are only a minute, some go on for hours. We kill any gameservers that are still allocated after 24 hours. We have shared "lobby" servers where players meet and can hang out all day. So, I'm not sure if tGPS is suitable for us at all. We're considering somehow shortening the sessions, but they'll never be shorter than 10 minutes.
We are mostly on GKE now but our baremetal contingent is RKE2.
Here's the spectrum:
from agones.
As an FYI, we're working on #3680 to show how to write a small controller to drop into a cluster, to lower the barrier to entry there (the code is remarkably small - you can do it in one main.go).
from agones.
Related Issues (20)
- Helm Param Update: Default to agones.controller if agones.extensions is Missing HOT 2
- RFC: Graduate Counters & Lists (`CountsAndLists` feature flag) to Beta HOT 2
- Update best practices for multi-cluster allocation
- Docs: Update High Available to include more details.
- Configurable Allocator HTTP status codes on failure HOT 6
- Fail CI if a PR updates an example without modifying the version HOT 3
- In-place Agones Upgrades: Testing HOT 2
- Release 1.40.0 HOT 1
- Direct connection to a GameServer/Pod without NAT HOT 14
- [mTLS]: allocator server can not verify client certificate when client certificate auto renew HOT 2
- Refactor simple-game-server
- `make gen-all-sdk-grpc` is ineffective for nodejs HOT 9
- [Docs] Single source of truth for example yaml files HOT 1
- Fleet autoscaler scale down delay HOT 1
- metadata.finalizers: "agones.dev": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writer HOT 1
- Implement Count functions in SDKServer, and write e2e tests HOT 1
- sdkserver: add functionality to remove game server annotations
- sdkserver: add functionality to set multiple game server annotations at once HOT 2
- [e2e] Document the best path for making changes to simple-game-server for e2e tests HOT 1
- Add runAsUser, runAsGroup, and allowPrivilegeEscalation to helm chart for Agones control plane pieces HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agones.