3. 3
● Thanks to Alex Brasetvik (@alexbrasetvik)
from @foundsays, for the slides.
● Thanks to Leslie Hawthorn (@lhawthorn)
from @elasticsearch, for the stickers.
53. 53
Memory
● Search engines have a great appetite for
memory!
– Caches, caches, caches
● Field and filter caches
● Index building
54. 54
Comparison
● RDBMSs are built to store. They Put good
things in memory, and will flush to disk when
there is no memory.
– Slower but working.
– Timeout is a client matter.
● Search-Engines are built for speed.
– Fast running or not running.
– Assumption: You've provided enough memory.
55. 55
Question
● What if you don't provide them enough
memory?
57. 57
Out Of Memory
● In the best case:
– Your Indexing or Search Request simply failed.
● More:
– Cluster state corrupted.
– Crashed Netty.
● Just don't end up there in your production cluster.
58. 58
Warning Signs
● ES provides lots of end-points to give you
insights into it.
– Resource Usage
● Cache Sizes
● Heap Space
● There are Monitoring Tools.
– Profile your queries and optimize them.
63. 63
Memory Constraints
● Large heaps are expensive to garbage collect.
– JVM can no longer user pointer compression if
heap goes beyond 32GB.
– Keep heap < 32GB
● Single Machine with Huge amount of
Memory/SSD.
– Multiple nodes on super-fast machine with SSD and
big amount of RAM. (Note: Replicas, SPF)
● Scale-Out
64. 64
Security
● Everyone is most welcome.
● Auth(z) things aren't ES business.
– You are the gatekeeper
● Upon the role, limit the user requests applying
filters.
– Out of memory is a critical issue. (Attacks)
– Unfiltered or unnecessary queries are pretty
memory consuming.
66. 66
Networking
● ES works great, on a single node.
● ES is impressively easy to use for being a
distributed system.
● ES Supports lots of different network
topologies.
70. 70
Suggestions
● Have enough memory to keep your nodes
reliable.
● Have majority of nodes.
● Favor filters over matching queries.
● Have an eye on the cluster (Health).
● Don't let user to run faceted queries or reduce
the frequency.