1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00
phorge-phorge/src
epriestley bc6c8c0e93 Explicitly shuffle nodes before selecting one for cluster sync
Summary:
Depends on D19734. Ref T13202. Ref T13109. Ref T10884. See PHI905. See PHI889. We currently rank cluster nodes in three cases:

  # when performing a write, we can go to any node (D19734 should make our ranking good);
  # when performing a read, we can go to any node (currently random, but T10884 discusses ideas to improve our ranking);
  # when performing an internal synchronization before a read or a write, we must go to an up-to-date node.

Currently, case (3) is not-exactly-deterministic but not random, and we won't spread intracluster traffic acrosss the cluster evenly if, say, half of it is up to date and half of it is still synchronizing. For a given write, I believe all nodes will tend to synchronize from whichever node first received the write today.

Instead, shuffle the list and synchronize from any up-to-date node.

(I think we could improve upon this only by knowing which nodes actually have load and selecting the least-loaded -- doable, but not trivial.)

Test Plan: Poked at it locally, will deploy to `secure`. This is hard to measure/test terribly convincingly.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13202, T13109, T10884

Differential Revision: https://secure.phabricator.com/D19735
2018-10-17 08:11:23 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Remove the execution time limit (if any) before sinking HTTP responses 2018-07-30 10:56:05 -07:00
applications Explicitly shuffle nodes before selecting one for cluster sync 2018-10-17 08:11:23 -07:00
docs Update Phriction documentation for drafts 2018-09-13 14:16:19 -07:00
extensions
infrastructure Allow "bin/bulk export" to merge multiple queries and accept more flexible flags 2018-10-10 09:14:14 -07:00
view Add 'autocomplete="off"' to MFA TOTP inputs 2018-10-01 13:08:54 -07:00
__phutil_library_init__.php
__phutil_library_map__.php Provide a convenient way to log arbitrary text in Drydock without needing structured log classes 2018-09-15 07:59:50 -07:00