What is the maximum number of channels a selector can select?

I want to know how many channels the maximum selector can handle? I am familiar with general I / O algorithms, but I donโ€™t know in NIOwhether I can use a selector to process (for example) 10,000 sockets. Should you use multiple threads and have a selector in each to handle a certain number of sockets?

While I found this one , he did not address this particular issue.

+4
source share
1 answer

There are no restrictions other than the number of socket descriptors. Some platforms have basic limitations, but NIO works around them with several OS selectors onSelector.

Java 1.4.1, .

?

, , . , , , .

+4

Source: https://habr.com/ru/post/1619967/


All Articles