SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Managing a large scale
SolrCloud cluster via APIs
Anshum Gupta
Sr. Software Engineer, IBM Watson
Apache Lucene/Solr Committer & PMC member
About me
• Anshum Gupta, Apache Lucene/Solr committer and PMC member,
IBM Watson Search team.
• Interested in search and related stuff.
• Apache Lucene since 2006 and Solr since 2010.
© 2014 International Business Machines Corporation 2
Apache Solr is the most widely-used search solution
on the planet.
Solr has tens of thousands of applications in
production.
You use everyday.
8,000,000+
Total downloads
Solr is both established
and growing.
250,000+
Monthly downloads
2,500+
Open Solr jobs and the largest community
of developers.
A little bit of history
• SolrCloud
• Introduced in 4.0
• Not Solr in the Cloud but set of distributed features for Solr
• No APIs to manage distributed clusters
• We’ve come a long way since then
© 2014 International Business Machines Corporation 4
01
SolrCloud - Physical Architecture
ZooKeep
er
Node 1 Node 2
Load
Balancer
Client
Client
Client
Client
Client
Client
Client
Client
Client
Lots
Of
Interaction
Coins by Creative Stall from the Noun Project
SolrCloud Terminology
• Node: JVM process that hosts the Solr web application
• Collection: Logic index distributed across multiple nodes
• Shard: Logical slice of a collection. Each shard has a name, hash range
(optional), leader, and replicationFactor.
• Replica: Physical Solr index that can accept updates or queries. Implemented
as a Solr core.
• ReplicationFactor: Number of copies of each shard.
• Leader: One replica per shard which assumes special duties like versioning.
They are elected using ZooKeeper.
• Overseer: Special node that manages cluster level operations. Also elected
using Zookeeper.
© 2014 International Business Machines Corporation 6
CONFIDENTIAL
Exploring the APIs - Getting Started
© 2014 International Business Machines Corporation 7
Creating a collection
• HTTP API
• Response
© 2014 International Business Machines Corporation 8
http://localhost:8983/solr/admin/collections?action=CREATE&name=foo&numShard
s=2&replicationFactor=1
{"responseHeader":{
"status":0,
"QTime":1848},
"success":{
"":{"responseHeader":{
"status":0,
"QTime":1741},
"core":"foo_shard1_replica1"}}}
Add a replica
• HTTP API
• Response
© 2014 International Business Machines Corporation 9
http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=fo
o&shard=shard1
{"responseHeader":{
"status":0,
"QTime":1156},
"success":{
"":{"responseHeader":{
"status":0,
"QTime":1147},
"core":"foo_shard1_replica4"}}}
+
We added more than what we need - Delete replica
• HTTP API
• Response
© 2014 International Business Machines Corporation 10
http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection
=foo&shard=shard1&replica=core_node3
{"responseHeader":{
"status":0,
"QTime":111},
"success":{
"":{
"responseHeader":{
"status":0,
"QTime":2}}}}
CONFIDENTIAL
Exploring the APIs - Rule based scaling out
© 2014 International Business Machines Corporation 11
Rule based Replica Assignment
• Use it during creation of:
• Collection
• Shard
• Replica
• Rules based on:
• Hostname
• Free disk space
• Number of cores
• Node name
• System property
• Other Metrics
© 2014 International Business Machines Corporation 12
Rule based Replica Assignment
• How is a rule defined?
• When creating a new replica, apply to each node.
• Supported Operators
© 2014 International Business Machines Corporation 13
f(shard, replica, tag)
default, > , < , !
Rule based Replica Assignment - Examples
• Example #1 - for any shard, limit number of replicas to 2 on any node
• Example #2 - For any replica, limit number of cores to 5 on a node
• Example #3 - Do not create any cores on host 198.21.2.19
© 2014 International Business Machines Corporation 14
shard:*,replica:<2,node:*
replica:*,cores:<5
host:!198.21.2.19
CONFIDENTIAL
Adjusting to growth - Moving data
© 2014 International Business Machines Corporation 15
Divide and Rule? - Let’s split a shard
• HTTP API
• Response
© 2014 International Business Machines Corporation 16
http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=ba
r&shard=shard1
Too Verbose to Share!
Another way to move data - Migrate
• HTTP API
• Response
• What happens?
• Move documents to target collection
• Handle incoming updates and have temporary routing for original collection to
send updates to target
© 2014 International Business Machines Corporation 17
http://localhost:8983/solr/admin/collections?action=MIGRATE&collection=foo&s
plit.key=a!&target.collection=bar
Too Verbose to fit in here!
CONFIDENTIAL
Monitoring your Cluster
© 2014 International Business Machines Corporation 18
LIST Collections - Let’s see what we have
• HTTP API
• Response
© 2014 International Business Machines Corporation 19
http://localhost:8983/solr/admin/collections?action=LIST
{"responseHeader":{
"status":0,
"QTime":0},
"collections":["a",
"bar",
"foo"]}
CLUSTERSTATUS : Don’t we like details?
© 2014 International Business Machines Corporation 20
http://localhost:8983/solr/admin/
collections?action=CLUSTERSTATUS
{"cluster":{
"collections":{
"foo":{
"replicationFactor":"1",
"shards":{"shard1":{
"range":"80000000-7fffffff",
"state":"active",
"replicas":{
"core_node1":{
"core":"foo_shard1_replica1",
"base_url":"http://192.168.1.125:8983/solr",
"node_name":"192.168.1.125:8983_solr",
"state":"active",
"leader":"true"},
"core_node2":{
"core":"foo_shard1_replica2",
"base_url":"http://192.168.1.125:8983/solr",
"node_name":"192.168.1.125:8983_solr",
"state":"active"}}}},
"router":{"name":"compositeId"},
"maxShardsPerNode":"100",
"autoAddReplicas":"false",
"znodeVersion":14,
"configName":"a"}},
"live_nodes":["192.168.1.125:8983_solr"]}}
• HTTP API
OVERSEERSTATUS - More than a sneak peek
© 2014 International Business Machines Corporation 21
http://localhost:8983/solr/admin/collections?action=OVERSEERSTATUS
• HTTP API
• Response - Verbose. Actually, more than that!
• Stats for:
• Errors
• Time taken
• Much more
CONFIDENTIAL
Managing your Cluster
© 2014 International Business Machines Corporation 22
Set a specific node to be the Overseer
© 2014 International Business Machines Corporation 23
http://localhost:8983/solr/admin/collections?action=ADDROLE&role=overseer&node
=192.168.1.125:8983_solr
• ADD Role
• Response - Nothing substantial but a 200 on success
• Supported role:
• Only Overseer for now
• Remember - It’s only a preference
Setting a preferred leader
© 2014 International Business Machines Corporation 24
http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard
1&collection=foo&replica=core_node2&property=preferredLeader&property.value=tr
ue
• Using ADDREPLICAPROP
• Sets ‘preferredLeader’ to ‘true’. The only pre-defined property.
Setting preferred leaders for the entire collection
© 2014 International Business Machines Corporation 25
http://localhost:8983/solr/admin/collections?action=BALANCESHARDUNIQUE&collect
ion=foo&property=preferredLeader
• Using BALANCESHARDUNIQUE
• Sets ‘preferredLeader’ to ‘true’ evenly across the collection
Rebalance the leaders
© 2014 International Business Machines Corporation 26
http://localhost:8983/solr/admin/collections?action=REBALANCELEADERS&collecti
on=foo
• Using REBALANCELEADERS
• This allows preferredLeaders to take up leadership for shards.
I lost my leader! Where do I go now?
© 2014 International Business Machines Corporation 27
http://localhost:8983/solr/admin/collections?action=FORCELEADER&collection=fo
o&shard=shard1
• Force a leader election using FORCELEADER API
• This can ONLY be used when the shard has no leader.
CONFIDENTIAL
Recipe #1 - Shard Splitting
© 2014 International Business Machines Corporation 28
Splitting a shard - It’s more than just the single API call
• Monitor disk-size
• CLUSTERSTATUS & Core STATUS
• SPLITSHARD
• Make sure there’s enough spare disk space
• Add one more replica
• Force leader election (DELETEREPLICA)
• Delete old INACTIVE shard (Parent)
© 2014 International Business Machines Corporation 29
CONFIDENTIAL
Recipe #2 - Ensuring high availability
© 2014 International Business Machines Corporation 30
High availability through a monitoring application
• Auto-add replica
• Monitor cluster status - CLUSTERSTATUS API
• ADD Replica using replica placement strategy
• Remove replicas when there are too many
© 2014 International Business Machines Corporation 31
CONFIDENTIAL
Recipe #3 - Migrating Cluster Infrastructure
© 2014 International Business Machines Corporation 32
Migrating cluster infrastructure
• CLUSTERSTATUS, and OVERSEERSTATUS
• Overseer, Leaders, etc.
• Move the Overseer first OR last
• Rebalance leaders
• Force leader elections if required*
© 2014 International Business Machines Corporation 33
*The assumption is you know what you’re doing!
CONFIDENTIAL
What’s more?
© 2014 International Business Machines Corporation 34
There’s a lot more, a single session is too less!
• Version 2 APIs
• SolrJ support for all the APIs - Easy to tool in Java
• Security
• Cross Data Center Support
© 2014 International Business Machines Corporation 35
Coming Soon - SolrCloud Backup and Restore!
• Committed just a few days ago
• Back up and restore of
• Collections
• ZK metadata
• Configs
• Release with 6.1 (and may be 5.6)
© 2014 International Business Machines Corporation 36
http://www.twitter.com/anshumgupta
http://www.linkedin.com/in/anshumgupta/
anshum@apache.org
Connect @

Weitere ähnliche Inhalte

Was ist angesagt?

Python과 Git으로 만드는 모바일 게임 패치 시스템
Python과 Git으로 만드는 모바일 게임 패치 시스템Python과 Git으로 만드는 모바일 게임 패치 시스템
Python과 Git으로 만드는 모바일 게임 패치 시스템Youngtaek Oh
 
송창규, unity build로 빌드타임 반토막내기, NDC2010
송창규, unity build로 빌드타임 반토막내기, NDC2010송창규, unity build로 빌드타임 반토막내기, NDC2010
송창규, unity build로 빌드타임 반토막내기, NDC2010devCAT Studio, NEXON
 
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games ConferenceKGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games ConferenceXionglong Jin
 
C++20 Coroutine
C++20 CoroutineC++20 Coroutine
C++20 Coroutine진화 손
 
Design Patterns In Scala
Design Patterns In ScalaDesign Patterns In Scala
Design Patterns In ScalaKnoldus Inc.
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기SeungYong Oh
 
프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법중선 곽
 
자바에서 null을 안전하게 다루는 방법
자바에서 null을 안전하게 다루는 방법자바에서 null을 안전하게 다루는 방법
자바에서 null을 안전하게 다루는 방법Sungchul Park
 
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개태준 문
 
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개Ian Choi
 
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019min woog kim
 
