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

Shouldn't nginx be added as a separate container in the web pod? #50

Open
pcm32 opened this issue Jun 25, 2019 · 5 comments
Open

Shouldn't nginx be added as a separate container in the web pod? #50

pcm32 opened this issue Jun 25, 2019 · 5 comments

Comments

@pcm32
Copy link

pcm32 commented Jun 25, 2019

I think that for many production uses NGINX is a better alternative at the front. It should probably be added as a container to the pod where web runs and communicate through a socket or something with UWSGI running on the galaxy container.

@almahmoud
Copy link
Collaborator

Coincidentally, we had a conversation about this earlier today. A potential problem to doing that by default, that @nuwang brought up, is that it might make the setup more dependent on the underlying infrastructure. Perhaps we could add it but have an option in values to choose whether to just use uwsgi or use nginx?

@nuwang
Copy link

nuwang commented Jun 26, 2019

It seems like, with uwsgi, an additional nginx pod may not buy us much: nginx/kubernetes-ingress#143 (comment)
The ingress controller will already be a high end web-server (often already nginx), so using caching headers will be sufficient to get the controller to forward static content. In addition, uwsgi is pretty decent at serving static content - the options have already been set so that uwsgi bypasses the galaxy app and serves the static content directly, but there are probably a few more tweaks we can make.

In particular, we could set cache headers, pre-gzip the content, and cache stat calls, and that should play very well out-of-the-box with any ingress controller. Even higher-end setups could just place the static files in S3 or a CDN, and annotate the ingress controller to use those instead. Perhaps @natefoo could also comment?

@natefoo
Copy link

natefoo commented Aug 7, 2019

I'm not sure why they discarded the idea of uwsgi protocol support in ingress, but yeah, seems that ingress serves most of the role of what we use nginx for in production. It doesn't do static but since uWSGI's offload threads should be on the overhead probably won't be that high to have uWSGI do it.

@pcm32
Copy link
Author

pcm32 commented Oct 5, 2019

What about the configuration that currently is recommended for nginx in a production Galaxy setup? How would you plan to push that through to configure the ingress in an equivalent manner?

@nuwang
Copy link

nuwang commented Oct 6, 2019

@pcm32 Some can be sent in via manual annotations as in this example: https://github.com/galaxyproject/galaxy-helm/blob/d0f9b42b8f6c5e5a6a9c862ffc982a2bbb7c7023/galaxy/values.yaml#L49
but that of course, assumes the ingress controller is nginx.

Others could potentially be configured on the ingress controller itself. That seems like a deployment/ingress controller specific thing?

Are there options you are thinking about in particular?

almahmoud pushed a commit that referenced this issue Nov 5, 2019
Add a link to the documentation page on Galaxy hub.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants