+ All Categories
Home > Technology > Be lazy & scale

Be lazy & scale

Date post: 11-Jan-2017
Category:
Upload: logmaticio
View: 147 times
Download: 4 times
Share this document with a friend
27
Be Lazy & Scale Full-Text Tagging Billions Of Messages
Transcript
Page 1: Be lazy & scale

Be Lazy & ScaleFull-Text Tagging Billions Of Messages

Page 2: Be lazy & scale
Page 3: Be lazy & scale

reverse mapping checking getaddrinfo for xxxxx [xxx.xxx.xxx.xxx] failed - POSSIBLE BREAK-IN ATTEMPT!

pam_unix(sshd:session): session opened for user xxxxxx by (uid=0)

reverse mapping checking getaddrinfo for xxxxx [xxx.xxx.xxx.xxx] failed - POSSIBLE BREAK-IN ATTEMPT!

pam_unix(sshd:session): session opened for user xxxxxx by (uid=0)

Page 4: Be lazy & scale

reverse mapping checking getaddrinfo for xxxxx failed

"reverse mapping"Phrase Query

failedTerm Query

Boolean Query AND, OR, NOT

"reverse mapping" AND failed

Page 5: Be lazy & scale
Page 6: Be lazy & scale

PercolatorTraditionally you design documents based on your data, store them into an index, and then define queries via the search API in order to retrieve these documents. The percolator works in the opposite direction. First you store queries into an index and then, via the percolate API, you define documents in order to retrieve these queries.https://www.elastic.co/guide/en/elasticsearch/reference/current/search-percolate.html

reverse mapping checking getaddrinfo for xxxxx [xxx.xxx.xxx.xxx] failed - POSSIBLE BREAK-IN ATTEMPT!

reverse mapping checking getaddrinfo for xxxxx [xxx.xxx.xxx.xxx] failed - POSSIBLE BREAK-IN ATTEMPT!

"possible break-in attempt!"

"session opened"

Page 7: Be lazy & scale
Page 8: Be lazy & scale
Page 9: Be lazy & scale
Page 10: Be lazy & scale
Page 11: Be lazy & scale

/0-10

/173

Page 12: Be lazy & scale
Page 13: Be lazy & scale

$$$ $$$

Page 14: Be lazy & scale

Perco. Queries Index

Register Queries

In-Memory Index

Reverse mapping ...

Reverse mapping...

Perco. Req. Reversemapping ...

Perco. Resp.

ExecuteEachQuery

Page 15: Be lazy & scale

105s

160Tags

500000Runs

Page 16: Be lazy & scale
Page 17: Be lazy & scale

Use Query A Priori Knowledge via

Appropriate and Optimized Data-Structures

Page 18: Be lazy & scale

Early Termination

"reverse mapping"

pam_unix(sshd:session): session opened for user xxxxxx by (uid=0)

AND

failed reverse ?

Page 19: Be lazy & scale
Page 20: Be lazy & scale

[1, 2]"reverse mapping"

failed

Query Term Index

reverse --> 1mapping --> 2

failed --> 0

Query Clauses Rewritten Clauses

0

Register Queries

Page 21: Be lazy & scale

Query Term Index

failed --> 0reverse --> 1mapping --> 2

Reverse mapping checking getaddrinfo for xxxxx failed.Raw Message

[1, 2, -1, -1, -1, -1, 0]Message Rewritten in Query Space

0 --> true1 --> true2 --> true

Query Term Presence Bitset

Prepare Log

Page 22: Be lazy & scale

0failed

Simple Lookup

[1, 2, -1, -1, -1, -1, 0]Message Rewritten in Query Space

0 --> true1 --> true2 --> true

Query Term Presence Bitset

Term Query

Page 23: Be lazy & scale

[1, 2]"reverse mapping"

1. Quick Check / Early Termination

2. Actual Check~ contains

[1, 2, -1, -1, -1, -1, 0]Message Rewritten in Query Space

0 --> true1 --> true2 --> true

Query Term Presence Bitset

Phrase Query

Page 24: Be lazy & scale

AND/OR

Boolean Query

Page 25: Be lazy & scale
Page 26: Be lazy & scale

105s

160Tags

500000Runs

7.3s

x14.4Faster

8.8s

x22.2Faster

195s

320Tags500000Runs

Page 27: Be lazy & scale

Recommended