모두가 성장하는 스터디 만들기
모두가 성장하는 스터디 만들기모두가 성장하는 스터디 만들기
모두가 성장하는 스터디 만들기BYUNGHOKIM10
 
코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)
코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)
코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)Suhyun Park
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013devCAT Studio, NEXON
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략YEONG-CHEON YOU
 

Was ist angesagt? (20)

Python과 Git으로 만드는 모바일 게임 패치 시스템
Python과 Git으로 만드는 모바일 게임 패치 시스템Python과 Git으로 만드는 모바일 게임 패치 시스템
Python과 Git으로 만드는 모바일 게임 패치 시스템
 
송창규, unity build로 빌드타임 반토막내기, NDC2010
송창규, unity build로 빌드타임 반토막내기, NDC2010송창규, unity build로 빌드타임 반토막내기, NDC2010
송창규, unity build로 빌드타임 반토막내기, NDC2010
 
URLで遊ぼう
URLで遊ぼうURLで遊ぼう
URLで遊ぼう
 
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games ConferenceKGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
 
About Programmer 2021
About Programmer 2021About Programmer 2021
About Programmer 2021
 
C++20 Coroutine
C++20 CoroutineC++20 Coroutine
C++20 Coroutine
 
Design Patterns In Scala
Design Patterns In ScalaDesign Patterns In Scala
Design Patterns In Scala
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
 
Demystifying OAuth2 for PHP
Demystifying OAuth2 for PHPDemystifying OAuth2 for PHP
Demystifying OAuth2 for PHP
 
프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법
 
Proxy Design Pattern
Proxy Design PatternProxy Design Pattern
Proxy Design Pattern
 
자바에서 null을 안전하게 다루는 방법
자바에서 null을 안전하게 다루는 방법자바에서 null을 안전하게 다루는 방법
자바에서 null을 안전하게 다루는 방법
 
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
 
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
 
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
 
모두가 성장하는 스터디 만들기
모두가 성장하는 스터디 만들기모두가 성장하는 스터디 만들기
모두가 성장하는 스터디 만들기
 
코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)
코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)
코딩 테스트 및 알고리즘 문제해결 공부 방법 (고려대학교 KUCC, 2022년 4월)
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략
 

Ähnlich wie Managing a SolrCloud cluster using APIs

OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetupragss
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to DeploymentAerospike, Inc.
 
Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Jonas Rosland
 
Apache Accumulo Overview
Apache Accumulo OverviewApache Accumulo Overview
Apache Accumulo OverviewBill Havanki
 
Cloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCodemotion
 
NetIQ identity powered security
NetIQ identity powered security   NetIQ identity powered security
NetIQ identity powered security Finceptum Oy
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java3Pillar Global
 
Add Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAdd Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAppDynamics
 
Securing Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise ScaleSecuring Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise ScaleDevOps.com
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Chef
 
SolrCloud Cluster management via APIs
SolrCloud Cluster management via APIsSolrCloud Cluster management via APIs
SolrCloud Cluster management via APIsAnshum Gupta
 
Halifax DevOps - Meet-up - July.19 2017
Halifax DevOps - Meet-up - July.19 2017Halifax DevOps - Meet-up - July.19 2017
Halifax DevOps - Meet-up - July.19 2017Kyle Bassett
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackke4qqq
 
Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0Hortonworks
 
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse FoundationOMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse FoundationOpen Mobile Alliance
 
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...VMworld
 

Ähnlich wie Managing a SolrCloud cluster using APIs (20)

OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
 
MySQL Fabric
MySQL FabricMySQL Fabric
MySQL Fabric
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015
 
Apache Accumulo Overview
Apache Accumulo OverviewApache Accumulo Overview
Apache Accumulo Overview
 
Cloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platform
 
NetIQ identity powered security
NetIQ identity powered security   NetIQ identity powered security
NetIQ identity powered security
 
Mule meetup 25thjan
Mule meetup 25thjanMule meetup 25thjan
Mule meetup 25thjan
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Add Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAdd Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring Toolkit
 
Securing Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise ScaleSecuring Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise Scale
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1
 
SolrCloud Cluster management via APIs
SolrCloud Cluster management via APIsSolrCloud Cluster management via APIs
SolrCloud Cluster management via APIs
 
Halifax DevOps - Meet-up - July.19 2017
Halifax DevOps - Meet-up - July.19 2017Halifax DevOps - Meet-up - July.19 2017
Halifax DevOps - Meet-up - July.19 2017
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
 
Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0
 
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse FoundationOMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
 
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
 
Avoid boring work_v2
Avoid boring work_v2Avoid boring work_v2
Avoid boring work_v2
 

Mehr von Anshum Gupta

Working with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache SolrWorking with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache SolrAnshum Gupta
 
Working with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache SolrWorking with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache SolrAnshum Gupta
 
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 SolrCloudAnshum Gupta
 
Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015Anshum Gupta
 
Solr security frameworks
Solr security frameworksSolr security frameworks
Solr security frameworksAnshum Gupta
 
