3 ms·
Well, if you're getting into that, you're far enough down into the rabbit hole of optimization that you probably have a reason for being there and some business
by jbooth 16y ago
Well, if you're getting into that, you're far enough down into the rabbit hole of optimization that you probably have a reason for being there and some business specific logic that would drive some of your specific tunings..
I'd generally recommend a selector identifying sockets that are ok for write and then delegating to a caching thread pool to handle actual transferTos. If that select loop becomes your bottleneck, you can of course horizontally scale that and have a set of selectors, striping the register()s across them to get less lock contention and having them all feed into the caching threadpool.