For example, when I recommended partition, I was told I would lose replication. They didn't realize that the partition scheme allows a configurable number of replicas for the primaries.
Here are slides I used for education purpose.
Assumptions
- The cluster has 4 nodes each of which has the same read, write and memory metrics as follows:
- How a metric changes as the cluster grows?
The metric in red decreases at node level, either remains constant or increases less linearly at cluster level.
The metric in green remains constant at node level, and increase linearly at cluster level.
- Replication is synchronous.
- There is only one replica in partition.
Replication
Partition
Replication pros and cons
Pros
- HA
- Scales reads linearly
- Asynchronous replication
Cons
- Can NOT scale writes linearl
- Cluster memory capacity equals a single node memory capacity
- Conflict resolution for asynch. replication
- Global locking for synch. replication (deadlock prone)
Usage
- Small cluster
- Small capacity
- Read-most
Partition pros and cons
Pros
- Scales writes linearly
- Scales memory linearly
- Configurable HA
- Local lock only. Synch. replication only. No Conflict resolution
Cons
- Can NOT scale reads linearly
- No asynch. replication
Usage
- Large cluster
- Large capacity
- Write-most
No comments:
Post a Comment