Skip to content
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

Investigate the response delay when scaling down to a new pod #32

Open
heruan opened this issue Nov 7, 2022 · 3 comments
Open

Investigate the response delay when scaling down to a new pod #32

heruan opened this issue Nov 7, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@heruan
Copy link
Member

heruan commented Nov 7, 2022

When scaling the app down, new requests are redirected to a new pod and the first request takes a noticeable time to be server (5-7 seconds). We need to investigate why this happens: is it because of how the load-balancing is configured or because that is the first request to the Flow instance on the new pod and it requires some time to be initialized?

@mcollovati
Copy link
Contributor

mcollovati commented Nov 7, 2022

One of the culprits of slowness seems to be PwaRegistry initialization, specifically the icon's generation loop

com.vaadin.flow.server.PwaRegistry       : PwaRegistry initialization took 4480ms

I wonder if Flow can build icons during production build 🤔

@mcollovati
Copy link
Contributor

Flow related issue
vaadin/flow#14606

@mcollovati
Copy link
Contributor

For an application with PWA enabled, adding a http readiness probe pointing at /sw-runtime-resources-precache.js could help to work around the issue.

@heruan heruan added the bug Something isn't working label Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants