半连接:
半连接队列(Incomplete connection queue),又称 SYN 队列
全连接队列(Completed connection queue),又称 Accept 队列
服务端
node1:/root/test#netstat -an | grep 8080
tcp 0 0 192.168.137.2:8080 0.0.0.0:* LISTEN
tcp 0 0 192.168.137.2:8080 192.168.137.3:47848 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47854 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47851 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47847 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47856 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47857 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47859 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47860 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47855 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47850 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47858 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47849 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47846 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47853 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47852 SYN_RECV
tcp 0 0 192.168.137.2:8080 192.168.137.3:47845 SYN_RECV
node1:/root/test#netstat -an | grep 8080 | wc -l
17
客户端:
node2:/root#netstat -na | grep 8080
tcp 0 1 192.168.137.3:47936 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47862 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47847 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47871 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47928 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47895 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47880 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47848 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47943 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47849 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47935 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47918 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47921 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47913 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47902 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47863 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47887 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47852 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47911 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47938 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47885 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47859 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47923 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47891 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47855 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47876 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47873 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47899 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47920 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47875 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47910 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47939 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47904 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47942 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47926 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47877 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47915 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47919 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47927 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47868 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47851 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47930 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47941 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47866 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47924 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47922 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47867 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47857 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47892 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47901 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47944 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47917 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47853 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47914 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47925 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47905 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47898 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47934 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47897 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47940 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47906 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47860 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47888 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47878 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47916 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47903 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47900 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47861 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47850 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47937 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47893 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47845 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47907 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47869 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47896 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47912 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47889 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47854 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47865 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47886 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47856 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47858 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47933 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47932 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47882 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47884 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47890 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47872 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47931 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47894 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47870 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47846 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47874 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47864 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47881 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47879 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47929 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47908 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47883 192.168.137.2:8080 SYN_SENT
tcp 0 1 192.168.137.3:47909 192.168.137.2:8080 SYN_SENT
node2:/root#netstat -na | grep 8080 | wc -l
100
node1:/root/test#netstat -lnpa | grep :8080 | awk '{print $6}' | sort | uniq -c | sort -rn
16 SYN_RECV
1 LISTEN
半连接队列(SYN Queue)
客户端发起了100个连接,但是服务端只接收了16个