elastic @ shopback
TRANSCRIPT
![Page 1: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/1.jpg)
ELASTIC @ SHOPBACK
Alberto Resco PerezEngineering Manager
Elastic Meetup Singapore – Dec 15, 2016
![Page 2: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/2.jpg)
Agenda
1. Introduction to ShopBack2. Product Catalog in ShopBack3. Logs/Metrics Collection4. Future development5. QA
![Page 3: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/3.jpg)
Our Founding Journey
![Page 4: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/4.jpg)
Who we are
• We are the smarter way to shop • Over 1.5M shoppers in 6 countries have adapted the
shop-and-save lifestyle• Southeast Asia’s No. 1 Online Cashback portal• Bringing happiness to users via:
• Cashback Rewards• New Store Discoveries• Enhanced Shopping Experiences
![Page 5: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/5.jpg)
What we do
![Page 6: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/6.jpg)
Where we are
SG: SEP 2014MY: FEB 2015PH: JUN 2015IN: JAN 2016ID: MAR 2016TW: SEP 2016
![Page 7: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/7.jpg)
Product CatalogChallenges
![Page 8: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/8.jpg)
Thousands of categories & stores, Millions of Products
Fast, Reliable & Concise information
Multi country – Multi Language
Presentation in small screens
Product CatalogChallenges
![Page 9: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/9.jpg)
9
Gateway
API Product Service
MySQLMongoDB
Web IOS Android Extension
Product CatalogMoving towards micro-services
![Page 10: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/10.jpg)
• Moved to our Elasticsearch 2.4 cluster -> Already in 5.0!• Latest version with new features available
• Schema for multi-country, multi-language• Indices
• “Product” micro-service• Performance is great
Product CatalogMoving towards micro-services
![Page 11: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/11.jpg)
Crawler
Product CatalogProduct Updates
CrawlerSynchronizer
MapperImage Uploader
Indexer
![Page 12: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/12.jpg)
No Cluster Metrics
Slow browsing
Limited by language
Fast browsing based on ES
Large amount of SKUs
Language is not a issue
Cluster Metrics collected
Product CatalogPost-elastic implementation
![Page 13: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/13.jpg)
Initial Setup
Cluster v1
Clusterv2
• Spin up cluster• Basic setup
• Single index, Single type by country:
• Products x 5• Stores x 5
• Better configuration of analyzers (different languages)
• Removed Boolean queries
• Single index, 2 types:• Products• Stores
• Types complete different, need different analyzers…
• Multiple Boolean queries• Country, domain
Product CatalogOur journey to current status
Clusterv3
• Single index, Single type by country:
• Products x 6• Stores x 6• Categories x 6• Campaigns x 6
• Auto-suggestion
![Page 14: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/14.jpg)
Before Now
Documents Indexed• 10M products• 2k stores• 15k categories• 100+ custom pages• Updated when we find a change
Performance• Product search: 1ms• Store listing: 4s• Auto-suggestion: Live. 100ms
Product CatalogSome data
Documents Indexed• 60k products• Updated every week
Performance• Product search: 2s• Store listing: 30s• Auto-suggestion: 30Kb preload
![Page 15: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/15.jpg)
• Papertrail‒ Cloud provided $$$‒ 7 days Retention‒ No dashboards
• AWS Cloud Watch‒ 2 days Retention‒ 5 Minutes interval or 1 Minute interval $$$‒ Not all metrics
• New Relic‒ Cloud provided -> $$$$$$$$‒ 3 months Retention‒ 5 Minutes interval or 1 Minute interval -> $$$‒ Not all metrics
Logs / Metrics CollectionFormer/Legacy System
![Page 16: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/16.jpg)
Logs / Metrics CollectionFormer/Legacy System
![Page 17: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/17.jpg)
Logs / Metrics CollectionELK based
![Page 18: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/18.jpg)
• Implement country multi-language -> Using different indexes
• Implement fuzzy matching
• Recommendation engine
• Machine Learning Fraud detection
• Collect all services metrics with Metricbeat Mongodb, MySQL, Memcached
• Move Logstash to Filebeat lightweight shipper
• Setup Alerting -> X-Pack Alerting
Future Implementations
![Page 19: Elastic @ ShopBack](https://reader035.vdocuments.us/reader035/viewer/2022062503/58a1303c1a28abd34f8b5497/html5/thumbnails/19.jpg)
• Previously:‒ Papertrail‒ New Relic‒ AWS CloudWatch Metrics
• Moving towards Beats + Kibana‒ All covered except APM (NewRelic)‒ First Micro-Service (Product Catalog) migrated
Log management and metrics collection