Is it possible to add new namespaces and change XDR options WITHOUT restating the server?

Hi, newbie question about Aerospike configuration:

http://www.aerospike.com/docs/operations/configure

a) does the config file need to be replicated on ALL the nodes? Or does it just need to be on one of them?

b) is it possible to add a new namespace or change XDR without the need to restart a server? We would like to do it online, by issuing commands to the server, without the need for any downtime.

Thank you

Some of the config params must be unanimous across all the nodes, for example the replication-factor for a specific namespace. The configuration reference shows which config params are dynamic (modifiable on a running cluster node), which are static, and which must be unanimous.

A new namespace is static configuration and requires a restart. Most of the XDR configuration is dynamic, other than the datacenter subcontext of xdr. You can create datacenter stubs, adding dc-node-address-port details later, dynamically.

xdr {
   datacenter DC1 {
   }
}

Are there any plans to fix this?

All other DBs (SQL or NoSQL) allow all of such operations to be fully online, without need for any restart, etc.

Also, what happens with remote datacenters? Do they need to have an updated copy of the same file shipped to them and a node restarted there as well in order to be able to access a new namespace?

Really, all? That’s a mighty wide survey of the vast DB landscape. :slight_smile: Yes, that’s a standing feature request.

The remote DC just needs to have a matching namespace name for the incoming shipments. For any namespace DC1 has with XDR enabled and DC2 as the target, DC2 needs to have a namespace with the same name. Other than that, their configuration can be completely different.

For example DC1 may be a production cluster with data on SSD, that ships a portion of its data (some sets) to a smaller analytics cluster. The analytics cluster can have less nodes, define the storage for the namespace to be in-memory, have replication factor of 1, and can add secondary indexes over the records. All that needs to match is the same name for the source and target namespace.

So basically the steps for adding a new namespace would be:

a) add it in the main DC and restart a single node (no need to restart all)

b) repeat the same in all the DCs that would read that namespace

c) only completed, actually start populating that namespace with data

I hope my understanding is correct, thank you for your response

Close, but not exactly.

  1. Modify the config file on all the nodes in the local cluster, adding the namespace, set its enable-xdr to false.
  2. Stop writing to the cluster (disconnect at the app-side).
  3. Take down all the nodes together.
  4. Restart all the nodes together.
  5. Resume the connection between the application and the cluster.

This is the fastest way to add a namespace at the source DC.

Do the same at the remote DCs. At this point you dynamically modify enable-xdr to true in the source DC. Edit the enable-xdr in the config file of the source DC nodes to true.

Thank you for your answer, much appreciated.

The ability to add/remove namespaces with rolling restart of the cluster is added starting server version 3.13.0.1 for both Community and Enterprise versions on paxos-protocol version v5.

[AER-3485] - (KVS) Support adding/removing namespaces with rolling restart. http://www.aerospike.com/download/server/notes.html#3.13.0.1