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

Nginx and Traefik confusion; serving ML model #220

Open
al-yakubovich opened this issue May 29, 2021 · 1 comment
Open

Nginx and Traefik confusion; serving ML model #220

al-yakubovich opened this issue May 29, 2021 · 1 comment

Comments

@al-yakubovich
Copy link

al-yakubovich commented May 29, 2021

Hi! Sorry, maybe it is not the correct place to ask. I went through awesome #tiangolo repos and dockerswarm.rocks as well. But I got confused about what technologies I need to use on top of Flask/FastAPI if I want to serve a ML model.

If I understand correctly I need to use at least:
I. Flask + uWSGI
or
II. FastAPI + Uvicorn with Gunicorn

On top of that I can put Nginx as a reverse proxy (load balancing, caching, security, etc.):
I. Flask + uWSGI + Nginx
II. FastAPI + Uvicorn/Gunicorn + Nginx

My questions:

  1. Do I need to use Traefik on top of that? Or do I need to change Nginx to Traefik if I want to use Traefik?

  2. If I have an application which only accepts POST requests is is recommended to use Nginx and/or Traefik on top of FastAPI + Uvicorn/Gunicorn?

  3. If I will use Tensorflow Serving or other ML serving solutions (Kubeflow, MLflow, Seldon, etc) is it still recommended to wrap up Tensorflow Serving into FastAPI + Uvicorn/Gunicorn + Nginx or/and Traefik?

@guysoft
Copy link

guysoft commented Aug 16, 2021

Hey,

  1. I would use traefik or nginx-proxy on top if you want https. It handles that well
  2. Irrelevent AFAIK
  3. I would seperate if you have the time to write it up. But that would have overhead, and if you want to go quick and dirty its worth just putting it all in a bundle.

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

2 participants