Hi, There's more about how Channels works in the docs and in talks I've given, but the short version is:
* Websockets go into a server called Daphne, which is written in Twisted and so can handle hundreds or potentially thousands of simultaneous connections open at once * Any event on a websocket (connect, message received) is sent onto the channel layer, which is a type of first-in-first-out queue * Django worker processes synchronously take a message from the queue, process it, and then loop back to take another Thus, there are two factors to scaling: * The number of open connections affects how many Daphne instances you run * The throughput of events affects the number of workers you run For example, if you had 10000 clients connecting but sending one message every few minutes, you'd want 10 Daphne instances but only a few workers. If you had 100 clients sending 10 messages a second, you'd only need one Daphne instances but lots of workers. The number of connections Daphne can take depends on a combination of CPU speed and kernel limits; it's not going to be RAM-limited except on very low memory systems. Hope that helps. Andrew On Wed, Mar 1, 2017 at 10:01 PM, Gopal <[email protected]> wrote: > Hello everyone, > I am using django=1.10.5 and channels==1.0.3 in my project. > First i will give you little description about my project so that you all > can understand my question properly. > I am getting latitude and longitude of android device(first user) using > websockes. So that android application is connected to my django > server(second user) through websocket (implemented using channels), and i > am storing all latitude of longitude of all connected android devices using > that app. After that i am sending all those locations to web browsers(third > user). So basically i am taking location from android devices (or from > first user), storing into server's database (or to second user) and showing > those location to web browser (or to third user). They all are > communicating using websocket. Now my question is how many clients or user > can connect to that websocket and does number of connections depend upon > free ports or does it depend on RAM and second question is that can some > one explain in detail from OS perspective that how does django-channel > works ??? > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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/a9cd7ffd-0f69-4aff-b6c2- > 8ae4bf9df091%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/a9cd7ffd-0f69-4aff-b6c2-8ae4bf9df091%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit 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 [email protected]. To post to this group, send email to [email protected]. 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/CAFwN1upsntV_osy6URNxyiJxgx7VxBb1AcVDzaKPNY4HeM0MUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
