04. distributed document store

8

Click here to load reader

Upload: openthink-labs

Post on 11-Apr-2017

96 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: 04. Distributed Document Store

ElasticSearch

Distributed Document Storehttp://elastic.openthinklabs.com/

Page 2: 04. Distributed Document Store

Routing a Document to a Shard

shard = hash(routing) % number_of_primary_shards

Page 3: 04. Distributed Document Store

How Primary and Replica Shards Interact

A cluster with three nodes and one index

When sending requests, it is good practice to round-robin through all the nodes in the cluster, in order to spread the load.

Page 4: 04. Distributed Document Store

Creating, Indexing, and Deleting a Document

consistency

int( (primary + number_of_replicas) / 2 ) + 1

int( (primary + 3 replicas) / 2 ) + 1 = 3

quorum

Creating, indexing, or deleting a single document

Page 5: 04. Distributed Document Store

Retrieving a Document

Retrieving a single document

Page 6: 04. Distributed Document Store

Partial Updates to a Document

Partial updates to a document

Page 7: 04. Distributed Document Store

Multidocument Patterns

Retrieving multiple documents with mget

Multiple document changes with bulk