Created
May 27, 2015 14:05
-
-
Save ronin13/e4f00da7c11e897383aa to your computer and use it in GitHub Desktop.
Socat SO_REUSEPORT test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| For server: | |
| ===== | |
| for x in {1..10};do detach ./socat -u TCP-LISTEN:50000,reuseport,fork GOPEN:/tmp/socat-$x.log; done | |
| For client: | |
| ====== | |
| for x in {1..10};do date +%r | ./socat -u stdio TCP:0.0.0.0:50000; sleep 2s; done | |
| Results: | |
| /tmp/socat-1.log:07:16:18 PM | |
| /tmp/socat-1.log:07:16:24 PM | |
| /tmp/socat-10.log:07:16:08 PM | |
| /tmp/socat-4.log:07:16:14 PM | |
| /tmp/socat-6.log:07:16:06 PM | |
| /tmp/socat-7.log:07:16:16 PM | |
| /tmp/socat-7.log:07:16:22 PM | |
| /tmp/socat-8.log:07:16:10 PM | |
| /tmp/socat-8.log:07:16:12 PM | |
| /tmp/socat-9.log:07:16:20 PM |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The algorithm used for hashing
http://en.wikipedia.org/wiki/Jenkins_hash_function