Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space ML1 and version Xpand-5.3

Table of Contents

Introduction

Shared Disk vs. Shared Nothing

...

Table: example

base representation

k1 representationk2 representation

primary key

idcol1col2col3
11636january
21735february
31834march
41933april
52032may

index (col2)

col2id
325
334
343
352
361

index (col3, col1)

col3col1id
april194
february172
january161
march183
may205

Slice

Xpand will then split each representation into one or more logical slices. When slicing Xpand uses the following rules:

...

base representation slices
slice 1slice 2slice 3
idcol1col2col3
21735february
41933april
idcol1col2col3
11636january
52032may
idcol1col2col3
31834march
k1 representation
slice 1slice 2
col2id
325
343
352
col2id
334
361
k2 representation
slice 1slice 2slice 3slice 4
col3col2id
april194
col3col2id
february172
col3col2id
january161
march183
col3col2id
may205

Replica

To ensure fault tolerance and availability Xpand contains multiple copies of data. Xpand uses the following rules to place replicas (copies of slices) within the cluster:

...

Sample data distribution within a 4 node cluster
node 1node 2node 3node 4
k2 slice 1 replica A
col3col2id
april194
k2 slice 2 replica B
col3col2id
february172
base rep slice 3 replica A
idcol1col2col3
31834march
base rep slice 2 replica B
idcol1col2col3
11636january
52032may
k2 slice 3 replica A
col3col2id
january161
march183
k2 slice 1 replica B
col3col2id
april194
base rep slice 1 replica A
idcol1col2col3
21735february
41933april
k2 slice 2 replica A
col3col2id
february172
k2 slice 4 replica B
col3col2id
may205
base rep slice 2 replica A
idcol1col2col3
11636january
52032may
base rep slice 3 replica B
idcol1col2col3
31834march
k2 slice 4 replica A
col3col2id
may205
k2 slice 3 replica B
col3col2id
january161
march183
base rep slice 1 replica B
idcol1col2col3
21735february
41933april


Consistent Hashing

Xpand uses consistent hashing for data distribution. Consistent hashing allows Xpand to dynamically redistribute data without having to rehash the entire data set.

...

Read from both copiesRead from primary copy only
Node 1Node 2
AB
B'A'
Node 1Node 2
AB
B'A'

If we allow reads from both primary and secondary replicas, then each node will have to cache contents of both A and B. Assuming 32GB of cache per node, the total effective cache of the system becomes 32GB.

By limiting the reads to primary replica only, we make node 1 responsible for A only, and node 2 responsible for B only. Assuming 32GB cache per node, the total effective cache footprint becomes 64GB, or double of the opposing model.