How Channels and Daphne handle huge HTTP requests?

122 views
Skip to first unread message

Alexander Prokhorov

unread,
Mar 19, 2017, 10:22:23 AM3/19/17
to Django developers (Contributions to Django itself)
Dear Colleagues,

I tried to understand how Channels and Daphne work with single-reader channels in case when there is huge HTTP request. To my surprise I have not found any code in Daphne which works with `body_channel`. The only occurrence of `body_channel` I found is in the test `assert_valid_http_request_message`, but the relevant branch of execution is never triggered during testing.

Could someone clarify where to search?

Andrew Godwin

unread,
Mar 19, 2017, 2:15:27 PM3/19/17
to Django developers (Contributions to Django itself)
Hi Alexander,

I believe Daphne does not yet implement body_channel support for large HTTP requests, just the response version right now. It's on the roadmap, I just need to get round to adding it in. Until then, I would advise not using it for large uploads.

Andrew

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/3254159d-2d04-4b2e-98e0-0386eb59c282%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oskar Hahn

unread,
Mar 23, 2017, 4:32:56 PM3/23/17
to django-d...@googlegroups.com
Hi Alexander,

if you need an asgi-server, that currently supports body_channel, then
you can use https://github.com/ostcar/geiss

Oskar


Am 19.03.2017 um 19:15 schrieb Andrew Godwin:
> Hi Alexander,
>
> I believe Daphne does not yet implement body_channel support for large
> HTTP requests, just the response version right now. It's on the roadmap,
> I just need to get round to adding it in. Until then, I would advise not
> using it for large uploads.
>
> Andrew
>
> On Sun, Mar 19, 2017 at 1:17 AM, Alexander Prokhorov <pro...@gmail.com
> <mailto:pro...@gmail.com>> wrote:
>
> Dear Colleagues,
>
> I tried to understand how Channels and Daphne work with
> single-reader channels in case when there is huge HTTP request. To
> my surprise I have not found any code in Daphne which works with
> `body_channel`. The only occurrence of `body_channel` I found is in
> the test `assert_valid_http_request_message`, but the relevant
> branch of execution is never triggered during testing.
>
> Could someone clarify where to search?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to django-develop...@googlegroups.com
> <mailto:django-develop...@googlegroups.com>.
> To post to this group, send email to
> django-d...@googlegroups.com
> <mailto:django-d...@googlegroups.com>.
> <https://groups.google.com/group/django-developers>.
> <https://groups.google.com/d/msgid/django-developers/3254159d-2d04-4b2e-98e0-0386eb59c282%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-develop...@googlegroups.com
> <mailto:django-develop...@googlegroups.com>.
> To post to this group, send email to django-d...@googlegroups.com
> <mailto:django-d...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAFwN1uo%2B2hG37UQu27%3Dy7d0peZ%2BRKuiufNBTDhJ1pJJ1Sm3-eA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-developers/CAFwN1uo%2B2hG37UQu27%3Dy7d0peZ%2BRKuiufNBTDhJ1pJJ1Sm3-eA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
signature.asc
Reply all
Reply to author
Forward
0 new messages