-
Notifications
You must be signed in to change notification settings - Fork 20
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
UI (almost) endlessly reloads, when running containerized from Kubernetes cluster of several pods #19
Comments
My quick guess is that the ingress/loadbalancer in your K8s clusters needs to be configured for session affinity aka sticky sessions. This is what start.vaadin.com generates for Spring Boot apps, something similar might work in your setup (I have never used Okteto).
|
Unfortunately, the change you suggested seems to not fix the issue. I initially didn't think, indeed, of the Docker/Kubernetes files provided by SpringBoot-based skeletons created on So that, at the end, the issue root cause seems more general and not only related to Quarkus or Spring Boot support. Here below are URLs serving UIs showing this wrong behaviour, and whether it's within:
Okteto is just a platform allowing to deploy easily to a Kubernetes cluster in the cloud, especially for basic testing purpose with a free pricing. |
No need to create a separate issue, the team can move the issue to Flow repository if they find some issue to work with from here. I still believe this is an issue in cluster configuration. I quickly used browser inspector and curl against your deployments and it looks like the session cookie changes on every request, even if you provided the session cookie that the server provides in previous request. So either the request goes to a different node on each request (round robin instead of session affinity) or the cookie is dropped by the front proxy. |
Here is the output with curl. With properly working setup, the second request shouldn't set the cookie anymore:
|
Yeah, it is round robin. If you make a third request with the initially returned cookie, then it works, but naturally browser then thinks that the session is expired and reloads. |
My K8s skills are not at top level, I'll ask if some of our experts could some time to build a working setup for Okteto. |
Description of the bug
Despite one of the Quarkus advantages is to deploy and run natively in cloud applications packaged as containerized Docker image, it appears that the Vaadin integration of Quarkus and/or this starter sample is not ready for this purpose.
Indeed, whereas there is no issue when running it packaged as Docker image deployed to a single-pod/replica Kubernetes cluster, if it's deployed to a multi-pods/replicas one, the UI (almost) endlessly reloads so that it's obviously not usable at all.
"almost" means that, sometimes, the reload loop stopped and the last load completes fine.
Expected behavior
UI should be usable and loads fine, without such endlessly reloading, whatever the number of pods/replicas of the Kubernetes cluster, like it's the case for just 1:
Deploy directly and quickly on Okteto 🟢 working Dockerized sample (
1-dockerized-pod
branch of my fork):Minimal reproducible example
Deploy directly and quickly on Okteto 🔴 failing Dockerized sample (
2-dockerized-pods
branch of my fork):Versions
The text was updated successfully, but these errors were encountered: