NXWEB - ultra-fast web server based on libev
2011-12-01 23:55:27 GMT
Hi,
What NXWEB offers:
- good performance; see benchmarks at project page
- can serve thousands concurrent requests
- small memory footprint
- multi-threaded model designed to scale
- exceptionally light code base
- simple API
- decent HTTP protocol handling
- keep-alive connections
- non-blocking sendfile support
- modular design for developers
- can be run as daemon; relaunches itself on error
- open source
Limitations:
- no SSL support (yet)
- only tested on Linux
Architecture
Main thread binds TCP port, accepts connections and distributes them among network threads.
Network threads work in non-blocking fashion (using libev) handling HTTP protocol exchange. There should be no need in using more network threads than the number of CPU cores you have, as every thread is very efficient and can easily handle thousands of concurrent connections.
After receiving complete HTTP request network thread finds and invokes application's URI handler. The invocation could happen within network thread (should only be used for quick non-blocking handlers) or within worker thread (should be used for slower or blocking handlers).
Worker threads are organized in pool. Each thread takes new job from queue, invokes URI handler, signals network thread after handler completes the job. If your handler is slow, you need to configure more worker threads.
Numbers of network and worker threads are configured via #define directives.
-----
NXWEB project page: https://bitbucket.org/yarosla/nxweb/
_______________________________________________ libev mailing list libev <at> lists.schmorp.de http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
RSS Feed