Enabling Replication

To enable replication on a SciDB cluster, do the following:

This assumes you have scidb running as a service. See Running SciDB.

  1. Set the redundancy parameter in the SciDB configuration file, config.ini. The following example sets redundancy to 1 (meaning that SciDB stores two copies of all array data). The example also sets values (in seconds) for the two parameters that control the times for the liveness mechanism.

    :
    # A value of 1 for redundancy creates one additional copy of each array chunk.
    redundancy=1
    liveness-timeout=60
    reconnect-timeout=5
    :
  2. If this is the first time initialization of the service please see Managing SciDB Instances taking this new config.ini with you.

    The redundancy setting can also be changed after the SciDB cluster has been initialized. However, the new setting will affect only the arrays created after the change. The new setting will take effect after a re-start.

    Use the old configuration file to stop the service and the new configuration file to start the service.
     

    $ scidbctl.py --config <old_config.ini> stop-server <cluster_name>
    $ scidbctl.py --config <new_config.ini> start-server <cluster_name>


  3. Load the system plugin.

    AFL% load_library('system')
  4. Use the sync operator to establish a heartbeat for all of the SciDB instances.

    $ until iquery -naq 'sync()'; do sleep 1; done"

This process establishes replication for your SciDB cluster.Â