-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to use only http in watch? #4624
Comments
KubernetesClient seems to use http watch if it fails to start websocket initially. What behavior are you observing? |
I use official client works fine. But I use this client got this exception.
|
ok, I manually add an interceptor to drop header "Connection", "Upgrade", then I can use http. |
We should probably look into automatically falling back in case there is a timeout when upgrading to websocket. |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
Another major difference with fabric8 vs client-go / kubectl is the use of websocket watches. There is still a yet to be determined issue we seem to be having with websocket watches not closing properly. It would probably be good to have a mechanism for control whether http or websocket watches are used as it may be applicable in general as well. |
Given the amount of non-deterministic problems in informers related to watches and their underlying websocket connection. And considering that client-go is hard killing the connection after ~15 minutes + jitter (AFAIR), we might want to reverse the current default. i.e. try to acquire an HTTP watch connection or fallback to websocket, since HTTP connections are overall more predictable and consistent for all of the HTTP client implementations. It would also make it easier to create tests. |
It's 5-10 minutes.
Watching some of the progress upstream it's been surprising the lack of support / progress around websockets. So my next step here is to look at adding a config property to control what style watches to use. For websockets I'm hoping we'll get some feedback on how frequently the close issue is happening and with which clients - #5189 (comment) - it could be 5-10 minutes for recylcing websockets is too aggressive and/or we may want to tighten up the 1 minute timeout down in the httpclient layer for okhttp, jetty, and jdk (that just came from the okhttp implementation really. the spec language goes something like "the client may disconnect after a reasonable amount of time after sending close). |
I have some problem using websocket, however using pure http is working well.
Are there any config to set watcher using only http protocol?
The text was updated successfully, but these errors were encountered: