Comments (7)
There's some question of where this responsibility belongs.
Insofar as implementation, sync.RWMutex
works and maybe even a sync.Mutex
too. Just depends where the hot paths may be.
from agones.
@enocom mind if I edit this ticket to include the full details? Just in case anyone else happens to want to pick this up? (Unless you want to expand this out, since I know you had ideas)
from agones.
@markmandel Please do. I think this issue might be good for first-time contributors, too.
from agones.
Some interesting notes here:
- The health check handler is passed in here
- The actual goroutines are run in the workerqueue. so there is likely opportunity to standardise this across anything that uses a workerqueue.
Final thought - for a readiness check, readiness can be turned on as soon as the WebHook that powers the MutationWebhookConfiguration is ready
from agones.
@enocom did you have some thoughts on how you were thinking of tracking if the goroutines were still active? (or maybe a PR 😁 )
from agones.
I imagine adding a Registrar
, which in functionality would be similar to a sync.WaitGroup
. We pass the Registrar
to anything that starts a goroutine
and upon starting the goroutine
, we maybe call registrar.Inc()
with a corresponding defer registrar.Dec()
for when the goroutine
exits. Then the liveness check could simply query the Registrar
to see if all registered goroutines
are still running.
Thoughts?
from agones.
Works for me. Although the Inc()
, Dec()
and Count()
would need to be threadsafe. I'm assuming a sync.RWMutex
?
Thought - would this be part of a Registrar
, or maybe just part of the WorkerQueue
?
from agones.
Related Issues (20)
- Custom gameserver configuration not working on containerized local SDK HOT 4
- [FeatureRequest]: GameServer can run on aws fargate? HOT 2
- NewSDK configurable 'host' HOT 4
- Document Allocation batching
- JSON Patch in GameServer Controller is Lossy on Int64 HOT 1
- runtime.boundsError from watchGameServer HOT 9
- Agones SDK for Unity Client Server example HOT 9
- SDK Server: Adopt Sidecar Containers HOT 1
- Rust CountsAndLists SDK implementation and conformance tests
- Node.js CountsAndLists SDK implementation and conformance tests HOT 3
- C++ CountsAndLists SDK implementation and conformance tests
- Unity CountsAndLists SDK implementation
- Unreal CountsAndLists SDK implementation
- Counters and Lists: Default Grafana dashboards
- Unreal implementation and conformance tests HOT 1
- Docs: Enhance "Scheduling and Autoscaling" with details on Counts and Lists
- Docs | Integration Patterns: Update Allocating based on GameServer Player Capacity to use Lists
- Docs | Integration Patterns: Update High Density GameServers to use a Counter
- Docs: Do you want a migration guide from Player Tracking to Lists?
- Migrate away from using the generate-groups script from k8s.io HOT 8
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.