The nodejs clients [[http://docs.datastax.com/en/drivers/nodejs/2.1/module-policies_loadBalancing-DCAwareRoundRobinPolicy.html|DCAwareRoundRobinPolicy]] allows client fail-over to nodes in another DC in the event no local nodes are available. Enabling this is desirable, but implicitly requires that we encrypt the client connection.
Configuring the nodejs client is fairly straightforward, but like with T108953, we will need keys and certificates generated for each node/instance, and a copy of the node/instance certificates from T108953 available in PEM format to each node/instance.
```
lang=javascript
var options = {
policies: {
loadBalancing: new cassandra.loadBalancing.DCAwareRoundRobinPolicy()
},
sslOptions: {
key: '...', // string or Buffer containing the certificate in PEM format
cert: '...', // string or Buffer containing the certificate in PEM format
ca: '...' // an array of strings of Buffers containing trusted certs in PEM format
},
};
var client = new Client(options);
```
http://docs.datastax.com/en/developer/nodejs-driver/2.2/common/drivers/reference/clientOptions.html