Apache Solr 5.0 and beyond
Apache Solr 5.0 and beyondApache Solr 5.0 and beyond
Apache Solr 5.0 and beyondAnshum Gupta
 
Scaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of CollectionsScaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of CollectionsAnshum Gupta
 
Deploying and managing Solr at scale
Deploying and managing Solr at scaleDeploying and managing Solr at scale
Deploying and managing Solr at scaleAnshum Gupta
 
What's new in Solr 5.0
What's new in Solr 5.0What's new in Solr 5.0
What's new in Solr 5.0Anshum Gupta
 
Ease of use in Apache Solr
Ease of use in Apache SolrEase of use in Apache Solr
Ease of use in Apache SolrAnshum Gupta
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10Anshum Gupta
 

Mehr von Anshum Gupta (11)

Working with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache SolrWorking with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache Solr
 
Working with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache SolrWorking with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache Solr
 
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
 
Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015
 
Solr security frameworks
Solr security frameworksSolr security frameworks
Solr security frameworks
 
Apache Solr 5.0 and beyond
Apache Solr 5.0 and beyondApache Solr 5.0 and beyond
Apache Solr 5.0 and beyond
 
Scaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of CollectionsScaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of Collections
 
Deploying and managing Solr at scale
Deploying and managing Solr at scaleDeploying and managing Solr at scale
Deploying and managing Solr at scale
 
What's new in Solr 5.0
What's new in Solr 5.0What's new in Solr 5.0
What's new in Solr 5.0
 
Ease of use in Apache Solr
Ease of use in Apache SolrEase of use in Apache Solr
Ease of use in Apache Solr
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10
 

Kürzlich hochgeladen

Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 

Kürzlich hochgeladen (20)

Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 

Managing a SolrCloud cluster using APIs

  • 1. Managing a large scale SolrCloud cluster via APIs Anshum Gupta Sr. Software Engineer, IBM Watson Apache Lucene/Solr Committer & PMC member
  • 2. About me • Anshum Gupta, Apache Lucene/Solr committer and PMC member, IBM Watson Search team. • Interested in search and related stuff. • Apache Lucene since 2006 and Solr since 2010. © 2014 International Business Machines Corporation 2
  • 3. Apache Solr is the most widely-used search solution on the planet. Solr has tens of thousands of applications in production. You use everyday. 8,000,000+ Total downloads Solr is both established and growing. 250,000+ Monthly downloads 2,500+ Open Solr jobs and the largest community of developers.
  • 4. A little bit of history • SolrCloud • Introduced in 4.0 • Not Solr in the Cloud but set of distributed features for Solr • No APIs to manage distributed clusters • We’ve come a long way since then © 2014 International Business Machines Corporation 4
  • 5. 01 SolrCloud - Physical Architecture ZooKeep er Node 1 Node 2 Load Balancer Client Client Client Client Client Client Client Client Client Lots Of Interaction Coins by Creative Stall from the Noun Project
  • 6. SolrCloud Terminology • Node: JVM process that hosts the Solr web application • Collection: Logic index distributed across multiple nodes • Shard: Logical slice of a collection. Each shard has a name, hash range (optional), leader, and replicationFactor. • Replica: Physical Solr index that can accept updates or queries. Implemented as a Solr core. • ReplicationFactor: Number of copies of each shard. • Leader: One replica per shard which assumes special duties like versioning. They are elected using ZooKeeper. • Overseer: Special node that manages cluster level operations. Also elected using Zookeeper. © 2014 International Business Machines Corporation 6
  • 7. CONFIDENTIAL Exploring the APIs - Getting Started © 2014 International Business Machines Corporation 7
  • 8. Creating a collection • HTTP API • Response © 2014 International Business Machines Corporation 8 http://localhost:8983/solr/admin/collections?action=CREATE&name=foo&numShard s=2&replicationFactor=1 {"responseHeader":{ "status":0, "QTime":1848}, "success":{ "":{"responseHeader":{ "status":0, "QTime":1741}, "core":"foo_shard1_replica1"}}}
  • 9. Add a replica • HTTP API • Response © 2014 International Business Machines Corporation 9 http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=fo o&shard=shard1 {"responseHeader":{ "status":0, "QTime":1156}, "success":{ "":{"responseHeader":{ "status":0, "QTime":1147}, "core":"foo_shard1_replica4"}}} +
  • 10. We added more than what we need - Delete replica • HTTP API • Response © 2014 International Business Machines Corporation 10 http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection =foo&shard=shard1&replica=core_node3 {"responseHeader":{ "status":0, "QTime":111}, "success":{ "":{ "responseHeader":{ "status":0, "QTime":2}}}}
  • 11. CONFIDENTIAL Exploring the APIs - Rule based scaling out © 2014 International Business Machines Corporation 11
  • 12. Rule based Replica Assignment • Use it during creation of: • Collection • Shard • Replica • Rules based on: • Hostname • Free disk space • Number of cores • Node name • System property • Other Metrics © 2014 International Business Machines Corporation 12
  • 13. Rule based Replica Assignment • How is a rule defined? • When creating a new replica, apply to each node. • Supported Operators © 2014 International Business Machines Corporation 13 f(shard, replica, tag) default, > , < , !
  • 14. Rule based Replica Assignment - Examples • Example #1 - for any shard, limit number of replicas to 2 on any node • Example #2 - For any replica, limit number of cores to 5 on a node • Example #3 - Do not create any cores on host 198.21.2.19 © 2014 International Business Machines Corporation 14 shard:*,replica:<2,node:* replica:*,cores:<5 host:!198.21.2.19
  • 15. CONFIDENTIAL Adjusting to growth - Moving data © 2014 International Business Machines Corporation 15
  • 16. Divide and Rule? - Let’s split a shard • HTTP API • Response © 2014 International Business Machines Corporation 16 http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=ba r&shard=shard1 Too Verbose to Share!
  • 17. Another way to move data - Migrate • HTTP API • Response • What happens? • Move documents to target collection • Handle incoming updates and have temporary routing for original collection to send updates to target © 2014 International Business Machines Corporation 17 http://localhost:8983/solr/admin/collections?action=MIGRATE&collection=foo&s plit.key=a!&target.collection=bar Too Verbose to fit in here!
  • 18. CONFIDENTIAL Monitoring your Cluster © 2014 International Business Machines Corporation 18
  • 19. LIST Collections - Let’s see what we have • HTTP API • Response © 2014 International Business Machines Corporation 19 http://localhost:8983/solr/admin/collections?action=LIST {"responseHeader":{ "status":0, "QTime":0}, "collections":["a", "bar", "foo"]}
  • 20. CLUSTERSTATUS : Don’t we like details? © 2014 International Business Machines Corporation 20 http://localhost:8983/solr/admin/ collections?action=CLUSTERSTATUS {"cluster":{ "collections":{ "foo":{ "replicationFactor":"1", "shards":{"shard1":{ "range":"80000000-7fffffff", "state":"active", "replicas":{ "core_node1":{ "core":"foo_shard1_replica1", "base_url":"http://192.168.1.125:8983/solr", "node_name":"192.168.1.125:8983_solr", "state":"active", "leader":"true"}, "core_node2":{ "core":"foo_shard1_replica2", "base_url":"http://192.168.1.125:8983/solr", "node_name":"192.168.1.125:8983_solr", "state":"active"}}}}, "router":{"name":"compositeId"}, "maxShardsPerNode":"100", "autoAddReplicas":"false", "znodeVersion":14, "configName":"a"}}, "live_nodes":["192.168.1.125:8983_solr"]}} • HTTP API
  • 21. OVERSEERSTATUS - More than a sneak peek © 2014 International Business Machines Corporation 21 http://localhost:8983/solr/admin/collections?action=OVERSEERSTATUS • HTTP API • Response - Verbose. Actually, more than that! • Stats for: • Errors • Time taken • Much more
  • 22. CONFIDENTIAL Managing your Cluster © 2014 International Business Machines Corporation 22
  • 23. Set a specific node to be the Overseer © 2014 International Business Machines Corporation 23 http://localhost:8983/solr/admin/collections?action=ADDROLE&role=overseer&node =192.168.1.125:8983_solr • ADD Role • Response - Nothing substantial but a 200 on success • Supported role: • Only Overseer for now • Remember - It’s only a preference
  • 24. Setting a preferred leader © 2014 International Business Machines Corporation 24 http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard 1&collection=foo&replica=core_node2&property=preferredLeader&property.value=tr ue • Using ADDREPLICAPROP • Sets ‘preferredLeader’ to ‘true’. The only pre-defined property.
  • 25. Setting preferred leaders for the entire collection © 2014 International Business Machines Corporation 25 http://localhost:8983/solr/admin/collections?action=BALANCESHARDUNIQUE&collect ion=foo&property=preferredLeader • Using BALANCESHARDUNIQUE • Sets ‘preferredLeader’ to ‘true’ evenly across the collection
  • 26. Rebalance the leaders © 2014 International Business Machines Corporation 26 http://localhost:8983/solr/admin/collections?action=REBALANCELEADERS&collecti on=foo • Using REBALANCELEADERS • This allows preferredLeaders to take up leadership for shards.
  • 27. I lost my leader! Where do I go now? © 2014 International Business Machines Corporation 27 http://localhost:8983/solr/admin/collections?action=FORCELEADER&collection=fo o&shard=shard1 • Force a leader election using FORCELEADER API • This can ONLY be used when the shard has no leader.
  • 28. CONFIDENTIAL Recipe #1 - Shard Splitting © 2014 International Business Machines Corporation 28
  • 29. Splitting a shard - It’s more than just the single API call • Monitor disk-size • CLUSTERSTATUS & Core STATUS • SPLITSHARD • Make sure there’s enough spare disk space • Add one more replica • Force leader election (DELETEREPLICA) • Delete old INACTIVE shard (Parent) © 2014 International Business Machines Corporation 29
  • 30. CONFIDENTIAL Recipe #2 - Ensuring high availability © 2014 International Business Machines Corporation 30
  • 31. High availability through a monitoring application • Auto-add replica • Monitor cluster status - CLUSTERSTATUS API • ADD Replica using replica placement strategy • Remove replicas when there are too many © 2014 International Business Machines Corporation 31
  • 32. CONFIDENTIAL Recipe #3 - Migrating Cluster Infrastructure © 2014 International Business Machines Corporation 32
  • 33. Migrating cluster infrastructure • CLUSTERSTATUS, and OVERSEERSTATUS • Overseer, Leaders, etc. • Move the Overseer first OR last • Rebalance leaders • Force leader elections if required* © 2014 International Business Machines Corporation 33 *The assumption is you know what you’re doing!
  • 34. CONFIDENTIAL What’s more? © 2014 International Business Machines Corporation 34
  • 35. There’s a lot more, a single session is too less! • Version 2 APIs • SolrJ support for all the APIs - Easy to tool in Java • Security • Cross Data Center Support © 2014 International Business Machines Corporation 35
  • 36. Coming Soon - SolrCloud Backup and Restore! • Committed just a few days ago • Back up and restore of • Collections • ZK metadata • Configs • Release with 6.1 (and may be 5.6) © 2014 International Business Machines Corporation 36

Hinweis der Redaktion

  1. Deletion requires specifying the replica name. Will discuss how to get that when we discuss recipes later.
  2. there’s no <= or >=
  3. Only works for collections using hash routers
  4. Latest release - also contains aliases
  5. If you don’t give access to zk (solr as a service), this becomes even more useful
  6. Overseer - Orchestrates all things like collection, replica creation, deletion etc. and also manages zk-write interactions.
  7. Heavy UpdateRequestProcessor, run only once. ADDREPLICAPROP only adds the property passively
  8. Make sure that same solr instance doesn’t share multiple shard leaders for the same collection
  9. RF = 3, RF = 2, When there’s just 1 left, add one back. Check CLUSTER health before adding a replica