3 ms·
Redis uses a reactive architecture using non-blocking I/O. They fork to get a point-in-time consistent snapshot that can be written to disk. The problem is that
by eldavido 12y ago
Redis uses a reactive architecture using non-blocking I/O. They fork to get a point-in-time consistent snapshot that can be written to disk. The problem is that fork blocks, and while blocked, it stalls the event loop, subjecting incoming requests to stalls.
- xxs 12y agoPretty much this: doing blocking operations in your poller thread is a big no, even if it appears clever. Btw, I am not sure one can call "reactive architecture" if using a single thread.
- fulafel 12y agoIn Unix blocking means going into IO wait. In this case it's just slow when emulated ("paravirtualiuzed") by Xen.