forked from airbnb/synapse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[haproxy] Avoid unnecessary HAProxy re-configuration.
Currently, on every topology update event Synapse sends re-enable commandto HAProxy for every live backend instance, even though that instance may already be UP. The number of such backend instances can be quite significant, so after every single topology update Synapse may send thousands of re-enable commands which are essentially noops. The following changes were made to address the problem: 1. HAProxy command batching: commands are now sent in groups of 4 or less, which reduces overall number of syscalls per topology update event. 2. Re-enable command is now sent only if a given instance status is not UP. 3. Minor performance improvements in HAProxy stats parsing code (~35% time/cpu savings).
- Loading branch information
Anton Kuraev
committed
Nov 5, 2016
1 parent
e9f6b39
commit 61aee69
Showing
1 changed file
with
35 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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