SlideShare a Scribd company logo
Scaling Solr in the Cloud
  By @ablyler & @LindsaySnider
              FROM

         @NutshellCRM



        www.nutshell.com
Agenda
About the Speakers
About Nutshell
Nutshell and Solr
Solr Resource Usage
Scaling Methods
Questions and Answers
About the Speakers


BitLeap / Barracuda Networks
 Developers on the Backup Appliance / Cloud
 Scaled databases and storage systems
 Used SugarCRM & Salesforce.com
About Nutshell

Web and Mobile CRM application
Heavy use of OpenSource technologies:
 Gentoo
 Nginx / PHP / ZendFramework / jQuery
 MySQL / Solr / Gearman
 Jenkins / Redmine / Cacti / Nagios
Nutshell and Solr

Heavy use of Solr for searching, table views, and
de-duplication
Used for searching / display:
 Accounts, Competitors, Contacts, Leads, Products, Sources,
 Teams, and Users

Used for de-duplication:
 Accounts, Contacts
Reads vs Writes
   7000




   5250




   3500




   1750




        0
Jul 20, 2011 3:00 AM        Jul 20, 2011 6:00 AM    Jul 20, 2011 9:00 AM   Jul 20, 2011 12:00 PM   Jul 20, 2011 3:00 PM   Jul 20, 2011 6:00 PM   Jul 20, 2011 9:00 PM   Jul 21, 2011 12:00 AM

                   Writes                   Reads                 Time




                                                            Average Read Query Time:
                                                                     2.11ms
Demo

www.nutshell.com
Computer Resources

   CPU   Disk I/O


           Disk
   RAM
          Storage
CPU   Disk I/O


       Disk
RAM
      Storage
SOLR Resources

Heavy    CPU   Disk I/O


                 Disk
         RAM
                Storage



Light
SOLR Resources

Heavy    CPU   Disk I/O


                 Disk
         RAM
                Storage



Light
SOLR Resources

Heavy    CPU   Disk I/O


                 Disk
         RAM
                Storage



Light
SOLR Resources

Heavy    CPU   Disk I/O


                 Disk
         RAM
                Storage



Light
SOLR Resources

Heavy    CPU   Disk I/O


                 Disk
         RAM
                Storage



Light
Dark Ages   Age of Enlightenment   Modern Era   Today



            Auto Provisioning

 Setup new Solr Jetty app
 Create MySQL database
 Populate MySQL / Solr with demo data
 Send welcome email
Dark Ages   Age of Enlightenment   Modern Era   Today



Separate Jetty per Customer


 Uses a ton of memory
 Separate schema / Solr for each customer
 Ran into upper limit morning before launch
Dark Ages   Age of Enlightenment   Modern Era   Today




 Auto provisioning
 Separate Jetty app for each customer
Dark Ages   Age of Enlightenment   Modern Era   Today
50

25

 0




      Auto provisioning
      Separate Jetty app for each customer
Dark Ages   Age of Enlightenment   Modern Era   Today



      Solr Core per Customer

 Allows for management of Solr on a per customer
 basis: creating / stopping
 Contained within a single Jetty app
 Shared schema between all cores
 Easily managed via simple HTTP API
Dark Ages    Age of Enlightenment   Modern Era   Today



            Fallback to MySQL


 Landing page of application
 Allows for graceful handling when Solr is down
 Abstracted within the application library
Dark Ages   Age of Enlightenment   Modern Era   Today



      Sun JVM to IcedTea JVM



 IcedTea JVM uses less memory than Sun JVM
Dark Ages   Age of Enlightenment   Modern Era   Today




 Separate Solr core per customer
 Fallback to MySQL for table data
 Migrated from Sun JVM to IcedTea JVM
Dark Ages   Age of Enlightenment   Modern Era   Today
300

150

 0




       Separate Solr core per customer
       Fallback to MySQL for table data
       Migrated from Sun JVM to IcedTea JVM
Dark Ages   Age of Enlightenment   Modern Era   Today



Shared Schema Across Cores


 Decreases initialization time for each core
 Decreases memory usage
Dark Ages   Age of Enlightenment   Modern Era   Today



    Solr Index Field Selection


 More indexed fields = more used memory
 Only index fields that are searched
 Store other non-indexed fields for display
Dark Ages   Age of Enlightenment   Modern Era   Today



  Splitting of Reader / Writer


 Index building is CPU / disk intensive
 Writer = Solr with caching disabled
 Reader = Solr slave, that doesn’t build indexes
Dark Ages    Age of Enlightenment   Modern Era           Today




                            Web




                                                 Solr
            MySQL
                                                 Slave
            (master-
            master)
Dark Ages   Age of Enlightenment       Modern Era        Today



                              Web




                                                Solr
                MySQL
                                                Slave
                (master-
                master)




                                                 Solr
                                                Master




                Range indexer
                 Range indexer
                  Range indexer
                    Range indexer
                   Document indexers


              Gearman workers
Dark Ages   Age of Enlightenment       Modern Era        Today



                              Web




                                                Solr
                MySQL
                                                Slave
                (master-
                master)




                                                 Solr
                                                Master




                Range indexer
                 Range indexer
                  Range indexer
                    Range indexer
                   Document indexers


             Gearman workers
Dark Ages   Age of Enlightenment       Modern Era        Today



                              Web




                                                Solr
                MySQL
                                                Slave
                (master-
                master)




                                                 Solr
                                                Master




                Range indexer
                 Range indexer
                  Range indexer
                    Range indexer
                   Document indexers


             Gearman workers
Dark Ages   Age of Enlightenment     Modern Era              Today



                              Web




                                              Solr
                MySQL
                                              Slave
                (master-
                master)




                                               Solr
                                              Master




                Range indexer
                 Range indexer
                  Range indexer
                   Range indexer
                    Range indexers
                                                  Reindex Manager
Dark Ages   Age of Enlightenment     Modern Era            Today



                              Web




                                              Solr
                MySQL
                                              Slave
                (master-
                master)




                                               Solr
                                              Master




                Range indexer
                 Range indexer
                  Range indexer
                   Range indexer
                    Range indexers
                                               Reindex Manager
Dark Ages   Age of Enlightenment     Modern Era              Today



                              Web




                                                  Solr
                 MySQL
                                                  Slave
                 (master-
                 master)




                                               Solr
                                              Master




                Range indexer
                 Range indexer
                  Range indexer
                   Range indexer
                    Range indexers
                                                  Reindex Manager
Dark Ages   Age of Enlightenment   Modern Era   Today




 Shared schema across cores
 Solr index field selection
 Splitting of reader / writer roles
 Intelligent indexing / reindexing
Dark Ages   Age of Enlightenment   Modern Era   Today
1000

500

  0




        Shared schema across cores
        Solr index field selection
        Splitting of reader / writer roles
        Intelligent indexing / reindexing
Dark Ages   Age of Enlightenment   Modern Era   Today



Intelligent Core Management


 Least recently used Solr cores are spun down
 Solr cores started on login
 Reindexing is a database flag, and happens on the
 next login
Dark Ages      Age of Enlightenment    Modern Era       Today



                    Partitioning

 Pairs of readers and writers
 Partitioned based on account id
    Left pad the account id w/ zeros to length of two
    Reverse the account id
    Take last two digits of the account id
Dark Ages   Age of Enlightenment   Modern Era   Today




 Intelligent core spin down / up
 Partitioning of customers to separate Solr servers
Dark Ages   Age of Enlightenment   Modern Era   Today
8000

4000

   0




        Intelligent core spin down / up
        Partitioning of customers to separate Solr servers
Scalling Solr in the Cloud - OSCON Data 2011
SOLR
  Server
8000 User
SOLR
   SOLR
    SOLR
  Server
     SOLR
   Server
      SOLR
    Server
       SOLR
8000 Server
     UserSOLR
 8000 Server
      User
  8000 Server
   8000User
    8000User
        Server
     8000User
      8000User
            User
SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User
SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User

  SOLR
  Server
8000 User
SOLR
           Server
         8000 User

           SOLR
           Server
         8000 User
123456     SOLR
           Server
         8000 User

           SOLR
           Server
         8000 User

           SOLR
           Server
         8000 User

           SOLR
           Server
         8000 User

           SOLR
           Server
         8000 User
SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
  123456        SOLR
                Server
              8000 User
1 2 3 4 5 6
                SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
  123456        SOLR
                Server
              8000 User
1 2 3 4 5 6
                SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
  123456        SOLR
                Server
              8000 User
1 2 3 4 5 6
                SOLR
                Server
              8000 User

                SOLR
1 2 3 4 5 6     Server
              8000 User

                SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
  123456        SOLR
                Server
              8000 User
1 2 3 4 5 6
                SOLR
                Server
              8000 User

                SOLR
1 2 3 4 5 6     Server
              8000 User

     65         SOLR
                Server
              8000 User

                SOLR
                Server
              8000 User
SOLR
                     Server
                   8000 User
              01
                     SOLR
              02     Server
                   8000 User
  123456      03
                     SOLR
              04     Server
                   8000 User
1 2 3 4 5 6
              65     SOLR
                     Server
              66   8000 User

                     SOLR
1 2 3 4 5 6   96     Server
                   8000 User
              97
     65              SOLR
              98     Server
                   8000 User
              99
                     SOLR
                     Server
                   8000 User
SOLR
                     Server
                   8000 User
              01
                     SOLR
              02     Server
                   8000 User
  123456      03
                     SOLR
              04     Server
                   8000 User
1 2 3 4 5 6
              65     SOLR
                     Server
              66   8000 User

                     SOLR
1 2 3 4 5 6   96     Server
                   8000 User
              97
     65              SOLR
              98     Server
                   8000 User
              99
                     SOLR
                     Server
                   8000 User
SOLR
                     Server
                   8000 User
              01
                     SOLR
              02     Server
                   8000 User
  123456      03
                     SOLR
              04     Server
                   8000 User
1 2 3 4 5 6
              65     SOLR
                     Server
              66   8000 User

                     SOLR
1 2 3 4 5 6   96     Server
                   8000 User
              97
     65              SOLR
              98     Server
                   8000 User
              99
                     SOLR
                     Server
                   8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User

       SOLR
96     Server
     8000 User
97
       SOLR
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User

       SOLR
96     Server
     8000 User
97
       SOLR
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User     SOLR
                   Server
                 8000 User
       SOLR
96     Server
     8000 User
97
       SOLR
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User     SOLR
                   Server
                 8000 User
       SOLR
96     Server
     8000 User
                   SOLR
97                 Server
       SOLR      8000 User
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User     SOLR
                   Server
                 8000 User
       SOLR
96     Server
     8000 User
                   SOLR
97                 Server
       SOLR      8000 User
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User     SOLR
                   Server
                 8000 User
       SOLR
96     Server
     8000 User
                   SOLR
97                 Server
       SOLR      8000 User
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User     SOLR
                   Server
                 8000 User
       SOLR
96     Server
     8000 User
                   SOLR
97                 Server
       SOLR      8000 User
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
SOLR
       Server
     8000 User
01
       SOLR
02     Server
     8000 User
03
       SOLR
04     Server
     8000 User

65     SOLR
       Server
66   8000 User     SOLR
                   Server
                 8000 User
96
                   SOLR
97                 Server
       SOLR      8000 User
98     Server
     8000 User
99
       SOLR
       Server
     8000 User
Scaling Solr in the Cloud
auto provisioning
                                                       50 Users
separate Jetty app for each customer
separate Solr core per customer
fall back to MySQL for table data                     300 Users
migrated from Sun JVM to IcedTea JVM
shared schema across cores
solr index field selection                             600 Users
splitting reader / writer roles
intelligent core spin down / up
                                                     7000 Users
