Skip to content

Latest commit

 

History

History
80 lines (55 loc) · 2.55 KB

failover.md

File metadata and controls

80 lines (55 loc) · 2.55 KB

Configuring failover

cartridge_failover_params is used to specify failover parameters:

  • mode(string, required) - failover mode. Possible values are disabled, eventual and stateful.
  • failover_timeout - timeout (in seconds), used by membership to mark suspect members as dead;
  • fencing_enabled - abandon leadership when both the state provider quorum and at least one replica are lost (suitable in stateful mode only);
  • fencing_timeout - time (in seconds) to actuate fencing after the check fails;
  • fencing_pause- the period (in seconds) of performing the check;

Other parameters are mode-specific.

Read the doc to learn more about Cartridge failover.

Eventual

If eventual mode is specified, there are no additional parameters.

Read the doc to learn more about eventual failover.

Example:

cartridge_failover_params:
  mode: eventual

Stateful

Note that stateful failover is supported since Cartridge 2.1.2.

Note that etcd2 provider is supported since Cartridge 2.2.0.

stateful failover requires these parameters:

  • state_provider(string, required for stateful mode) - external state provider type. Supported stateboard and etcd2 providers.

  • stateboard_params(dict, required for stateboard state provider) - configuration for stateboard:

    • uri(string, required) - stateboard instance URI;

    • password(string, required) - stateboard instance password;

  • etcd2_params(dict, used for etcd2 state provider) - configuration for etcd2:

    • prefix(string) - prefix used for etcd keys: <prefix>/lock and <prefix>/leaders;

    • lock_delay(number) - timeout (in seconds), determines lock's time-to-live (default value in Cartridge is 10);

    • endpoints(list-of-strings) - URIs that are used to discover and to access etcd cluster instances (default value in Cartridge is ['http://localhost:2379', 'http://localhost:4001']);

    • username(string).

    • password(string).

Read the doc to learn more about stateful failover.

Example:

cartridge_failover_params:
  mode: stateful
  state_provider: stateboard
  stateboard_params:
    uri: localhost:3310
    password: stateboard-secret