SlideShare a Scribd company logo
Scaling the Brandwatch search index – a history




Tim Owen: tim@brandwatch.com | Tel: +44 (0)1273 234 290
Overview: Brandwatch Social Media Monitoring

 •   We crawl, index and store as much of the useful web as we can
 •   Customers define search queries to find pages of interest
 •   The page content and metadata is stored in
      •   Traditional relational databases – PostgreSQL
      •   Full-text search index – Solr/Lucene
      •   Key-value stores – Voldemort and HBase

 •   Our real-time queries across this data are typically
      •   How many pages match my search query, per day, over the last 3 months?
      •   What are: the top websites? the most prolific authors? the sentiment mix?
      •   What topics are being discussed among these mentions of my search query




© 2012 Brandwatch | www.brandwatch.com                                                2
Big Data

 •
     Total data set is (reasonably?) Big Data – 100TB+
 •
     But we don't currently use Hadoop/Map-Reduce
 •
     Why not? It doesn't fit our use-cases. Map-Reduce is...
      •
          Batch-orientated, not real-time
      •
          Runs in minutes/hours/days, not milliseconds
      •
          Suited to scans across all or most of a dataset

 •
     We do real-time queries for small subsets of the data
      •
          Indexes are essential
      •
          Relational DBs like Postgres are good at this, but scaling is tricky
      •
          HBase is good for this use-case, and scales horizontally




© 2012 Brandwatch | www.brandwatch.com                                           3
Search Index

 •
     Our full-text search index has grown to 25TB in 5 years
 •
     The growth is definitely not linear!
 •
     We have changed the architecture of it several times
 •
     Solving the pain point each time opened up new ones




© 2012 Brandwatch | www.brandwatch.com                         4
Search Mk 1 (monolithic)

            1 Crawler
                                          •
                                              2007 to 2008
                                          •
                                              Up to 80GB
                                          •
                                              Separates reads and writes
       1 Lucene Index
                                          •
                                              Reads are from local disk
                          Rsync nightly   •
                                              Have redundancy

 Index                Index
                                          •
                                              Stale data – 1 day old
Replica 1            Replica 2            •
                                              Monolithic index


 Reader                 Reader
 Client 1               Client 2


© 2012 Brandwatch | www.brandwatch.com                                     5
Search Mk 2 (shared filesystem)

           2-3 Crawlers
                                         •   2009
                                         •   Up to 350GB
                            NFS          •   Real-time
                                         •   Reads and Writes mixed
         1 Lucene Index                  •   No redundancy
         on Shared F/S
                                         •   NFS reads are slow
                                         •   Clients open index in RAM
                             NFS
                                         •   Monolithic – Doesn't Scale
   Reader                Reader
   Client 1              Client 2


© 2012 Brandwatch | www.brandwatch.com                                    6
Search Mk 3 (partitioned)

           3-20 Crawlers
                                         •   2010 to mid 2011
                                         •   Up to 8.5TB
                              NFS        •   Only read partitions needed
                                         •   Only write to 1 partition
   Jun          Jul         Aug
                                         •   Easier to scale
     Sep          Oct        Latest
                                         •   Still reading over NFS
                                         •   Still opening index in RAM
                             NFS

   Reader                Reader
   Client 1              Client 2


© 2012 Brandwatch | www.brandwatch.com                                     7
Search Mk 4 (Solr)

          20-30 Crawlers
                                              •   2011 to now
                                              •   Up to 25TB
                             Http
                                              •   Offloads RAM from clients
            Solr Writer
                                              •   Scales horizontally
                         replication
  Solr1       Solr2           Solr3
                                              •   Partitions spread over Solrs
                                              •   More expensive in H/W
    Solr4          ...         Solr24
                                              •   Failover is not automatic
                                       Http
                                              •   No auto-balancing partitions
   Reader                   Reader
   Client 1                 Client 2


© 2012 Brandwatch | www.brandwatch.com                                           8
Search Mk 5 (SolrCloud)

              30+ Crawlers
                                               •   2013
                                               •   25TB+
                                               •   Handles failover
                                               •   Manages partition placing
               SolrCloud                       •   New tech – early days
                                               •   ?? always something..




   Reader             Reader
                                         ...
   Client 1           Client 2


© 2012 Brandwatch | www.brandwatch.com                                         9
CONTACT

EMAIL: contact@brandwatch.com

WEB: http://www.brandwatch.com

TWITTER: @brandwatch

PHONE:
UK: +44 (0)1273 234 290
US: +1 212 229 2240
Germany: +49 (0)711 912 442 04

FAX:
UK: +44 (0)1273 234 291




DOCUMENT LIMITATION
The information given in this document has been checked for accuracy and completeness however Brandwatch
shall not be liable for any errors or omissions.

Brandwatch is a trading name of Runtime Collective Limited. Registered in England & Wales: 3898053
4th Floor, International House, Queens Road, Brighton, BN1 3XE, United Kingdom




© 2012 Brandwatch | www.brandwatch.com                                                                     10

More Related Content

Similar to Scaling the Brandwatch Search Index - A History (Tim Owen at Big Data Brighton)

Solr 4
Solr 4Solr 4
Solr 4
Erik Hatcher
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQLDon Demcsak
 
Cosmos db
Cosmos dbCosmos db
Cosmos db
Martino Bordin
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
Owen O'Malley
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Bob Pusateri
 
Solr @ eBay Kleinanzeigen
Solr @ eBay KleinanzeigenSolr @ eBay Kleinanzeigen
Solr @ eBay Kleinanzeigen
Lucidworks (Archived)
 
Private cloud virtual reality to reality a partner story daniel mar_technicom
Private cloud virtual reality to reality a partner story daniel mar_technicomPrivate cloud virtual reality to reality a partner story daniel mar_technicom
Private cloud virtual reality to reality a partner story daniel mar_technicomMicrosoft Singapore
 
What's new in Lucene and Solr 4.x
What's new in Lucene and Solr 4.xWhat's new in Lucene and Solr 4.x
What's new in Lucene and Solr 4.x
Grant Ingersoll
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
DataWorks Summit
 
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural LessonsCassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
DataStax
 
BP-8 Global Federation and Search
BP-8 Global Federation and SearchBP-8 Global Federation and Search
BP-8 Global Federation and Search
Alfresco Software
 
Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...
Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...
Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...
Future Perfect 2012
 
Petabyte scale on commodity infrastructure
Petabyte scale on commodity infrastructurePetabyte scale on commodity infrastructure
Petabyte scale on commodity infrastructureelliando dias
 
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
Lucidworks
 
Scaling MongoDB (Mongo Austin)
Scaling MongoDB (Mongo Austin)Scaling MongoDB (Mongo Austin)
Scaling MongoDB (Mongo Austin)
MongoDB
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
Anshum Gupta
 
Databases -- Have it Your Way (Frederick Cheung)
Databases -- Have it Your Way (Frederick Cheung)Databases -- Have it Your Way (Frederick Cheung)
Databases -- Have it Your Way (Frederick Cheung)
Skills Matter
 
Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP Developers
Rick Hightower
 
From legacy, to batch, to near real-time
From legacy, to batch, to near real-timeFrom legacy, to batch, to near real-time
From legacy, to batch, to near real-timeMarc Sturlese
 
Timesten Architecture
Timesten ArchitectureTimesten Architecture
Timesten Architecture
SrirakshaSrinivasan2
 

Similar to Scaling the Brandwatch Search Index - A History (Tim Owen at Big Data Brighton) (20)

Solr 4
Solr 4Solr 4
Solr 4
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQL
 
Cosmos db
Cosmos dbCosmos db
Cosmos db
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
 
Solr @ eBay Kleinanzeigen
Solr @ eBay KleinanzeigenSolr @ eBay Kleinanzeigen
Solr @ eBay Kleinanzeigen
 
Private cloud virtual reality to reality a partner story daniel mar_technicom
Private cloud virtual reality to reality a partner story daniel mar_technicomPrivate cloud virtual reality to reality a partner story daniel mar_technicom
Private cloud virtual reality to reality a partner story daniel mar_technicom
 
What's new in Lucene and Solr 4.x
What's new in Lucene and Solr 4.xWhat's new in Lucene and Solr 4.x
What's new in Lucene and Solr 4.x
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
 
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural LessonsCassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
 
BP-8 Global Federation and Search
BP-8 Global Federation and SearchBP-8 Global Federation and Search
BP-8 Global Federation and Search
 
Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...
Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...
Kris Carpenter Negulescu Gordon Paynter Archiving the National Web of New Zea...
 
Petabyte scale on commodity infrastructure
Petabyte scale on commodity infrastructurePetabyte scale on commodity infrastructure
Petabyte scale on commodity infrastructure
 
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
 
Scaling MongoDB (Mongo Austin)
Scaling MongoDB (Mongo Austin)Scaling MongoDB (Mongo Austin)
Scaling MongoDB (Mongo Austin)
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
 
Databases -- Have it Your Way (Frederick Cheung)
Databases -- Have it Your Way (Frederick Cheung)Databases -- Have it Your Way (Frederick Cheung)
Databases -- Have it Your Way (Frederick Cheung)
 
Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP Developers
 
From legacy, to batch, to near real-time
From legacy, to batch, to near real-timeFrom legacy, to batch, to near real-time
From legacy, to batch, to near real-time
 
Timesten Architecture
Timesten ArchitectureTimesten Architecture
Timesten Architecture
 

More from Brandwatch

Identifying and Analyzing a target audience with Analytics
Identifying and Analyzing a target audience with Analytics Identifying and Analyzing a target audience with Analytics
Identifying and Analyzing a target audience with Analytics
Brandwatch
 
Brand protection & Crisis Aversion
Brand protection & Crisis AversionBrand protection & Crisis Aversion
Brand protection & Crisis Aversion
Brandwatch
 
Leveraging Insights with Creative Segmentation
Leveraging Insights with Creative SegmentationLeveraging Insights with Creative Segmentation
Leveraging Insights with Creative Segmentation
Brandwatch
 
Life As a Brandwatch Analyst
Life As a Brandwatch AnalystLife As a Brandwatch Analyst
Life As a Brandwatch Analyst
Brandwatch
 
Intelligence: The Fundamentals
Intelligence: The Fundamentals Intelligence: The Fundamentals
Intelligence: The Fundamentals
Brandwatch
 
Control vs. Culture: The New Technology Operating Environment
Control vs. Culture: The New Technology Operating EnvironmentControl vs. Culture: The New Technology Operating Environment
Control vs. Culture: The New Technology Operating Environment
Brandwatch
 
Collective creativity for better intelligence
Collective creativity for better intelligenceCollective creativity for better intelligence
Collective creativity for better intelligence
Brandwatch
 
Ethics and humanity in the age of technology
Ethics and humanity in the age of technology Ethics and humanity in the age of technology
Ethics and humanity in the age of technology
Brandwatch
 
Digital transformation in a regulated industry
Digital transformation in a regulated industry Digital transformation in a regulated industry
Digital transformation in a regulated industry
Brandwatch
 
Emotional Intelligence
Emotional Intelligence Emotional Intelligence
Emotional Intelligence
Brandwatch
 
25 things we learned analyzing billions of tweets
25 things we learned analyzing billions of tweets   25 things we learned analyzing billions of tweets
25 things we learned analyzing billions of tweets
Brandwatch
 
PSB + Aga Khan Foundation: United We Brand
PSB + Aga Khan Foundation: United We BrandPSB + Aga Khan Foundation: United We Brand
PSB + Aga Khan Foundation: United We Brand
Brandwatch
 
Ditch the Label and Brandwatch: Mental Health Study, 2017
Ditch the Label and Brandwatch: Mental Health Study, 2017Ditch the Label and Brandwatch: Mental Health Study, 2017
Ditch the Label and Brandwatch: Mental Health Study, 2017
Brandwatch
 
Telling a story with your social insights
Telling a story with your social insightsTelling a story with your social insights
Telling a story with your social insights
Brandwatch
 
Combining Brandwatch and non Brandwatch data using Vizia 2
Combining Brandwatch and non Brandwatch data using Vizia 2Combining Brandwatch and non Brandwatch data using Vizia 2
Combining Brandwatch and non Brandwatch data using Vizia 2
Brandwatch
 
How can social listening help to determine ROI?
How can social listening help to determine ROI?How can social listening help to determine ROI?
How can social listening help to determine ROI?
Brandwatch
 
One step ahead: How Co-op uses Brandwatch to inform their business
One step ahead: How Co-op uses Brandwatch to inform their businessOne step ahead: How Co-op uses Brandwatch to inform their business
One step ahead: How Co-op uses Brandwatch to inform their business
Brandwatch
 
Today’s Reality: Managing & Monitoring Campus Crises through Social Media
Today’s Reality: Managing & Monitoring Campus Crises through Social MediaToday’s Reality: Managing & Monitoring Campus Crises through Social Media
Today’s Reality: Managing & Monitoring Campus Crises through Social Media
Brandwatch
 
Social Truth: Revealing what Truly Matters to Customers
Social Truth: Revealing what Truly Matters to CustomersSocial Truth: Revealing what Truly Matters to Customers
Social Truth: Revealing what Truly Matters to Customers
Brandwatch
 
Social Maturity
Social MaturitySocial Maturity
Social Maturity
Brandwatch
 

More from Brandwatch (20)

Identifying and Analyzing a target audience with Analytics
Identifying and Analyzing a target audience with Analytics Identifying and Analyzing a target audience with Analytics
Identifying and Analyzing a target audience with Analytics
 
Brand protection & Crisis Aversion
Brand protection & Crisis AversionBrand protection & Crisis Aversion
Brand protection & Crisis Aversion
 
Leveraging Insights with Creative Segmentation
Leveraging Insights with Creative SegmentationLeveraging Insights with Creative Segmentation
Leveraging Insights with Creative Segmentation
 
Life As a Brandwatch Analyst
Life As a Brandwatch AnalystLife As a Brandwatch Analyst
Life As a Brandwatch Analyst
 
Intelligence: The Fundamentals
Intelligence: The Fundamentals Intelligence: The Fundamentals
Intelligence: The Fundamentals
 
Control vs. Culture: The New Technology Operating Environment
Control vs. Culture: The New Technology Operating EnvironmentControl vs. Culture: The New Technology Operating Environment
Control vs. Culture: The New Technology Operating Environment
 
Collective creativity for better intelligence
Collective creativity for better intelligenceCollective creativity for better intelligence
Collective creativity for better intelligence
 
Ethics and humanity in the age of technology
Ethics and humanity in the age of technology Ethics and humanity in the age of technology
Ethics and humanity in the age of technology
 
Digital transformation in a regulated industry
Digital transformation in a regulated industry Digital transformation in a regulated industry
Digital transformation in a regulated industry
 
Emotional Intelligence
Emotional Intelligence Emotional Intelligence
Emotional Intelligence
 
25 things we learned analyzing billions of tweets
25 things we learned analyzing billions of tweets   25 things we learned analyzing billions of tweets
25 things we learned analyzing billions of tweets
 
PSB + Aga Khan Foundation: United We Brand
PSB + Aga Khan Foundation: United We BrandPSB + Aga Khan Foundation: United We Brand
PSB + Aga Khan Foundation: United We Brand
 
Ditch the Label and Brandwatch: Mental Health Study, 2017
Ditch the Label and Brandwatch: Mental Health Study, 2017Ditch the Label and Brandwatch: Mental Health Study, 2017
Ditch the Label and Brandwatch: Mental Health Study, 2017
 
Telling a story with your social insights
Telling a story with your social insightsTelling a story with your social insights
Telling a story with your social insights
 
Combining Brandwatch and non Brandwatch data using Vizia 2
Combining Brandwatch and non Brandwatch data using Vizia 2Combining Brandwatch and non Brandwatch data using Vizia 2
Combining Brandwatch and non Brandwatch data using Vizia 2
 
How can social listening help to determine ROI?
How can social listening help to determine ROI?How can social listening help to determine ROI?
How can social listening help to determine ROI?
 
One step ahead: How Co-op uses Brandwatch to inform their business
One step ahead: How Co-op uses Brandwatch to inform their businessOne step ahead: How Co-op uses Brandwatch to inform their business
One step ahead: How Co-op uses Brandwatch to inform their business
 
Today’s Reality: Managing & Monitoring Campus Crises through Social Media
Today’s Reality: Managing & Monitoring Campus Crises through Social MediaToday’s Reality: Managing & Monitoring Campus Crises through Social Media
Today’s Reality: Managing & Monitoring Campus Crises through Social Media
 
Social Truth: Revealing what Truly Matters to Customers
Social Truth: Revealing what Truly Matters to CustomersSocial Truth: Revealing what Truly Matters to Customers
Social Truth: Revealing what Truly Matters to Customers
 
