04. distributed document store
TRANSCRIPT
ElasticSearch
Distributed Document Storehttp://elastic.openthinklabs.com/
Routing a Document to a Shard
shard = hash(routing) % number_of_primary_shards
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.
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
Retrieving a Document
Retrieving a single document
Partial Updates to a Document
Partial updates to a document
Multidocument Patterns
Retrieving multiple documents with mget
Multiple document changes with bulk
Referensi
● ElasticSearch, The Definitive Guide, A Distributed Real-Time Search and Analytics Engine, Clinton Gormely & Zachary Tong, O’Reilly