SlideShare a Scribd company logo
1 of 18
Leveraging pull replicas in
Solr 7
+ Metric reporters in Solr 7
Samuel Tatipamula, Search team at
Our setup and use cases
SolrCloud model with nodes distributed over multiple clusters.
Indexing intensive - typical e-commerce use case with real time update events.
Ability to process the high indexing throughput is critical.
Recently upgraded to Solr 7.
Previously in Solr..
Solr 6 and before, all the nodes in SolrCloud are nrt.
Every shard replica gets /update requests and maintains tlog for failover and recovery.
Every node is eligible to become the leader.
Update lifecycle in Solr 6
Indexing
pipeline
(sync)
/update request {}
leader
replicareplica replica
Limitations we have faced
Latency for /update requests.
High network bandwidth consumption on leader - it used to hit 1 GBPS limit frequently in
case of heavy updates.
Replicas’ CPU utilization under heavy query load.
One of the workarounds for the network limitation was to distribute nodes into multiple
small clusters.
This means a lot of manual maintenance to make sure the schemas and configs are in sync
across clusters.
Also, the pipeline has to send /update requests to multiple clusters, and need to make sure
that the indices are in sync.
Limitations we have faced
New in Solr 7
Along with nrt, 2 new replica types are introduced for SolrCloud - tlog and pull.
A tlog replica gets /update requests from leader, maintains tlog for failover and recovery,
and it can become the leader.
A pull replica doesn’t get /update requests, doesn’t maintain tlog, and can’t become the
leader.
Both tlog and pull replicas fetch compressed index segments from leader.
Updates in Solr 7 with tlog and pull replicas
Indexing
pipeline
(sync)
/update request {}
leader
PULLTLOG PULL
New in Solr 7
tlog and pull replicas fetch new index segments (if any) from leader by polling periodically.
This interval is, by default, half of the hard commit time.
SolrCloud setup with tlog and pull
Leader is always nrt.
A couple of tlog replicas for failover and consistency.
Remaining all nodes can be pull replicas, as they are ideal for query performance.
Observations
Since replicas pull compressed index segments, and at different times, network bandwidth
utilisation reduced by ~30%.
/update response times decreased significantly - more updates can be processed in a given
time.
CPU utilisation on pull replicas is relatively less compared to previous nrt setup.
Recovery times for pull replicas are remarkably less.
Observations
Since the index updates to pull and tlog replicas are asynchronous, and happens after hard
commit, visibility of updates is impacted.
In case of replication failure to pull replicas, they keep serving reads with stale data.
In case of replication failure to pull replicas, as of now, Zookeeper doesn’t mark them as
down.
New metric reporters in Solr 7
Previously..
For monitoring and performance tuning, we would’ve to hit the metrics API.
JMX reporting could be used, and 3rd party monitoring tools, like sematext, worked on
JMX.
There was no seamless way to get metrics into existing Graphite or StatsD servers.
New metric reporters in Solr 7
Metrics maintained internally in the following registries..
- core - core specific info; replication, query etc..
- node - admin request handles, no. of cores etc..
- jetty - threads, pools, http requests etc..
- jvm - system memory, heap usage, CPU, GC etc..
New metric reporters in Solr 7
Uses DropWizard metrics API.
Readily available reporters
- JMX
- Graphite
- SLF4J
- Ganglia
We use StatsD, so we have created StatsD reporter
(based on ReadyTalk/metrics-statsd)
Configuring metric reporters
In your solr.xml, add the reporter and the registries needed..
<metrics>
<reporter name="graphite" group="node, jvm"
class="org.apache.solr.metrics.reporters.SolrGraphiteReporter">
<str name="host">graphite-server</str>
<int name="port">9999</int>
<int name="period">60</int>
<str name="prefix">solr-</str>
</reporter>
</metrics>
Q&A

More Related Content

What's hot (6)

Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
 
Splunk Ninjas: New Features, Pivot and Search Dojo
Splunk Ninjas: New Features, Pivot and Search DojoSplunk Ninjas: New Features, Pivot and Search Dojo
Splunk Ninjas: New Features, Pivot and Search Dojo
 
Solaris cluster roadshow day 2 technical presentation
Solaris cluster roadshow day 2 technical presentationSolaris cluster roadshow day 2 technical presentation
Solaris cluster roadshow day 2 technical presentation
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates
 
An Expert's Guide to User Management in JIRA and Confluence
An Expert's Guide to User Management in JIRA and ConfluenceAn Expert's Guide to User Management in JIRA and Confluence
An Expert's Guide to User Management in JIRA and Confluence
 
Managing Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with PuppetManaging Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with Puppet
 

Similar to Leveraging pull replicas in Solr 7

MongoDB Replication and Sharding
MongoDB Replication and ShardingMongoDB Replication and Sharding
MongoDB Replication and Sharding
Tharun Srinivasa
 
Remote core locking-Andrea Lombardo
Remote core locking-Andrea LombardoRemote core locking-Andrea Lombardo
Remote core locking-Andrea Lombardo
Andrea Lombardo
 

Similar to Leveraging pull replicas in Solr 7 (20)

Zookeeper Introduce
Zookeeper IntroduceZookeeper Introduce
Zookeeper Introduce
 
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
 
SVCC-2014
SVCC-2014SVCC-2014
SVCC-2014
 
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
Solr Compute Cloud - An Elastic SolrCloud Infrastructure Solr Compute Cloud - An Elastic SolrCloud Infrastructure
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
 
Solr Lucene Conference 2014 - Nitin Presentation
Solr Lucene Conference 2014 - Nitin PresentationSolr Lucene Conference 2014 - Nitin Presentation
Solr Lucene Conference 2014 - Nitin Presentation
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 
Simulation Based EIGRP with two Autonomous systems Performance Analysis
Simulation Based EIGRP with two Autonomous systems Performance Analysis Simulation Based EIGRP with two Autonomous systems Performance Analysis
Simulation Based EIGRP with two Autonomous systems Performance Analysis
 
Distributed Tracing
Distributed TracingDistributed Tracing
Distributed Tracing
 
Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...
 
MySQL Replication Performance in the Cloud
MySQL Replication Performance in the CloudMySQL Replication Performance in the Cloud
MySQL Replication Performance in the Cloud
 
Solr Lucene Revolution 2014 - Solr Compute Cloud - Nitin
Solr Lucene Revolution 2014 - Solr Compute Cloud - NitinSolr Lucene Revolution 2014 - Solr Compute Cloud - Nitin
Solr Lucene Revolution 2014 - Solr Compute Cloud - Nitin
 
Advanced Techniques for Exploiting ILP
Advanced Techniques for Exploiting ILPAdvanced Techniques for Exploiting ILP
Advanced Techniques for Exploiting ILP
 
AFFECT OF PARALLEL COMPUTING ON MULTICORE PROCESSORS
AFFECT OF PARALLEL COMPUTING ON MULTICORE PROCESSORSAFFECT OF PARALLEL COMPUTING ON MULTICORE PROCESSORS
AFFECT OF PARALLEL COMPUTING ON MULTICORE PROCESSORS
 
Affect of parallel computing on multicore processors
Affect of parallel computing on multicore processorsAffect of parallel computing on multicore processors
Affect of parallel computing on multicore processors
 
Automating the Hunt for Non-Obvious Sources of Latency Spreads
Automating the Hunt for Non-Obvious Sources of Latency SpreadsAutomating the Hunt for Non-Obvious Sources of Latency Spreads
Automating the Hunt for Non-Obvious Sources of Latency Spreads
 
Postgres clusters
Postgres clustersPostgres clusters
Postgres clusters
 
Why is dev ops for machine learning so different
Why is dev ops for machine learning so differentWhy is dev ops for machine learning so different
Why is dev ops for machine learning so different
 
MongoDB Replication and Sharding
MongoDB Replication and ShardingMongoDB Replication and Sharding
MongoDB Replication and Sharding
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
 
Remote core locking-Andrea Lombardo
Remote core locking-Andrea LombardoRemote core locking-Andrea Lombardo
Remote core locking-Andrea Lombardo
 

Recently uploaded

Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Recently uploaded (20)

8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 

Leveraging pull replicas in Solr 7

  • 1. Leveraging pull replicas in Solr 7 + Metric reporters in Solr 7 Samuel Tatipamula, Search team at
  • 2. Our setup and use cases SolrCloud model with nodes distributed over multiple clusters. Indexing intensive - typical e-commerce use case with real time update events. Ability to process the high indexing throughput is critical. Recently upgraded to Solr 7.
  • 3. Previously in Solr.. Solr 6 and before, all the nodes in SolrCloud are nrt. Every shard replica gets /update requests and maintains tlog for failover and recovery. Every node is eligible to become the leader.
  • 4. Update lifecycle in Solr 6 Indexing pipeline (sync) /update request {} leader replicareplica replica
  • 5. Limitations we have faced Latency for /update requests. High network bandwidth consumption on leader - it used to hit 1 GBPS limit frequently in case of heavy updates. Replicas’ CPU utilization under heavy query load.
  • 6. One of the workarounds for the network limitation was to distribute nodes into multiple small clusters. This means a lot of manual maintenance to make sure the schemas and configs are in sync across clusters. Also, the pipeline has to send /update requests to multiple clusters, and need to make sure that the indices are in sync. Limitations we have faced
  • 7. New in Solr 7 Along with nrt, 2 new replica types are introduced for SolrCloud - tlog and pull. A tlog replica gets /update requests from leader, maintains tlog for failover and recovery, and it can become the leader. A pull replica doesn’t get /update requests, doesn’t maintain tlog, and can’t become the leader. Both tlog and pull replicas fetch compressed index segments from leader.
  • 8. Updates in Solr 7 with tlog and pull replicas Indexing pipeline (sync) /update request {} leader PULLTLOG PULL
  • 9. New in Solr 7 tlog and pull replicas fetch new index segments (if any) from leader by polling periodically. This interval is, by default, half of the hard commit time.
  • 10. SolrCloud setup with tlog and pull Leader is always nrt. A couple of tlog replicas for failover and consistency. Remaining all nodes can be pull replicas, as they are ideal for query performance.
  • 11. Observations Since replicas pull compressed index segments, and at different times, network bandwidth utilisation reduced by ~30%. /update response times decreased significantly - more updates can be processed in a given time. CPU utilisation on pull replicas is relatively less compared to previous nrt setup. Recovery times for pull replicas are remarkably less.
  • 12. Observations Since the index updates to pull and tlog replicas are asynchronous, and happens after hard commit, visibility of updates is impacted. In case of replication failure to pull replicas, they keep serving reads with stale data. In case of replication failure to pull replicas, as of now, Zookeeper doesn’t mark them as down.
  • 13. New metric reporters in Solr 7
  • 14. Previously.. For monitoring and performance tuning, we would’ve to hit the metrics API. JMX reporting could be used, and 3rd party monitoring tools, like sematext, worked on JMX. There was no seamless way to get metrics into existing Graphite or StatsD servers.
  • 15. New metric reporters in Solr 7 Metrics maintained internally in the following registries.. - core - core specific info; replication, query etc.. - node - admin request handles, no. of cores etc.. - jetty - threads, pools, http requests etc.. - jvm - system memory, heap usage, CPU, GC etc..
  • 16. New metric reporters in Solr 7 Uses DropWizard metrics API. Readily available reporters - JMX - Graphite - SLF4J - Ganglia We use StatsD, so we have created StatsD reporter (based on ReadyTalk/metrics-statsd)
  • 17. Configuring metric reporters In your solr.xml, add the reporter and the registries needed.. <metrics> <reporter name="graphite" group="node, jvm" class="org.apache.solr.metrics.reporters.SolrGraphiteReporter"> <str name="host">graphite-server</str> <int name="port">9999</int> <int name="period">60</int> <str name="prefix">solr-</str> </reporter> </metrics>
  • 18. Q&A