Social Maturity
Social MaturitySocial Maturity
Social Maturity
 

Scaling the Brandwatch Search Index - A History (Tim Owen at Big Data Brighton)

  • 1. Scaling the Brandwatch search index – a history Tim Owen: tim@brandwatch.com | Tel: +44 (0)1273 234 290
  • 2. Overview: Brandwatch Social Media Monitoring • We crawl, index and store as much of the useful web as we can • Customers define search queries to find pages of interest • The page content and metadata is stored in • Traditional relational databases – PostgreSQL • Full-text search index – Solr/Lucene • Key-value stores – Voldemort and HBase • Our real-time queries across this data are typically • How many pages match my search query, per day, over the last 3 months? • What are: the top websites? the most prolific authors? the sentiment mix? • What topics are being discussed among these mentions of my search query © 2012 Brandwatch | www.brandwatch.com 2
  • 3. Big Data • Total data set is (reasonably?) Big Data – 100TB+ • But we don't currently use Hadoop/Map-Reduce • Why not? It doesn't fit our use-cases. Map-Reduce is... • Batch-orientated, not real-time • Runs in minutes/hours/days, not milliseconds • Suited to scans across all or most of a dataset • We do real-time queries for small subsets of the data • Indexes are essential • Relational DBs like Postgres are good at this, but scaling is tricky • HBase is good for this use-case, and scales horizontally © 2012 Brandwatch | www.brandwatch.com 3
  • 4. Search Index • Our full-text search index has grown to 25TB in 5 years • The growth is definitely not linear! • We have changed the architecture of it several times • Solving the pain point each time opened up new ones © 2012 Brandwatch | www.brandwatch.com 4
  • 5. Search Mk 1 (monolithic) 1 Crawler • 2007 to 2008 • Up to 80GB • Separates reads and writes 1 Lucene Index • Reads are from local disk Rsync nightly • Have redundancy Index Index • Stale data – 1 day old Replica 1 Replica 2 • Monolithic index Reader Reader Client 1 Client 2 © 2012 Brandwatch | www.brandwatch.com 5
  • 6. Search Mk 2 (shared filesystem) 2-3 Crawlers • 2009 • Up to 350GB NFS • Real-time • Reads and Writes mixed 1 Lucene Index • No redundancy on Shared F/S • NFS reads are slow • Clients open index in RAM NFS • Monolithic – Doesn't Scale Reader Reader Client 1 Client 2 © 2012 Brandwatch | www.brandwatch.com 6
  • 7. Search Mk 3 (partitioned) 3-20 Crawlers • 2010 to mid 2011 • Up to 8.5TB NFS • Only read partitions needed • Only write to 1 partition Jun Jul Aug • Easier to scale Sep Oct Latest • Still reading over NFS • Still opening index in RAM NFS Reader Reader Client 1 Client 2 © 2012 Brandwatch | www.brandwatch.com 7
  • 8. Search Mk 4 (Solr) 20-30 Crawlers • 2011 to now • Up to 25TB Http • Offloads RAM from clients Solr Writer • Scales horizontally replication Solr1 Solr2 Solr3 • Partitions spread over Solrs • More expensive in H/W Solr4 ... Solr24 • Failover is not automatic Http • No auto-balancing partitions Reader Reader Client 1 Client 2 © 2012 Brandwatch | www.brandwatch.com 8
  • 9. Search Mk 5 (SolrCloud) 30+ Crawlers • 2013 • 25TB+ • Handles failover • Manages partition placing SolrCloud • New tech – early days • ?? always something.. Reader Reader ... Client 1 Client 2 © 2012 Brandwatch | www.brandwatch.com 9
  • 10. CONTACT EMAIL: contact@brandwatch.com WEB: http://www.brandwatch.com TWITTER: @brandwatch PHONE: UK: +44 (0)1273 234 290 US: +1 212 229 2240 Germany: +49 (0)711 912 442 04 FAX: UK: +44 (0)1273 234 291 DOCUMENT LIMITATION The information given in this document has been checked for accuracy and completeness however Brandwatch shall not be liable for any errors or omissions. Brandwatch is a trading name of Runtime Collective Limited. Registered in England & Wales: 3898053 4th Floor, International House, Queens Road, Brighton, BN1 3XE, United Kingdom © 2012 Brandwatch | www.brandwatch.com 10