Elasticsearch (R)Evolution — You Know, for Search...

A presentation at InfoShare in May 2018 in Gdańsk, Poland by Philipp Krenn

Slide 1

Slide 1

(R) Evolution Philipp Krenn 44444444 @xeraa

Slide 2

Slide 2

Revolution

Slide 3

Slide 3

https://db-engines.com/en/ranking

Slide 4

Slide 4

Slide 5

Slide 5

https://www.reddit.com/r/SQL/comments/7i828i/ms_sql_query_is_too_complex/

Slide 6

Slide 6

Who uses Elasticsearch?

Slide 7

Slide 7

Infrastructure | Developer Advocate

Slide 8

Slide 8

http://thedudeabides.com/articles/ the_birth_of_compass

Slide 9

Slide 9

Slide 10

Slide 10

Terms Cluster, Node, Index, Shard, Document, ID

Slide 11

Slide 11

$ curl http: //localhost:9200 {

"name" : "elasticsearch1" ,

"cluster_name" : "docker-cluster" ,

"cluster_uuid" : "l6wfwv8XSniiI_Fx6qqrcw" ,

"version" : {

"number" : "5.6.9" ,

"build_hash" : "877a590" ,

"build_date" : "2018-04-12T16:25:14.838Z" ,

"build_snapshot" : false ,

"lucene_version" : "6.6.1" },

"tagline" : "You Know, for Search" }

Slide 12

Slide 12

$ curl http: //localhost:9200 {

"name" : "elasticsearch1" ,

"cluster_name" : "docker-cluster" ,

"cluster_uuid" : "l6wfwv8XSniiI_Fx6qqrcw" ,

"version" : {

"number" : "5.6.9" ,

"build_hash" : "877a590" ,

"build_date" : "2018-04-12T16:25:14.838Z" ,

"build_snapshot" : false ,

"lucene_version" : "6.6.1" },

"tagline" : "You Know, for Search" }

Slide 13

Slide 13

Slide 14

Slide 14

Slide 15

Slide 15

Slide 16

Slide 16

Slide 17

Slide 17

Slide 18

Slide 18

Slide 19

Slide 19

Slide 20

Slide 20

Slide 21

Slide 21

Evolution

Slide 22

Slide 22

Questions: https://sli.do/xeraa Answers: https://twitter.com/xeraa

Slide 23

Slide 23

Slide 24

Slide 24

Strictness * 5.0 *  Demo

Slide 25

Slide 25

Slide 26

Slide 26

Bootstrap Checks https://www.elastic.co/guide/en/elasticsearch/ reference/current/bootstrap-checks.html

Slide 27

Slide 27

Parameters & Configs

Slide 28

Slide 28

Rolling Upgrades * 6.0 *  Demo

Slide 29

Slide 29

Slide 30

Slide 30

Floodstage Watermark * 6.0 *  Demo

Slide 31

Slide 31

Slide 32

Slide 32

Low 85% High 90% Floodstage 95%

Slide 33

Slide 33

Sequence Numbers * 6.0 *  Demo

Slide 34

Slide 34

Slide 35

Slide 35

Slide 36

Slide 36

63 bits ought to be enough for anyone.

Slide 37

Slide 37

Tradeoff index.translog.retention.size: 512MB index.translog.retention.age: 12h

Slide 38

Slide 38

Cross Datacenter Replication 6.x or 7.x

Slide 39

Slide 39

Types * 5.6 to 8.0 *  Demo

Slide 40

Slide 40

Slide 41

Slide 41

Why Data types Sparsity Scoring

Slide 42

Slide 42

How 5.6 opt-in single type 6.x single type 7.x type optional in API 8.x no more types https://www.elastic.co/guide/en/elasticsearch/reference/current/ removal-of-types.html#_schedule_for_removal_of_mapping_types

Slide 43

Slide 43

Automatic Queue Resizing 6.0

Slide 44

Slide 44

Reject and Retry Instead of Long Queues thread_pool.search.target_response_rate: 2s Serving 50 requests/s Queue size:

Slide 45

Slide 45

Adaptive Replica Selection 6.1 (enabled by default in 7.0)

Slide 46

Slide 46

Slide 47

Slide 47

Pick Best Shard Exponentially Weighted Moving Average (EWMA) Piggyback on requests

Slide 48

Slide 48

Slide 49

Slide 49

Shrink & Split * 4 5.0 444 6.1 *  Demo

Slide 50

Slide 50

Slide 51

Slide 51

Shrink Combine shards by a factor

Slide 52

Slide 52

Slide 53

Slide 53

Split Split into a factor of number_of_routing_shards Not required in 7.0+

Slide 54

Slide 54

Shards 7.0

Slide 55

Slide 55

Slide 56

Slide 56

Default: 1 shard per index Oversharding

Slide 57

Slide 57

Benchmarks ∞

Slide 58

Slide 58

Slide 59

Slide 59

Slide 60

Slide 60

Rally https://elasticsearch-benchmarks.elastic.co

Slide 61

Slide 61

Conclusion

Slide 62

Slide 62

Rolling Upgrades Floodstage Watermark Sequence Numbers Types

Slide 63

Slide 63

Automatic Queue Resizing Adaptive Replica Selection Shrink & Split Shard Number

Slide 64

Slide 64

Questions? Philipp Krenn 4444444 @xeraa