Skip to content

Cluster Configuration

Roman Tsisyk edited this page Aug 17, 2015 · 6 revisions

Proposal

Implement the common configuration and monitoring for asynchronous replication, synchronous replication (bsync) and sharding.

Configuration

box.cfg {
    cluster = {
        peers = {
            server_1 = { uri = '192.168.0.1', zone = 'mow', replica_set = 0 };
            server_2 = { uri = '192.168.8.1', zone = 'ny', replica_set=1 };
            server_3 = { uri = '192.168.16.1', zone = 'lon', replica_set=2 };
            server_4 = '192.168.24.1';
        };
        login = "default login if not specified in peers";
        password = "";
        port = 3313;
        mode = "async|bsync";
        redundancy = "2";
        -- ... other async/bsync replication parameters:
        -- read_timeout = xx;
        -- write_timeout = xx;
     }
}

![Cluster Configuration](images/Cluster Configuration.png)

Available keys for peer:

  • uri - remote URI (login:password@host:port)
  • zone - sharding zone
  • replica\_set - replication set

Monitoring

> box.info.cluster
---
- 1:
    name: server1
    uri: '192.178.0.1' # without password
    zone: mow
    replica_set: 0
    lag: 10 # max(uplink.lag, downlink.lag)
    vclock: { 1: 32 (+3), 2: 33 (-3) }
    uplink:
      status: connected
      host: <host>
      family: <family>
      port: <port>
    downlink:
      status: connected
      host: <host>
      family: <family>
      port: <port>

TODO

  • default port, login and password options in cfg
  • how to get peer name for connected replicas

Developer Guidelines ↗

Architecture

How To ...?

Recipes

Upgrade instructions

Useful links

Old discussions

Personal pages

Clone this wiki locally