4 ms·
Check out the techempower framework benchmarks. Netty can do over a million http responses per second on a reasonable machine. On Linux it uses an epoll native
by shouldbworking 9y ago
Check out the techempower framework benchmarks. Netty can do over a million http responses per second on a reasonable machine.
On Linux it uses an epoll native driver and is asynchronous. The framework makes it possible to write proxies in a few lines.
If you want to beat netty by a significant margin you'll probably need to use kernel bypass
- jithesh 9y agoC++ 17 Networking TS is based on ASIO. It will be very interesting if netty performs better than ASIO based code for the same task.
- shouldbworking 9y agoThey both use epoll underneath. Netty will likely perform better because it has a robust thread pool implementation.
- jithesh 9y agoWould suggest to look at how thread pooling works in ASIO before making conclusions.
- matthewaveryusa 9y agoASIO does all that. And it compiles to machine code. What you're basically trying to argue is a well-written C++ application will be slower than a well-written java application. That's not going to happen -- at best they will be the same performance.
- shouldbworking 9y agoI was trying to say in a nice way that it's unlikely you've created something as fast as netty because a lot of people spent a lot of time optimizing it. Netty is also a lot easier to extend and more portable
- tyingq 9y agoNetty certainly has a more impressive list of projects using it in real-world high-volume scenarios. That's probably what wins in this case...enough high volume end users such that you've gotten enough edge cases to tweak the software and iron out bugs. If I had to pick something in the C/C++ space to implement a custom proxy, I would probably stick to something where I could find a similar list of established high volume real world users. Facebook's Proxygen, or some customized HAProxy maybe.