The people showing you benchmarks comparing Django to ‘NodeJS’ are comparing apples to oranges. Django is not an asynchronous framework (yet!) so you cannot fairly compare the number of raw requests per second the two handle and present that as evidence one is better than the other. Each one has it’s strengths and weaknesses but Django wins hands down in a number of places. Plus it’s not JavaScript, so that’s one thing Django has going for it!
I’ve had immense success with uvloop
and asyncio
which are much more comparable to NodeJS. Here are some synthetic benchmarks showing it handing over 100,000 requests per second: https://magic.io/blog/uvloop-blazing-fast-python-networking/. I would recommend playing around with asyncio
and aiohttp
to build some small services and benchmark them yourself, you might be surprised at the speed.
Regarding Cython: while some very specific parts of Django could potentially benefit from the speedup Cython would bring we would need to maintain two separate versions: A Cython one and a fallback Python one. This would add a maintenance burden for an uncertain gain and even if you implemented this the raw requests per second Django would reach would not be close to that of an asynchronous framework with the same resources. Typically Django apps are not CPU bound by the Django code itself, and a lot of time is spent waiting on the network for the database or other services.
--
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.
To post to this group, send email to 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/24d4d03d-d9ed-4d7f-9a69-8066846f090e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.