I would like to start using the database service at digital ocean but have 2 questions before going into it:

1) I would use a main node and 2 standby nodes. Is it possible to configure a load balancer to use the 3 nodes to maximize performance?

2) The documentation talks about multi-node database clustering. By and can’t find where to add new nodes to the clusters (beside the standy nodes)

3) If DO database service supports several nodes in the cluster, is this done through sharding?

Thanks in advance!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer
  1. Stand-by nodes are exactly what they are described as - in that they are inactive, and are there to be used when your primary node fails and then you have automatic failover to the stand-by mode. The system will also then automatically figure out how to return your configuration back to it’s desired state of 1 primary and X stand-by nodes.

  2. If you want to increase performance this is accomplished by adding Read-only nodes. Here you can distribute the load usually at the application level, DNS, or various other methodologies and this allows you to spread the READ requests across several nodes, as well as make them geographically available in other regions. You can also restrict access that all READs only go to READ nodes and save the primary node only for WRITEs / updates.

  3. Scalability is provided through one primary WRITE node and multiple READ nodes - scalability is not provided through SHARDing.

Remember that if you want to READ and WRITE from multiple nodes to increase scalability that those nodes need to be both setup as PRIMARY nodes so that they can sync replication between them with the assumption that both nodes can handle writes. This is why it is often far more advantageous to instead split out READs to separate nodes as two PRIMARY nodes that are both accepting WRITEs is a more complex setup and can lead to different error states, while setting up only READ nodes doesn’t increase complexity.

Submit an Answer