-
Notifications
You must be signed in to change notification settings - Fork 21
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
front end performance consideration for production #267
Comments
Seems like a good idea. Something like this? https://ubiq.co/tech-blog/enable-gzip-compression-apache/ It would be nice to add nginx configuration instructions as well. Are you using uwsgi or gunicorn? |
Hey Adam - yeah that's a great example for apache. For my own testing, I've just been fronting the dev server with nginx. I haven't attempted with wsgi or gunicorn, but that would be even better. The nginx docs have a section I used for configuration - https://docs.nginx.com/nginx/admin-guide/web-server/compression/ - it was pretty straightforward. I've been running the testing via two endpoints - one on the dev server side and the other on the nginx side which serve the same responses. |
Ok nice, I think for this ticket we should specifically target apache, because for nginx to be involved in a production env we would first need to add documentation about uwsgi or gunicorn and that effort would be worth a separate ticket. @aarongundel if you want to tackle a some testing with gzipping on apache that would be great, but I'll try to do it too at some point too. Seems like it would be pretty straight forward to do. |
Gotcha. That sounds good @mradamcox - I'm planning on doing some work with gunicorn/wsgi at some point anyway, so I will circle back on that later. As for apache, I'll try to find some time to test that out. I've been intending to set up a container to test Apache configuration out for a while so this is a good excuse. As part of this Apache testing it'll probably be worth it to test out cache-control policies as well, as those can also make a significant impact on load times. |
Some testing on a staging server, but no luck. The map search page loads in ~16 seconds (dev tools reports [1] https://phoenixnap.com/kb/how-to-set-up-enable-htaccess-apache In my site.conf I added
As per [1], Added AllowOverride in the existing access directive for the static dir
Created a For the content of this file, I tried the content in both [2] and [3], but no difference in the page load times/content. |
@aarongundel @mradamcox I added an example Nginx configuration that gzip compresses static assets for delivery to clients. It's now merged into the master branch. See it here: https://arches.readthedocs.io/en/latest/deployment/serving-arches-with-apache/#configure-nginx Should we close out this ticket then? |
I'm not sure the original idea in this ticket is completely covered yet, but will leave that up to Aaron. The nginx configs look good, though the intro section seems a little fractured. Also, the file name dictates the url so it's a little incongruous to have |
@mradamcox Those are some excellent suggestions. I'll make some refinements shortly! |
describe the issue
We've been doing some testing on front end performance, and it appears that gzipping responses has an (relatively minor, but noteable) impact on response times. It is probably worth mentioning that in a production setting, performance may be improved by gzipping responses (cache policy will also factor, but I haven't tested that at this point). The method to do so varies by the server actually used. My own testing has involved nginx as a reverse proxy to arches.
please add links to existing docs or code (if relevant)
I am guessing this https://arches.readthedocs.io/en/stable/arches-in-production/ page would need to be modified and the page title changed to allow for other production considerations beside the debug variable. I am happy to make an effort here if desired.
which release does this issue concern?
all
The text was updated successfully, but these errors were encountered: