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

Use Daphne for HTTP/2 with ASGI instead of Gunicorn #2510

Open
Andrew-Chen-Wang opened this issue Mar 27, 2020 · 3 comments
Open

Use Daphne for HTTP/2 with ASGI instead of Gunicorn #2510

Andrew-Chen-Wang opened this issue Mar 27, 2020 · 3 comments

Comments

@Andrew-Chen-Wang
Copy link
Contributor

Description

If you track #2506, I've implemented ASGI + Websocket support. Before, in order to use HTTP/2. you would need to use Django channel's methodology to get faster speeds because then you'd want to be using Daphne, which is officially developed by Django.

Rationale

Faster speeds because sending in binary, and it's based on "Google’s SPDY Protocol (originally designed to speed up the serving of web pages). It was released in 2015 by the Internet Engineering Task Force (IETF)."

Use case(s) / visualization(s)

Less need for configuration. Implements #2506 and would actually lessen the number of dependencies there, too.

@wadkar
Copy link
Contributor

wadkar commented Apr 11, 2020

This assumes that uvicorn/asgi is front facing the user in production? I always imagined adding an nginx frontend to handle HTTP/2 (and SSL) termination for production deployment. Is this issue not relevant in that use case?

@Andrew-Chen-Wang
Copy link
Contributor Author

Andrew-Chen-Wang commented Apr 12, 2020

Unfortunately, Gunicorn + Uvicorn does not support HTTP/2. Daphne replaces the unicorns entirely as a WSGI OR an ASGI. Nginx has nothing to do with this; it’s parallel to Traefik as both are load balancers.

We apparently replaced nginx with Traefik due to security issues with Docker, so... yea. I’d recommend against it.

@wadkar
Copy link
Contributor

wadkar commented Apr 12, 2020

Thanks, traefik is an added component increasing operational complexity but that's fine.

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

No branches or pull requests

3 participants