After creating and starting your active data center(s), you can add a passive data center through the following steps:
Obtain a data center in a remote location that contains suitable machines and reliable storage.
Start one or more Admin Processes in that data center. For protection from single-point failures, it is best to run 3 Admin Processes.
The configuration of each AP in each datacenter of the database should include an "initialMembership" property that includes one AP from each data center. See notes about initialMembership.
Create as many archives as you want to run Asynchronous Storage Managers. For protection from single-point failures, it is best to create 2 archives on distinct storage volumes and run 2 Storage Managers.
--passiveflag when creating these archives. For example,
nuocmd create archive --passive --db-name ... --server-id ... --archive-path ...
Archive(archive_path=..., db_name=..., id=..., server_id=..., state=PROVISIONED)
Start Storage Managers to serve each archive. They will be Asynchronous Storage Managers because they will be observers for all storage groups that they serve. For example,
nuocmd start database --db-name ... --incremental
Establish your procedures for deciding when the active data center is unusable and handing off responsibility to the passive data center.
When using storage groups, you can make each Asynchronous Storage Manager serve all storage groups, or you can improve performance by spreading the load across SMs.
Any SM started on an archive created with the
--passive flag will be an observer for all storage groups that it serves.
This ensures that all SMs in the passive data center are asynchronous SMs
so long-distance network latency has no impact on database performance.
For protection from single-point failures, it is best to create 2 archives on distinct storage volumes for each distinct subset of storage groups. Archives that serve different subsets of storage groups can share a volume if the storage hardware provides sufficient performance.