How many live websocket connection can django channels handle?

137 views
Skip to first unread message

John Conner

unread,
Feb 13, 2018, 6:52:56 PM2/13/18
to Django users
I'm working on a project where a user could have up to 10 websocket open at the same time. 2 of the connections will need to send and receive every min or seconds while the rest are not very intensive(one send and receive every 5min to 10 hour). user base could range from 10,000 to 10,000,000.
I could do one websocket per client but the project is 95 percent done and i rather not to change anything IF it's not necessary.
So what are your suggestion, should i change it to one wb per client or django-channels can handle that?

Andrew Godwin

unread,
Feb 13, 2018, 8:33:03 PM2/13/18
to django...@googlegroups.com
What it can handle depends on your setup. If you're using Channels 1, there's potential bottlenecking in the Redis channel layer. Channels 2 is much easier to scale and you can just add more servers as your load demands.

I would suggest reducing your websocket load, but it's your call which is more expensive - more server power or the extra development time needed. There's no baseline "number" that Daphne/Channels can terminate without reference to exact hardware.

Andrew

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/04239fd0-c8a8-41b5-854e-03e539be4d8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages