question

jiafu_181556 avatar image
jiafu_181556 asked jiafu_181556 edited

Why to set the so_linger to 0 instead of so_reuseaddr to reduce Timewait in Cassandra?

Hi, Excuse me, In Cassandra's code, Why to set the so_linger to 0 instead of keep default value: -1 and enable so_reuseaddr? 0 mean will drop the data when closing the socket. To reduce timewait's best choice is to enable so_reuseaddr. Can anybody help to explain this reason? I check many popular open source programs. they won't set this so_linger to 0 but enable so_reuseaddr

https://github.com/apache/cassandra/commit/1bae25ace7cd25487aa5cff83447069cd80d3e42#diff-6cae9cbee862819b5dbc026ed31b23d3

cassandranetty
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

0 Answers