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

Readonly traffic fallback on primary if all replicas down #8

Closed
Vonng opened this issue Feb 18, 2021 · 1 comment
Closed

Readonly traffic fallback on primary if all replicas down #8

Vonng opened this issue Feb 18, 2021 · 1 comment
Assignees
Labels
ENHANCEMENT New feature or request
Milestone

Comments

@Vonng
Copy link
Owner

Vonng commented Feb 18, 2021

Scenario

If all replica instances are down. Current setup will NOT route those traffic to the only primary. which means readonly service are not available.

It nice to have an additional option to configure that in case of all replicas failure:

  • Leave primary be, so at least readwrite service will survival the avalanche case
  • Route readonly traffic to primary so the service still intact.

Proposal

Add an option haproxy_weight_fallback which controls this behaviro

  • When set to 0, it is same as before, primary will not take any read-only traffic
  • When set to a value larger than 0, It will be used as relative weight for primary instance in replica services group.

In normal situation, the primary will take a very little portion of read-only traffic. In case of all replica down. It will become the only available backend in replica service. And takeover all read-only traffics.

@Vonng Vonng added the ENHANCEMENT New feature or request label Feb 18, 2021
@Vonng Vonng self-assigned this Feb 18, 2021
@Vonng Vonng added this to the v0.6 milestone Feb 18, 2021
@Vonng
Copy link
Owner Author

Vonng commented Feb 19, 2021

Resolved by d87854b and d87854b

@Vonng Vonng closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCEMENT New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant