Hi Kapil,
ZooKeeper server guarantees a total order of messages, and it also
guarantees a total order of proposals. It has internal mechanism to do the
total ordering, which uses a transaction id (zxid) for the requests. As I
know, each transaction is independent to each other. Could you give
in the section you are referring to we are pointing out that sometimes you
can reduce the load on ZooKeeper if you avoid waking up the herd when you
don't have to. waking up 1000 processes so that one of them can become
leader is an unnecessary cost, but if you want everyone to know about a
change
Thanks Rakesh for mail,
My functionality is as follows.
I am going to use zookeeper to allocate IP addresses. So it will allocate Ip
address from given pool of available IP addresses each time request comes.
Once Ip address allocated I am going to store it in znode to maintain record
so that I can
I hope you will be keeping each IP address as an znode in ZooKeeper. Also,
if you don't have any costly operation before storing the znode in
ZooKeeper, there is an optimistic way. When a request comes, pick one of
the available IP from the pool and try create IP znode in ZooKeeper. Say,
if two
Yes exactly, I am storing each IP address as nodes.
--
View this message in context:
http://zookeeper-user.578899.n2.nabble.com/Distributed-Applocation-using-Zookeeper-tp7579952p7579968.html
Sent from the zookeeper-user mailing list archive at Nabble.com.
Then you can try an optimistic way of randomly picking one IP address and
create znode and handles KeeperException.NodeExistsException gracefully.
This makes concurrency mechanism in client side simple. I'm trying to show
one approach, as I told earlier it again depends on your client side algo
:) Thanks Rakesh. Its very good advice. I will analyse again to decide which
approach is more appropriate for requirement.
Thanks for your time.
--
View this message in context:
http://zookeeper-user.578899.n2.nabble.com/Distributed-Applocation-using-Zookeeper-tp7579952p7579970.html
Sent
Also, if you have to create several state flags in ZK (perhaps you have to
choose several IP addresses, for instance) you can use the multi update
capability.
It is almost never necessary to use an actual lock recipe with ZK. Almost
always what you really want is some kind of first come, first