Channel- Can I dynamically adjust the amount of workers?

37 views
Skip to first unread message

Dennis Kao

unread,
Jun 3, 2017, 5:10:49 AM6/3/17
to Django users
I'm trying to use Channel on my chat app & APNs(Apple Push Notification service), I'm planning to use 

python
manage.py runworker --only-channels = apns

but the APNs will cost lots of time waiting for response and could receive bunch of message at same time, but it didn't cost much time on operation; so, it would be nice if it could automatically increase worker if current worker for this Channel is busy, and close if the worker is finished.

or, is my concept wrong and there's a better way to accomplish the APNs service ? sorry for my english grammar, but this issue is bothering me for a week and I couldn't find any solution. 

thanks for any help.

Andrew Godwin

unread,
Jun 3, 2017, 1:41:10 PM6/3/17
to django...@googlegroups.com
Hi Dennis,

You can scale the number of workers using something designed for that sort of auto-scaling - you just need an image that runs a worker and something that knows how to launch and stop those images on whatever platform you're using (AWS, Google Cloud, Kubernetes, Docker, Nomad, etc.). It's not something built into Channels as it's a problem better solved by a dedicated tool.

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/d1a0a6b3-5865-4b61-ad36-321ab2846c17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages