15
1 Alberto Resco Perez Engineering Manager Elastic{ON} Seminar Singapore – Oct 4, 2016 ShopBack Catalog with Elastic

ShopBack Catalog with Elastic

Embed Size (px)

Citation preview

Page 1: ShopBack Catalog with Elastic

1

Alberto Resco PerezEngineering Manager

Elastic{ON} Seminar Singapore – Oct 4, 2016

ShopBack Catalog with Elastic

Page 2: ShopBack Catalog with Elastic

2

Page 3: ShopBack Catalog with Elastic

3

Shopback – What we do

Page 4: ShopBack Catalog with Elastic

4

ShopBackThe Smarter Way to Shop

• Pay users to shop online

• Work with thousands of merchants

• 6 countries

• Over millions of users

• Bringing happiness to ShopBack users via: ‒ Cashback Rewards‒ New Store Discoveries‒ Enhanced Shopping Experiences

Page 5: ShopBack Catalog with Elastic

5

ChallengesThe Smarter Way to Shop

Page 6: ShopBack Catalog with Elastic

6

ChallengesThe Smarter Way to Shop

Thousands of categories & stores, Millions of Products

Fast, Reliable & Concise information

Multi country – Multi Language

Presentation in small screens

Page 7: ShopBack Catalog with Elastic

7

ChallengesMoving towards micro-services

Gateway

API Product Service

MySQLMongoDB

Web IOS Android Extension

Page 8: ShopBack Catalog with Elastic

8

Engaging with ElasticScalable Product Catalog and Search

• Moved to our Elasticsearch 2.4 cluster‒ Latest version with new features available

• Schema for multi-country, multi-language‒ Indices

• “Product” micro-service‒ Performance is great

• Data collected via ELK‒ Moving towards Beats + Kibana

• Elastic Support

Page 9: ShopBack Catalog with Elastic

9

Post Elastic ImplementationWhat we got VS What we want

No Metrics

Slow browsing

Limited by language

Fast browsing based on ES

Large amount of SKUs

Language is not a issue

Metrics collected

Page 10: ShopBack Catalog with Elastic

10

Our journeyHow we migrate to current setup

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

Page 11: ShopBack Catalog with Elastic

11

Lessons LearnedGood learnings

• Go for single index, single type

• Be careful with nested documents

• Have a good document update strategy

• Data size is not a problem (over speed)

• Better running own servers More control

Page 12: ShopBack Catalog with Elastic

12

Where are we going?We are already on it

• Implement country multi-language -> Using different indexes

• Implement fuzzy matching

• Implement suggestions (type-ahead)

• Index more page types Categories, Campaigns, etc.

• Machine Learning Fraud detection

Page 13: ShopBack Catalog with Elastic

13

Where are we going?Log management and metrics collection

• Previously:‒ Papertrail‒ New Relic‒ AWS CloudWatch Metrics

• Moving towards Beats + Kibana‒ All covered except APM (NewRelic)‒ First Micro-Service (Product Catalog) migrated

Page 14: ShopBack Catalog with Elastic

1414

Page 15: ShopBack Catalog with Elastic

1515

Questions?!