Reduce connection latency for cluster clients
Former-commit-id: f1acee99bdaee4faf9e18cdf4734d51a73e78a41
This commit is contained in:
parent
1bf5477602
commit
86a5b2fbc7
@ -1259,7 +1259,9 @@ void acceptOnThread(connection *conn, int flags, char *cip)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ielTarget = chooseBestThreadForAccept();
|
// Cluster connections are more transient, so its not worth the cost to balance
|
||||||
|
// we can trust that SO_REUSEPORT is doing its job of distributing connections
|
||||||
|
ielTarget = g_pserver->cluster_enabled ? ielCur : chooseBestThreadForAccept();
|
||||||
}
|
}
|
||||||
|
|
||||||
rgacceptsInFlight[ielTarget].fetch_add(1, std::memory_order_relaxed);
|
rgacceptsInFlight[ielTarget].fetch_add(1, std::memory_order_relaxed);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user