4 ms·
Does django-redis block? I'm not sure I'd make a connection from django to anything other than a low latency queue.
by belluchan 13y ago
Does django-redis block? I'm not sure I'd make a connection from django to anything other than a low latency queue.
- conesus 13y agoI think Redis fits your definition of low latency queue. It does in my book, and I run a few thousand concurrent connections to Redis from Django. I also endorse django-redis and use it for caching, pub sub, and various data types. See https://github.com/samuelclay/NewsBlur/blob/master/settings.py#L584-L597 https://github.com/samuelclay/NewsBlur/blob/master/settings.... for my redis configuration. I also use django-redis for caching (which is higher up in that file).
- falcolas 13y agoYes, but then again so do the underlying mysql connections. It does use native python sockets, so gevent.monkeypatch would probably work. Blocking is one of the reasons I use flup and fastcgi - it doesn't matter if one thread of execution blocks; it won't affect any other requests. I've tested this under load with some really gnarly queries, and it works fantastically.