Sunday, October 13, 2013

Cache Replicatio and Partition -- Basic Concepts and Pros and Cons

If you are a lead in your development team and only few members have IMDG experience, it is absolutely necessary to educate your team with basic concepts. Otherwise you will probably waste too much time on endless clarification and explanation.
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.

  1. 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.
  2. Replication

  3. Partition

  4. Replication pros and cons


    • HA
    • Scales reads linearly
    • Asynchronous replication


    • 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)


    • Small cluster
    • Small capacity
    • Read-most
  5. Partition pros and cons


    • Scales writes linearly
    • Scales memory linearly
    • Configurable HA
    • Local lock only.  Synch. replication only. No Conflict resolution


    • Can NOT scale reads linearly
    • No asynch. replication


    • Large cluster
    • Large capacity
    • Write-most

No comments:

Post a Comment