Skip to content

Add reader_vip_cidr #45

@djuntgen

Description

@djuntgen

Add functionality to MHA-Helper to allow for reader_vip_cidr management.

  • reader_vip_cidr= VIP for read only
  • candidate_reader = boolean, if true then slave is eligible to take on reader vip.

MHA-Helper configuration

[default]
master_vip_cidr=192.168.4.10/24
reader_vip_cidr=192.168.4.11/24

[db1]
candidate_reader=1

[db2]
candidate_reader=1

# db3
[db3] 
candidate_reader=1

How it would work

Take db topology:

db1 (master holds master VIP)
  \ -> db2 (replica, holds reader VIP, candidate_master = 1)
  \ -> db3 (replica, none, candidate_reader = 1)

Case:

  1. Make db2 master
  2. Make db1 replica of db2
  3. Move master_vip_cidr from db1 -> db2
  4. Move reader_vip_cidr from db2 -> db3

There are some cases that need to be worked out like:

  • What happens if db3 is down, or far behind in replication?
  • What if db1 and db2 are the only master, replica pair, where does the reader vip go?
    • I think this is easy, just put the reader_vip on the master.

etc..

thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions