HA compared to comdb2

The recently released bloomberg comdb2 seems to be on the ‘far right’ of the HA spectrum.
It can:

  1. on detecting a crashed node, or network partition, in the driver code automatically route the request to another node.
  2. if a node crashes in the middle of a transaction, the transaction will automatically be resumed from where it left off transparently in a different code.

In both above cases, there is no separate ‘retry’ code that needs to be written in apps.

While cockroachdb does offer HA on the box, how does it compare to Comdb2 in the above 2 regards. Specifically how much ‘retry’ logic has to be written in the apps vs how much is transparently handled by the db itself?

1 Like
  1. CockroachDB works with off-the-shelf postgres client drivers, so the client-side retry behavior will depend on which client you’re using. But my understanding is that most drivers don’t do any sort of automated failover or retries and when automated retries are desired this will need to be handled in the application. Our docs include sample wrappers for retrying transactions in various languages.
  2. Each transaction in CockroachDB has a single “coordinator” node, and at least in version 1.0, when a node dies any transactions that were coordinated by that node will be aborted and will need to be retried by the application.
1 Like