-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Thanks for creating an amazing library that makes clustering so much simpler!
Kubernetes has the ability to watch
a given resource. When it is watched, the transfer encoding is set to chunked
, and any updates after the specified version will be sent down in new chunks. This way the node wouldn't have to poll the endpoint every 5 seconds, but could create a long-lived connection to it and then just update whenever new chunks are received. I believe this would allow for node list updates to occur much closer to real-time.
Are there any drawbacks to supporting watch
requests?
Would there be support for a PR implementing this?
If yes, would it make more sense to update the existing Cluster.Strategy.Kubernetes
module or to create a new one like Cluster.Strategy.KubernetesWatched
or something like that?
It seems like the high-level functionality will be exactly the same but more performant. That being said, I don't know when the watch
capability was added to Kubernetes, so there is potential that it would be a breaking change for those who might be on older version. The docs reference watch in version 1.14, but I haven't looked further back than that.