Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-1423: cluster-osc-slaves API may not return all required slaves #1428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kamil-holubicki
Copy link

#1423

The new algorithm implemented:

Stage 1: 1st tier servers.

Get up to two 1st tier servers from each DC in the following order:

Most busiest IMs
Most lagging leaf nodes
Examples:
If there are N > 1 IMs in the DC, we will use the 2 busiest ones
(having the highest number of replicas)
If there is only 1 IM in the DC, but there are some leaf nodes,
we will use IM + most lagging leaf node
If there are no IMs in the DC, but there are leaf nodes, we will use
up to two most lagging leaf nodes
So this stage will collect at most 2 servers per DC

Stage 2: 2nd tier servers

Examine all collected 1st tier servers (from Stage 1),
and if they are IMs, get at most two busiest replicas for each server
(2nd tier servers).

So this stage will collect at most 2 replicas per IM.
If we collected 2 IMs per DC in Stage 1, here we will get 4 servers
per DC.

Stage 3: 3rd tier servers

Get 2 busiest 3rd tier replicas per DC.
If replicas are leaves we get the replica with a larger lag.

So this stage will collect at most 2 servers per DC

Added new tests 'get-heuristic-lag-multi-dc' and
'which-cluster-ocs-replicas'

openark#1423

The new algorithm implemented:

Stage 1: 1st tier servers.

Get up to two 1st tier servers from each DC in the following order:

Most busiest IMs
Most lagging leaf nodes
Examples:
If there are N > 1 IMs in the DC, we will use the 2 busiest ones
(having the highest number of replicas)
If there is only 1 IM in the DC, but there are some leaf nodes,
we will use IM + most lagging leaf node
If there are no IMs in the DC, but there are leaf nodes, we will use
up to two most lagging leaf nodes
So this stage will collect at most 2 servers per DC

Stage 2: 2nd tier servers

Examine all collected 1st tier servers (from Stage 1),
and if they are IMs, get at most two busiest replicas for each server
(2nd tier servers).

So this stage will collect at most 2 replicas per IM.
If we collected 2 IMs per DC in Stage 1, here we will get 4 servers
per DC.

Stage 3: 3rd tier servers

Get 2 busiest 3rd tier replicas per DC.
If replicas are leaves we get the replica with a larger lag.

So this stage will collect at most 2 servers per DC

Added new tests 'get-heuristic-lag-multi-dc' and
'which-cluster-ocs-replicas'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant