-
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
Allow configuring Max Frame Size in Vert.x HTTP Client #5036
Comments
Similar to what we decided about MAX_THREADS, timeouts, and so on, we might want to make all HttpClient(s) compliant to a common baseline. Besides making the Max Frame Size configurable (as suggested), is there any consequence to provide a default higher limit? |
can you describe what kind of frame we are talking about ? I'm assuming it is WebSocket, can you show some code that reproduces the behaviour to get an idea ? |
Thank you for your response. Unifying defaults with other clients sounds like a great idea. @vietj Yes, it is WebSocket and sorry, I forgot to attach the full stack trace in the issue:
On top of that, I was able to create a simple reproducer: client.configMaps().withName("large-configmap").watch(new Watcher<ConfigMap>() {
@Override
public void eventReceived(Action action, ConfigMap resource) {}
@Override
public void onClose(WatcherException cause) {}
}); The used ConfigMap can be found here. |
There's not much risk as long as we also make appropriate changes to the max message size as well. This does appear to warrant an upstream kubernetes issue as they should be able to provide guidance on the max frame, and possibly message size as well. My best guess is that they simply default all frames to be final and transmit whatever is provided fully rather than to break the message up into smaller frames: https://github.com/kubernetes/kubernetes/blob/ad18954259eae3db51bac2274ed4ca7304b923c4/vendor/golang.org/x/net/websocket/hybi.go#L252 - so we'll need similar settings for max frame and max message. Jetty appears to have a similar issue with large frames, but there's no indication of why the message is not received without turning up the logging - that is because both jetty (defaulting to 64KB) and vertx enforce a max message length above the max frame length. That is expressed as an exception that is passed to our websocket listener - which just logs at a debug level and starts a reconnect Line 46 in b3af4a7
We probably want this at an info or warn instead so that this case is not silent. We're also assuming that the exception is a terminal state - but that doesn't appear to be the case at least for vertx. We'll need to improve our handling of simply assuming that we can reconnect - if it's not a connection related problem, we need to terminate instead. |
also updating frame / message limits
also updating frame / message limits
also updating frame / message limits
Is your enhancement related to a problem? Please describe
In some cases, it is necessary to transmit larger amount of data via the K8s Client. The particular use case for this is an Operator with a large CR. E.g. in the Keycloak Operator, we are seeing a lot of error messages like:
This is not happening with e.g. OKHttp Client. However, Quarkus and the Operator SDK is moving to Vert.x HTTP Client, so using Vert.x will be inevitable.
Describe the solution you'd like
Max Frame Size needs to be configurable.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: