Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Consistency & Elasticsearch
Search
Elasticsearch Inc
November 04, 2013
Technology
2
1.2k
Consistency & Elasticsearch
Fun with working around eventual consistency!
Elasticsearch Inc
November 04, 2013
Tweet
Share
More Decks by Elasticsearch Inc
See All by Elasticsearch Inc
OSCON: Scaling a distributed engineering team from 50-250
elasticsearch
13
1.4k
Stuff a Search Engine Can Do
elasticsearch
17
1.6k
Using Elastic to monitor anything
elasticsearch
3
1.5k
Log all the things!
elasticsearch
4
1.1k
Why Elastic? @ 50th Vinitaly 2016
elasticsearch
5
1.9k
What's New In Elasticland?
elasticsearch
3
870
Kibana, Timelion, Graph Meetup
elasticsearch
3
770
Elastic for Time Series Data and Predictive Analytics
elasticsearch
4
3k
Elastic 2.0
elasticsearch
1
740
Other Decks in Technology
See All in Technology
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
0
1.5k
利きプロセススケジューラ
sat
PRO
4
2.6k
20241108_CS_LLMMT
shigashiyama
0
240
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
1
370
AIチャットボット開発への生成AI活用
ryomrt
0
110
10分でわかるfreee エンジニア向け会社説明資料
freee
18
520k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
3
230
今、始める、第一歩。 / Your first step
yahonda
2
680
プロポーザルのつくり方 〜個人技編〜 / How to come up with proposals
ohbarye
4
310
エンジニア候補者向け資料2024.11.07.pdf
macloud
0
4.5k
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
200
Lexical Analysis
shigashiyama
1
130
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Side Projects
sachag
452
42k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Music & Morning Musume
bryan
46
6.2k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Gamification - CAS2011
davidbonilla
80
5k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
810
Transcript
Elasticsearch & Data Consistency @drewr Tuesday, November 5, 13
Search Tuesday, November 5, 13
Data Tuesday, November 5, 13
Fast Tuesday, November 5, 13
Distributed Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
P R R P Tuesday, November 5, 13
Requests Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
? ? ? ? Tuesday, November 5, 13
Consistency Tuesday, November 5, 13
PUT /foo/t/one { "age": 35, "bio": "Some long text", "name":
"Foo" } Tuesday, November 5, 13
Update http://www.elasticsearch.org/guide/reference/api/update/ Tuesday, November 5, 13
POST /foo/t/one/_update { "doc": { "name": "Bar" } } Tuesday,
November 5, 13
POST /foo/t/one/_update { "params": { "ageinc": 1 }, "script": "ctx._source.age
+= ageinc" } Tuesday, November 5, 13
PUT /foo/t/one { "age": 36, "bio": "Some long text", "name":
"Bar" } Tuesday, November 5, 13
A write is a write... Tuesday, November 5, 13
{ "_id": "one", "_index": "foo", "_type": "t", "_version": 1, "ok":
true } Tuesday, November 5, 13
{ "_id": "one", "_index": "foo", "_type": "t", "_version": 1, "ok":
true } Tuesday, November 5, 13
PUT /foo/t/one { "age": 36, "bio": "Some long text", "name":
"Baz" } Tuesday, November 5, 13
{ "_id": "one", "_index": "foo", "_type": "t", "_version": 2, "ok":
true } Tuesday, November 5, 13
PUT /foo/t/one?version=1 { "age": 36, "bio": "Some long text", "name":
"Baz" } Tuesday, November 5, 13
{ "error": "VersionConflict... current [2], provided [1]]", "status": 409 }
Tuesday, November 5, 13
PUT /foo/t/one?version=2 { "age": 36, "bio": "Some long text", "name":
"Baz" } Tuesday, November 5, 13
{ "_id": "one", "_index": "foo", "_type": "t", "_version": 3, "ok":
true } Tuesday, November 5, 13
GET/Search Tuesday, November 5, 13
PUT /foo/t/one?version=3&refresh=true { "age": 36, "bio": "Some long text", "name":
"Quux" } Tuesday, November 5, 13
{ "_id": "one", "_index": "foo", "_type": "t", "_version": 4, "ok":
true } Tuesday, November 5, 13
?consistency=... Tuesday, November 5, 13
?replication=... Tuesday, November 5, 13
Case Study Tuesday, November 5, 13
Tuesday, November 5, 13
Tuesday, November 5, 13
No New Deployment Tuesday, November 5, 13
No New Deployment Consume perf loss OK Tuesday, November 5,
13
No New Deployment Consume perf loss OK Don’t really care
about AMQP Tuesday, November 5, 13
Rabbit Elasticsearch Exchange Index Queue Type Routing key ? Tuesday,
November 5, 13
news.politics.uk news.sports news.politics.usa news.* trade.dow trade.nasdaq Tuesday, November 5, 13
Search! Tuesday, November 5, 13
POST /exch/test.foo { "op": "frob", "thing": "/over/there" } Publish... Tuesday,
November 5, 13
GET /exch/test.foo/_search { "query": { "bool": { "must": [ {
"constant_score": { "filter": { "missing": { "existence": true, "field": "__q_status", "null_value": true } } } }, { "prefix": { "_type": "test.foo" } } ] } }, "size": 1, "sort": [ { "__q_control": { "order": "desc" } } ] } Consume... Tuesday, November 5, 13
PUT /exch/test.foo/UN1QU3ID?version=1&refresh=true { ... "__q_status": "unack" } Consume... Tuesday, November
5, 13
PUT /exch/test.foo/UN1QU3ID?version=2&refresh=true { ... "__q_status": "ack" } Finish up... Tuesday,
November 5, 13
Performance Tuesday, November 5, 13
Conclusion Tuesday, November 5, 13