Download - TechTalk #13 Grokking: Scaling and supercharging your online business models with Elasticsearch
SCALING & SUPERCHARGING
YOUR ONLINE BUSINESS MODELS
WITH ELASTICSEARCHTRI TRAN @ GROKKING VIETNAM
JUNE 2016
ABOUT ME
• Lead Developer @ 8Bit Rockstars• Tech Lead @ Tablen & IdeasOn• Tech Mentor @ MyProClub• @moprit
I’m very happy if you call me `Mụp`
WE WILL DISCUSS ABOUT
• Scaling with Elasticsearch• Good infrastructures for supercharging • ONGR & Spryker• Load Test & Evaluation
YOUR ONLINE BUSINESS
MODELS
WE WON’T TALK ABOUT
• What’s Elasticsearch?• Compare Elasticsearch with the others• Back-end Framework Evaluation
SCALINGWITH ELASTICSEARCH
PROBLEMS?
From: ttgtmedia.com
• Large joins taking up memory• Working size exceeds the hardware limits• Full text search & NLP• Write-write conflicts
COMMON SOLUTION?
• Database Replication• Full page cache
DATABASE CONNECTION
From: Google
NEW APPROACH:
HOW?
• Shard? What is it?• Primary shard vs. Replica shard• Shard Overallocation
“”
Elasticsearch provides the ability to subdivide your index into multiple pieces called shards. Each shard is in itself a fully-functional and independent "index" that can be hosted on any node in the cluster.
From www.elastica.co
• It allows you to horizontally split/scale your content volume
• It allows you to distribute and parallelize operations across shards (potentially on multiple nodes) thus increasing performance/throughput
PRIMARY VS. REPLICA
P1 R1 R2
• Can be stored on any node in a cluster• Independent Index• Distributed• Parallelize operations • A copy of primary shard
• In case failover• Never resides on a same node as
the original shard• Scaling search volume
SHARD OVERALLOCATION
https://www.youtube.com/watch?v=WLiVjAELUaUBy Scott Davis
SUPERCHARGINGWITH ELASTICSEARCH
GOALS
• Preventing to spend expensive SQL queries to a relational database with several joins and conditions.• Or using Elasticsearch as a primary data
storage
From Spryker.com
From ONGR.io
From ONGR.io
PERFORMANCE LOAD TEST
PERFORMANCE LOAD TEST
• Normal Load Condition (0-5 clients per 5 minutes | 1 dyno)
• Peak Load Condition (0-100 clients per 5 minutes | 1 dyno)
• Extra Scaling Up Load Condition (0-600 clients per 5 minutes | 10 dyno)
DISCUSSROCK TOGETHER
INBACKGROUND
MUSIC
MOST WANTED
www.8bitrockr.com
Project Manager
Senior Front-end Developer
Senior PHP Developer8Bit Rockstars Co., LTD.L08 – R01, Vincom Center72 Le Thanh Ton, Ben Nghe, District 1, HCMC, VN