elad / node-cluster-socket.io

Writeup on how to make node.js cluster and socket.io play nice
421 stars 63 forks source link

IPv6 support #28

Closed MickL closed 7 years ago

MickL commented 7 years ago

None of the hash functions are working correctly with IPv6. You should definitely indicate that in your readme. Also you may replace the hash function with farmhash32:

IPv6
----------
benchmarking int31...
  time (ms): 417
  scatter: { '0': 568888, '1': 220419, '2': 94915, '3': 115778 }
benchmarking numeric_real...
  time (ms): 826
  scatter: { NaN: 1000000 }
benchmarking simple_regex...
  time (ms): 704
  scatter: { NaN: 1000000 }
benchmarking simple_loop...
  time (ms): 1292
  scatter: { '0': 891094, '1': 35005, '2': 38494, '3': 35407 }
benchmarking farmhash...
  time (ms): 316
  scatter: { '0': 250239, '1': 249119, '2': 250724, '3': 249918 }
MickL commented 7 years ago

Created a pull request: https://github.com/elad/node-cluster-socket.io/pull/29

elad commented 7 years ago

Merged, thanks!