10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

27
SOLR Power FTW 10 EZ Steps to SOLR Domination Alex Pinkin @apinkin

description

2012-06-05 presentation at Berlin Buzzwords

Transcript of 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Page 1: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

SOLR Power FTW10 EZ Steps to SOLR Domination

Alex Pinkin

@apinkin

Page 2: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Alex Pinkin

● Director of Engineering,Data and Infrastructure,Bazaarvoice

@apinkin

Page 3: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Bazaarvoice

● SaaS companypowering user generated content on thousands of web sites

● 5+ billion page views per month

● 300+ billion impressions

Page 4: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

SOLR Stats

Documents 350 MM

Index size 330 GB

AVG QPS 3,400

MAX QPS 12,500

AVG Response time 7 ms

95P Response time 14 ms

Page 5: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Initial State - back in 2007...

● SoR: MySQL

● Search: MySQL

● Numerous indexes

● Numerous aggregates

Page 6: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 1

FULL TEXT SEARCH

Page 7: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 1: FT Search

● SOLR Master + Hot Backup● Single index

Page 8: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 2

● Reads overwhelming master● No R/W isolation

Page 9: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 2

● R/W separation

Page 10: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 3

● QPS Growing

Page 11: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 3

● Add more slaves

Page 12: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 4

● Number of Clients is growing

Page 13: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 4

● Multiple Deployment Groups

Page 14: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 5

● MySQL still in trouble: Too many Indexes, Aggregates

Page 15: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 5

● Offload filtering and sorting to SOLR● Add more slaves● Add more RAM

Page 16: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 6

● Query latency is getting worse

Page 17: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 6

● Multiple cores● Core management tools● Transparent data migration

Page 18: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 7MySQL is still in trouble

● Too many aggregate tables● Error-prone aggregation logic

Page 19: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 7● Off-load simple aggregates to SOLR● Use Faceting

Page 20: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 8

● SOLR is GC'ing itself to death● 99p Latency = :-(

Page 21: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 8

● GC tuning○ Concurrent Low Pause Collector○ Parallel Young Generation Collector○ Incremental mode

Page 22: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 9

● Disaster Recovery (Multi-DC)

Page 23: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 9

● Cross-DC replication

Page 24: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Problem 10

● Schema Changes...

"ALTER TABLE OF DOOM" @josh_wills

Page 25: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Solution 10

● Bittorrentfor the rescue!

Page 26: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Remaining Challenges

● Elasticity

● HA: failover

● Schema changes

Page 27: 10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012

Questions

@apinkin