You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by ishwar ramani <rv...@gmail.com> on 2009/11/11 01:34:00 UTC

recovering from zookeeper failures

Hi,

I am setting up a simple hbase system. I currently have a 2 node
clsuter server for
the zookeeper servers ...

I read that zookeeper needs a simple majority to recover from failures.
So is 2 same as 1 as far as recovery goes? Does it help in load balancing.

If 1 of 2  goes down , does it affect the hbase tables? i,e if i install a new
zoo keeper server (replace) can i recover the tables?

thanks
ishwar

Re: recovering from zookeeper failures

Posted by Ryan Rawson <ry...@gmail.com>.
Another word on Zookeeper, at a recent presentation, the ZK guys said
that yahoo was supporting thousands of clients from a 5 node cluster.
Some of my numbers may be off, but a single node for a small cluster
should be just fine.

On Tue, Nov 10, 2009 at 5:28 PM, Tatsuya Kawano
<ta...@snowcocoa.info> wrote:
> hi ishwar,
>
>> I read that zookeeper needs a simple majority to recover from failures.
>> So is 2 same as 1 as far as recovery goes?
>
> Yes. When they lost contact with other (e.g. by a network disruption),
> they both stop serving because they can't say "I'm in the majority."
>
>
>> Does it help in load balancing.
>
> I don't find a clear answer for this in ZK documents, but I found this
> JIRA says "Clients randomly connect to a server, which typically
> balances the number of sessions", so the answer should be yes.
>
> https://issues.apache.org/jira/browse/ZOOKEEPER-571
>
>
>> If 1 of 2  goes down , does it affect the hbase tables? i,e if i install a new
>> zoo keeper server (replace) can i recover the tables?
>
> When ZK ensemble becomes unavailable, HBase master and region servers
> think they are disconnected from the HBase cluster, so they shutdown
> gracefully. You shouldn't loose any data by this, but you have to
> start the HBase cluster again once ZK ensemble becomes available.
>
>
> Thanks,
>
> --
> Tatsuya Kawano (Mr.)
> Tokyo, Japan
>
>
>
> On Wed, Nov 11, 2009 at 9:34 AM, ishwar ramani <rv...@gmail.com> wrote:
>> Hi,
>>
>> I am setting up a simple hbase system. I currently have a 2 node
>> clsuter server for
>> the zookeeper servers ...
>>
>> I read that zookeeper needs a simple majority to recover from failures.
>> So is 2 same as 1 as far as recovery goes? Does it help in load balancing.
>>
>> If 1 of 2  goes down , does it affect the hbase tables? i,e if i install a new
>> zoo keeper server (replace) can i recover the tables?
>>
>> thanks
>> ishwar
>

Re: recovering from zookeeper failures

Posted by Tatsuya Kawano <ta...@snowcocoa.info>.
hi ishwar,

> I read that zookeeper needs a simple majority to recover from failures.
> So is 2 same as 1 as far as recovery goes?

Yes. When they lost contact with other (e.g. by a network disruption),
they both stop serving because they can't say "I'm in the majority."


> Does it help in load balancing.

I don't find a clear answer for this in ZK documents, but I found this
JIRA says "Clients randomly connect to a server, which typically
balances the number of sessions", so the answer should be yes.

https://issues.apache.org/jira/browse/ZOOKEEPER-571


> If 1 of 2  goes down , does it affect the hbase tables? i,e if i install a new
> zoo keeper server (replace) can i recover the tables?

When ZK ensemble becomes unavailable, HBase master and region servers
think they are disconnected from the HBase cluster, so they shutdown
gracefully. You shouldn't loose any data by this, but you have to
start the HBase cluster again once ZK ensemble becomes available.


Thanks,

-- 
Tatsuya Kawano (Mr.)
Tokyo, Japan



On Wed, Nov 11, 2009 at 9:34 AM, ishwar ramani <rv...@gmail.com> wrote:
> Hi,
>
> I am setting up a simple hbase system. I currently have a 2 node
> clsuter server for
> the zookeeper servers ...
>
> I read that zookeeper needs a simple majority to recover from failures.
> So is 2 same as 1 as far as recovery goes? Does it help in load balancing.
>
> If 1 of 2  goes down , does it affect the hbase tables? i,e if i install a new
> zoo keeper server (replace) can i recover the tables?
>
> thanks
> ishwar

Re: recovering from zookeeper failures

Posted by Ryan Rawson <ry...@gmail.com>.
Hi,

Zookeeper is a 2N+1 system.  2 nodes is the same as 1, a single
failure will take the system offline.  You will need to deploy at
least 3 nodes to get protection from 1 recovery.  3 to 5 nodes is a
typical deployment scenario.

If ZK goes down, you can expect a complete crash of hbase, which can
potentially lose data due to not having HDFS-265.  So you don't want
that.

If you dont have many nodes, running ZK 1 node on the master/namenode
is probably fine.  IF that node crashes, you'll be having HDFS
problems anyways :-)

-ryan


On Tue, Nov 10, 2009 at 4:34 PM, ishwar ramani <rv...@gmail.com> wrote:
> Hi,
>
> I am setting up a simple hbase system. I currently have a 2 node
> clsuter server for
> the zookeeper servers ...
>
> I read that zookeeper needs a simple majority to recover from failures.
> So is 2 same as 1 as far as recovery goes? Does it help in load balancing.
>
> If 1 of 2  goes down , does it affect the hbase tables? i,e if i install a new
> zoo keeper server (replace) can i recover the tables?
>
> thanks
> ishwar
>