parititioning of customer to separate Solr servers

              By @ablyler & @LindsaySnider
                                  FROM

                         @NutshellCRM

More Related Content

PDF
AAA game in XNA ? Miner wars 2081
PPTX
Nosql storage in windows azure
PDF
Eucalyptus 3 Product Overview
PPT
Ram chinta hug-20120922-v1
PDF
Eucalyptus 3 Product Overview
PDF
Scaling search with Solr Cloud
PDF
Amazon cloud search_vs_apache_solr_vs_elasticsearch_comparison_report_v11
PPTX
Administering and Monitoring SolrCloud Clusters
AAA game in XNA ? Miner wars 2081
Nosql storage in windows azure
Eucalyptus 3 Product Overview
Ram chinta hug-20120922-v1
Eucalyptus 3 Product Overview
Scaling search with Solr Cloud
Amazon cloud search_vs_apache_solr_vs_elasticsearch_comparison_report_v11
Administering and Monitoring SolrCloud Clusters

Similar to Scalling Solr in the Cloud - OSCON Data 2011 (20)

KEY
Big Search with Big Data Principles
KEY
ApacheCon Europe 2012 -Big Search 4 Big Data
KEY
RADOS for Eucalyptus
PDF
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
PPTX
PDF
PPT
February 2016 HUG: Running Spark Clusters in Containers with Docker
PDF
1 Introduction at CloudStack Developer Day
PDF
UKOUG 2011: MySQL Architectures for Oracle DBA's
KEY
MySQL Consegi
PPTX
Microsoft Openness Mongo DB
PDF
Beyond The Data Grid: Coherence, Normalisation, Joins and Linear Scalability
PPTX
Stathy DevOps in MSP / MKE on IAC
PDF
Geek out 2014-lagergren-final
PDF
Solr @ eBay Kleinanzeigen
KEY
Andy Parsons Pivotal June 2011
PPTX
"Navigating the Database Universe" by Dr. Michael Stonebraker and Scott Jarr,...
PPT
PDF
Netflix Architecture Tutorial at Gluecon
PDF
The Netflix Open Source Platform
Big Search with Big Data Principles
ApacheCon Europe 2012 -Big Search 4 Big Data
RADOS for Eucalyptus
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
February 2016 HUG: Running Spark Clusters in Containers with Docker
1 Introduction at CloudStack Developer Day
UKOUG 2011: MySQL Architectures for Oracle DBA's
MySQL Consegi
Microsoft Openness Mongo DB
Beyond The Data Grid: Coherence, Normalisation, Joins and Linear Scalability
Stathy DevOps in MSP / MKE on IAC
Geek out 2014-lagergren-final
Solr @ eBay Kleinanzeigen
Andy Parsons Pivotal June 2011
"Navigating the Database Universe" by Dr. Michael Stonebraker and Scott Jarr,...
Netflix Architecture Tutorial at Gluecon
The Netflix Open Source Platform
Ad

More from OSCON Byrum (20)

PDF
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
PDF
Protecting Open Innovation with the Defensive Patent License
PDF
Using Cascalog to build an app with City of Palo Alto Open Data
PPTX
Finite State Machines - Why the fear?
PDF
Open Source Automotive Development
PPTX
How we built our community using Github - Uri Cohen
PDF
The Vanishing Pattern: from iterators to generators in Python
PDF
Distributed Coordination with Python
PDF
An overview of open source in East Asia (China, Japan, Korea)
PPTX
Oscon 2013 Jesse Anderson
PDF
US Patriot Act OSCON2012 David Mertz
PPTX
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
PPTX
Big Data for each one of us
KEY
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
PDF
Declarative web data visualization using ClojureScript
PDF
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
PDF
A Look at the Network: Searching for Truth in Distributed Applications
PPT
Life After Sharding: Monitoring and Management of a Complex Data Cloud
PPT
Faster! Faster! Accelerate your business with blazing prototypes
PDF
Comparing open source private cloud platforms
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
Protecting Open Innovation with the Defensive Patent License
Using Cascalog to build an app with City of Palo Alto Open Data
Finite State Machines - Why the fear?
Open Source Automotive Development
How we built our community using Github - Uri Cohen
The Vanishing Pattern: from iterators to generators in Python
Distributed Coordination with Python
An overview of open source in East Asia (China, Japan, Korea)
Oscon 2013 Jesse Anderson
US Patriot Act OSCON2012 David Mertz
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
Big Data for each one of us
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
Declarative web data visualization using ClojureScript
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
A Look at the Network: Searching for Truth in Distributed Applications
Life After Sharding: Monitoring and Management of a Complex Data Cloud
Faster! Faster! Accelerate your business with blazing prototypes
Comparing open source private cloud platforms
Ad

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation theory and applications.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Cloud computing and distributed systems.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
sap open course for s4hana steps from ECC to s4
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectroscopy.pptx food analysis technology
Encapsulation theory and applications.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Programs and apps: productivity, graphics, security and other tools
Cloud computing and distributed systems.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine Learning_overview_presentation.pptx
Assigned Numbers - 2025 - Bluetooth® Document
sap open course for s4hana steps from ECC to s4
A comparative analysis of optical character recognition models for extracting...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx

Scalling Solr in the Cloud - OSCON Data 2011

  • 1. Scaling Solr in the Cloud By @ablyler & @LindsaySnider FROM @NutshellCRM www.nutshell.com
  • 2. Agenda About the Speakers About Nutshell Nutshell and Solr Solr Resource Usage Scaling Methods Questions and Answers
  • 3. About the Speakers BitLeap / Barracuda Networks Developers on the Backup Appliance / Cloud Scaled databases and storage systems Used SugarCRM & Salesforce.com
  • 4. About Nutshell Web and Mobile CRM application Heavy use of OpenSource technologies: Gentoo Nginx / PHP / ZendFramework / jQuery MySQL / Solr / Gearman Jenkins / Redmine / Cacti / Nagios
  • 5. Nutshell and Solr Heavy use of Solr for searching, table views, and de-duplication Used for searching / display: Accounts, Competitors, Contacts, Leads, Products, Sources, Teams, and Users Used for de-duplication: Accounts, Contacts
  • 6. Reads vs Writes 7000 5250 3500 1750 0 Jul 20, 2011 3:00 AM Jul 20, 2011 6:00 AM Jul 20, 2011 9:00 AM Jul 20, 2011 12:00 PM Jul 20, 2011 3:00 PM Jul 20, 2011 6:00 PM Jul 20, 2011 9:00 PM Jul 21, 2011 12:00 AM Writes Reads Time Average Read Query Time: 2.11ms
  • 8. Computer Resources CPU Disk I/O Disk RAM Storage
  • 9. CPU Disk I/O Disk RAM Storage
  • 10. SOLR Resources Heavy CPU Disk I/O Disk RAM Storage Light
  • 11. SOLR Resources Heavy CPU Disk I/O Disk RAM Storage Light
  • 12. SOLR Resources Heavy CPU Disk I/O Disk RAM Storage Light
  • 13. SOLR Resources Heavy CPU Disk I/O Disk RAM Storage Light
  • 14. SOLR Resources Heavy CPU Disk I/O Disk RAM Storage Light
  • 15. Dark Ages Age of Enlightenment Modern Era Today Auto Provisioning Setup new Solr Jetty app Create MySQL database Populate MySQL / Solr with demo data Send welcome email
  • 16. Dark Ages Age of Enlightenment Modern Era Today Separate Jetty per Customer Uses a ton of memory Separate schema / Solr for each customer Ran into upper limit morning before launch
  • 17. Dark Ages Age of Enlightenment Modern Era Today Auto provisioning Separate Jetty app for each customer
  • 18. Dark Ages Age of Enlightenment Modern Era Today 50 25 0 Auto provisioning Separate Jetty app for each customer
  • 19. Dark Ages Age of Enlightenment Modern Era Today Solr Core per Customer Allows for management of Solr on a per customer basis: creating / stopping Contained within a single Jetty app Shared schema between all cores Easily managed via simple HTTP API
  • 20. Dark Ages Age of Enlightenment Modern Era Today Fallback to MySQL Landing page of application Allows for graceful handling when Solr is down Abstracted within the application library
  • 21. Dark Ages Age of Enlightenment Modern Era Today Sun JVM to IcedTea JVM IcedTea JVM uses less memory than Sun JVM
  • 22. Dark Ages Age of Enlightenment Modern Era Today Separate Solr core per customer Fallback to MySQL for table data Migrated from Sun JVM to IcedTea JVM
  • 23. Dark Ages Age of Enlightenment Modern Era Today 300 150 0 Separate Solr core per customer Fallback to MySQL for table data Migrated from Sun JVM to IcedTea JVM
  • 24. Dark Ages Age of Enlightenment Modern Era Today Shared Schema Across Cores Decreases initialization time for each core Decreases memory usage
  • 25. Dark Ages Age of Enlightenment Modern Era Today Solr Index Field Selection More indexed fields = more used memory Only index fields that are searched Store other non-indexed fields for display
  • 26. Dark Ages Age of Enlightenment Modern Era Today Splitting of Reader / Writer Index building is CPU / disk intensive Writer = Solr with caching disabled Reader = Solr slave, that doesn’t build indexes
  • 27. Dark Ages Age of Enlightenment Modern Era Today Web Solr MySQL Slave (master- master)
  • 28. Dark Ages Age of Enlightenment Modern Era Today Web Solr MySQL Slave (master- master) Solr Master Range indexer Range indexer Range indexer Range indexer Document indexers Gearman workers
  • 29. Dark Ages Age of Enlightenment Modern Era Today Web Solr MySQL Slave (master- master) Solr Master Range indexer Range indexer Range indexer Range indexer Document indexers Gearman workers
  • 30. Dark Ages Age of Enlightenment Modern Era Today Web Solr MySQL Slave (master- master) Solr Master Range indexer Range indexer Range indexer Range indexer Document indexers Gearman workers
  • 31. Dark Ages Age of Enlightenment Modern Era Today Web Solr MySQL Slave (master- master) Solr Master Range indexer Range indexer Range indexer Range indexer Range indexers Reindex Manager
  • 32. Dark Ages Age of Enlightenment Modern Era Today Web Solr MySQL Slave (master- master) Solr Master Range indexer Range indexer Range indexer Range indexer Range indexers Reindex Manager
  • 33. Dark Ages Age of Enlightenment Modern Era Today Web Solr MySQL Slave (master- master) Solr Master Range indexer Range indexer Range indexer Range indexer Range indexers Reindex Manager
  • 34. Dark Ages Age of Enlightenment Modern Era Today Shared schema across cores Solr index field selection Splitting of reader / writer roles Intelligent indexing / reindexing
  • 35. Dark Ages Age of Enlightenment Modern Era Today 1000 500 0 Shared schema across cores Solr index field selection Splitting of reader / writer roles Intelligent indexing / reindexing
  • 36. Dark Ages Age of Enlightenment Modern Era Today Intelligent Core Management Least recently used Solr cores are spun down Solr cores started on login Reindexing is a database flag, and happens on the next login
  • 37. Dark Ages Age of Enlightenment Modern Era Today Partitioning Pairs of readers and writers Partitioned based on account id Left pad the account id w/ zeros to length of two Reverse the account id Take last two digits of the account id
  • 38. Dark Ages Age of Enlightenment Modern Era Today Intelligent core spin down / up Partitioning of customers to separate Solr servers
  • 39. Dark Ages Age of Enlightenment Modern Era Today 8000 4000 0 Intelligent core spin down / up Partitioning of customers to separate Solr servers
  • 42. SOLR SOLR SOLR Server SOLR Server SOLR Server SOLR 8000 Server UserSOLR 8000 Server User 8000 Server 8000User 8000User Server 8000User 8000User User
  • 43. SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User
  • 44. SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User
  • 45. SOLR Server 8000 User SOLR Server 8000 User 123456 SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User
  • 46. SOLR Server 8000 User SOLR Server 8000 User 123456 SOLR Server 8000 User 1 2 3 4 5 6 SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User
  • 47. SOLR Server 8000 User SOLR Server 8000 User 123456 SOLR Server 8000 User 1 2 3 4 5 6 SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User SOLR Server 8000 User
  • 48. SOLR Server 8000 User SOLR Server 8000 User 123456 SOLR Server 8000 User 1 2 3 4 5 6 SOLR Server 8000 User SOLR 1 2 3 4 5 6 Server 8000 User SOLR Server 8000 User SOLR Server 8000 User
  • 49. SOLR Server 8000 User SOLR Server 8000 User 123456 SOLR Server 8000 User 1 2 3 4 5 6 SOLR Server 8000 User SOLR 1 2 3 4 5 6 Server 8000 User 65 SOLR Server 8000 User SOLR Server 8000 User
  • 50. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 123456 03 SOLR 04 Server 8000 User 1 2 3 4 5 6 65 SOLR Server 66 8000 User SOLR 1 2 3 4 5 6 96 Server 8000 User 97 65 SOLR 98 Server 8000 User 99 SOLR Server 8000 User
  • 51. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 123456 03 SOLR 04 Server 8000 User 1 2 3 4 5 6 65 SOLR Server 66 8000 User SOLR 1 2 3 4 5 6 96 Server 8000 User 97 65 SOLR 98 Server 8000 User 99 SOLR Server 8000 User
  • 52. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 123456 03 SOLR 04 Server 8000 User 1 2 3 4 5 6 65 SOLR Server 66 8000 User SOLR 1 2 3 4 5 6 96 Server 8000 User 97 65 SOLR 98 Server 8000 User 99 SOLR Server 8000 User
  • 53. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR 96 Server 8000 User 97 SOLR 98 Server 8000 User 99 SOLR Server 8000 User
  • 54. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR 96 Server 8000 User 97 SOLR 98 Server 8000 User 99 SOLR Server 8000 User
  • 55. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR Server 8000 User SOLR 96 Server 8000 User 97 SOLR 98 Server 8000 User 99 SOLR Server 8000 User
  • 56. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR Server 8000 User SOLR 96 Server 8000 User SOLR 97 Server SOLR 8000 User 98 Server 8000 User 99 SOLR Server 8000 User
  • 57. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR Server 8000 User SOLR 96 Server 8000 User SOLR 97 Server SOLR 8000 User 98 Server 8000 User 99 SOLR Server 8000 User
  • 58. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR Server 8000 User SOLR 96 Server 8000 User SOLR 97 Server SOLR 8000 User 98 Server 8000 User 99 SOLR Server 8000 User
  • 59. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR Server 8000 User SOLR 96 Server 8000 User SOLR 97 Server SOLR 8000 User 98 Server 8000 User 99 SOLR Server 8000 User
  • 60. SOLR Server 8000 User 01 SOLR 02 Server 8000 User 03 SOLR 04 Server 8000 User 65 SOLR Server 66 8000 User SOLR Server 8000 User 96 SOLR 97 Server SOLR 8000 User 98 Server 8000 User 99 SOLR Server 8000 User
  • 61. Scaling Solr in the Cloud auto provisioning 50 Users separate Jetty app for each customer separate Solr core per customer fall back to MySQL for table data 300 Users migrated from Sun JVM to IcedTea JVM shared schema across cores solr index field selection 600 Users splitting reader / writer roles intelligent core spin down / up 7000 Users parititioning of customer to separate Solr servers By @ablyler & @LindsaySnider FROM @NutshellCRM