Reply
Contributor
Posts: 28
Registered: ‎01-19-2017

Communication with zookeeper with single common url instead multiple machine names and port

I have solr insalled on  3 machines and I have written java class and trying to connect with solr through zookeeper. But Zookeeper library forced me to mention the machines names where zookeeper installed.But I need to keep a common url and which will be confirgured in DNS server and dns server resolve to machine name. But I dont How could I achieve this?

Posts: 140
Topics: 7
Kudos: 15
Solutions: 14
Registered: ‎07-16-2015

Re: Communication with zookeeper with single common url instead multiple machine names and port

[ Edited ]

Well if you are connecting Solr using ZK then it is expected that you supply the ZK quorum as the connection information.

 

I have not tried to provide a virtual IP instead of the quorum information. But it should work, be sure to configure your virtual IP for TCP traffic (and not for http only).

 

What is the purpose of having a common URL instead of the ZK quorum ? What do you want to achieve with that ?

 

By the way, are you using SolrJ ?

 

regards,

Mathieu

Contributor
Posts: 28
Registered: ‎01-19-2017

Re: Communication with zookeeper with single common url instead multiple machine names and port

Thanks for your reply

 

Yes we are using Solrj.

 

We have DR cluster incase of PRO cluster down we need to move all calls to the DR cluster zookeeper.

 

For this we need to setup the virtual ip and this ip hits to the failover server where we will check the PRO is up or not. incase it is down then we need to redirect calls to the DR cluster.

 

We are planning to give DR cluster zookeeper quoram as well to the solr client. is this case what will happen on session id and zookeeper leader.

 

 

Highlighted
Posts: 140
Topics: 7
Kudos: 15
Solutions: 14
Registered: ‎07-16-2015

Re: Communication with zookeeper with single common url instead multiple machine names and port

Guess your DR cluster is running a completely separate ZK cluster.

I don't think SolrJ is designed for this (having two or more ZK quorum supplied). It will not handled it correctly I think.

 

We did have this similar kind of requirement (we also have a DR cluster or similar). In our case we choose to abandon the ZK connections and we are using the HttpClient alternative (also supported by SolrJ).

 

 

 

Announcements