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

Study activation of http2 in nginx to speed up static assets + small images loading #453

Open
alexgarel opened this issue Jan 10, 2025 · 3 comments

Comments

@alexgarel
Copy link
Member

Nginx supports htpp 2.0 which can pipeline small requests.

This can speed up small images and assets loading significantly.

Study how to do that.

Note: we use nginx proxying so we might need to apply this on the proxy as well as on the static serving nginx.

Study also if we can activate it for small images (100px version of products images).

@hangy
Copy link
Member

hangy commented Jan 10, 2025

Study how to do that.

If a nginx version with HTTP2 support is being used, that should be pretty easy. Do note that HTTP2 uses UDP/443, so public facing firewalls may need to be opened. The docs do list some limits that may need to be tweaked after activation.

Note: we use nginx proxying so we might need to apply this on the proxy as well as on the static serving nginx.

Looks like there's no option to enable proxy upstream to use HTTP2. The recommended way seems to be to keepalive the upstream connections instead, which makes sense when you think about it.

Study also if we can activate it for small images (100px version of products images).

I don't know of any way to limit HTTP2 to specific paths. It would be enabled for all resources on the same host.

@alexgarel
Copy link
Member Author

Thank you so much @hangy
Indeed it seems we only need to use http2 on the proxy side, which is great.

@alexgarel
Copy link
Member Author

http2 is activated on images, on ks1 ! (it was activated but not in the right way, so I fixed it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants