java - Why does Jetty establish many connections when it starts up? -
i've created simple embedded jetty project based on oneconnector example.
when start example see 1 tcp connection in listening state expected see. there quite few tcp connections in established state.
why there, how come there many , used for?
in tcpview see following connections:
java.exe:14536 tcp my-pc:8080 my-pc.tfs.attix5.com:0 listening java.exe:14536 tcp my-pc:56791 localhost:56792 established java.exe:14536 tcp my-pc:56792 localhost:56791 established java.exe:14536 tcp my-pc:56793 localhost:56794 established java.exe:14536 tcp my-pc:56794 localhost:56793 established java.exe:14536 tcp my-pc:56795 localhost:56796 established java.exe:14536 tcp my-pc:56796 localhost:56795 established java.exe:14536 tcp my-pc:56797 localhost:56798 established java.exe:14536 tcp my-pc:56798 localhost:56797 established java.exe:14536 tcp my-pc:56799 localhost:56800 established java.exe:14536 tcp my-pc:56800 localhost:56799 established java.exe:14536 tcp my-pc:56801 localhost:56802 established java.exe:14536 tcp my-pc:56802 localhost:56801 established java.exe:14536 tcp my-pc:56803 localhost:56804 established java.exe:14536 tcp my-pc:56804 localhost:56803 established java.exe:14536 tcp my-pc:56805 localhost:56806 established java.exe:14536 tcp my-pc:56806 localhost:56805 established
from source code, default goes this...
_manager = new serverconnectormanager( getexecutor(), getscheduler(), selectors>0? selectors: math.max(1,math.min(4,runtime.getruntime().availableprocessors()/2) )); addbean(_manager, true);
so proves, based on number of processors have related number of selectors started default.
Comments
Post a Comment