cluster: try make the cluster socket high-priority
The heartbeat messages, notably, should really not be lost, otherwise the cluster will dismantle itself if some very-high trafic is filling packet queues.
This commit is contained in:
parent
878e9dd88a
commit
e442a69fc1
1 changed files with 3 additions and 0 deletions
|
|
@ -133,6 +133,9 @@ int cluster_init()
|
|||
opt = 0; // Turn off multicast loopback.
|
||||
setsockopt(cluster_sockfd, IPPROTO_IP, IP_MULTICAST_LOOP, &opt, sizeof(opt));
|
||||
|
||||
opt = 7; // Highest priority to avoid getting hit by high-traffic
|
||||
setsockopt(cluster_sockfd, SOL_SOCKET, SO_PRIORITY, &opt, sizeof(opt));
|
||||
|
||||
if (config->cluster_mcast_ttl != 1)
|
||||
{
|
||||
uint8_t ttl = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue