Answers in line:
On 7/6/09 4:45 AM, "David Graf" <david.g...@28msec.com> wrote:
> I wanna set up a zookeeper ensemble on amazon's ec2 service. In my
> system, zookeeper is used to run a locking service and to generate
> unique id's. Currently, for testing purposes, I am only running one
> instance. Now, I need to set up an ensemble to protect my system
> against crashes.
> The ec2 services has some differences to a normal server farm. E.g.
> the data saved on the file system of an ec2 instance is lost if the
> instance crashes. In the documentation of zookeeper, I have read that
> zookeeper saves snapshots of the in-memory data in the file system. Is
> that needed for recovery? Logically, it would be much easier for me if
> this is not the case.
Yes, zookeeper keeps persistent state on disk. This is used for recovery and
correctness of zookeeper.
> Additionally, ec2 brings the advantage that serves can be switch on
> and off dynamically dependent on the load, traffic, etc. Can this
> advantage be utilized for a zookeeper ensemble? Is it possible to add
> a zookeeper server dynamically to an ensemble? E.g. dependent on the
> in-memory load?
It is not yet possible to add servers dynamically. There is work going on to
to that on http://issues.apache.org/jira/browse/ZOOKEEPER-107. This should
get into the next release (am hoping). For now, you will have to do a
rolling restart if you do not want the services to do down or else restart
all the machines at the same time (the zookeeper cleints should be able to
handle a minor downtime of zookeeper service).