Thank you everyone for the useful information. Would it be easy to reconfigure an existing clustered deployment to a standalone deployment? This is what I'm thinking:
I have two physical servers. I would have one Zk installed on server 1 and two Zk installed on server 2. I would have a Solr node on each server, each with one or more shards. If server 1 goes down, I should still be operational. If server 2 goes down, I would reconfigure the remaining Solr node and Zk on server 1 as a standalone deployment. Should that work in theory? If so, the only changes that I should need to make would be to update the zoo.cfg within Zk and to restart Zk and Solr in standalone mode? Thanks, Adam On Wed, May 2, 2018 at 8:23 AM, Andor Molnar <[email protected]> wrote: > Hi Adam, > > Zk uses quorum to get agreement between voting servers (leader and > followers). Quorum is calculated by majority of servers: N / 2 + 1, where N > is the number of servers. When you only have 2 Zk servers running, the > quorum equals 2 which means you need to have both servers up and running > for ZooKeeper to work. In this case you only have a live backup of the data > basically, but you don't have fault tolerance. > > If you would like to have fault tolerance, you need at least a 3rd server > "physically" separated with approx the same horsepower as the others. If > you have a weak machine and it's voted for leader, you'll lose write > performance, if it's voted for follower, you'll lose read performance. > > Running 2 physical machines as one, redundant hypervisor might be a good > option. You can run 3 VMs on top of that and if one of your servers goes > down, the other one will be able to run all 3 VMs which keeps ZK > operational. > > Hope that helps a little bit on Zk side. > > Regards, > Andor > > > > > > > > On Tue, May 1, 2018 at 9:52 PM, Shawn Heisey <[email protected]> wrote: > > > On 5/1/2018 8:55 AM, Adam Blank wrote: > > > I would like to have a high-availability/redundant installation of > > > Zookeeper running in my production environment. The problem is that I > > only > > > have 2 physical frames available, so that rules out configuring a > > Zookeeper > > > cluster/ensemble since I'd only have redundancy if the frame with the > > > minority of servers goes down. What is the best practice in this > > situation? > > > Is it possible to have a separate standalone install running on each > > frame > > > connected to the same set of SOLR nodes or to use one server as primary > > and > > > one as backup? > > > > I'm more familiar with the Solr side of the equation than the ZK side. > > That said, I do know if you want bulletproof fault tolerance for ZK, you > > must have at least three separate physical installations. > > > > For redundancy of Solr itself in SolrCloud, you only need two hosts, but > > for ZK, you need three. The minimal fault tolerant SolrCloud setup > > would run both Solr and ZK on two servers and a third ZK by itself. > > That third server would not need much horsepower. I've heard of people > > using a laptop or a low-end desktop for the third server. > > > > For best results, you would also want redundancy beyond the servers > > themselves -- power and network for each server ideally would be > > separate hardware. Some even go as far as separate racks and/or > > geographically diverse datacenters. > > > > Thanks, > > Shawn > > > > >
