You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by 郑建锋 <zh...@zhihuiya.com> on 2011/04/23 05:38:13 UTC

will zookeeper also high performance for data transfering?

Hi

I plan to use zookeeper for coordinating. And my system need answer requests
in less than 1 second. And need transfering data between machines. I
wordering if i can use zookeeper for data transfering like this:

if machine A wants to say "hello" to machine B, we create two Znode in
zookeeper: queue/a and queue/b. A write "hello from A" to queue/b first, B
is listening on queue/b and can get the message, then B handles "hello form
A" and write "got it" to queue/a. then A knows that the message was sent
successfully.

Will this as fast as socket messages directly between machine A and B?
And if i have a zookeeper cluster with 5 servers, will the message "hello
from A" be send to all these 5 machines? Is ZKClient on machine B get the
event after the message was synchronized on these 5 machines?

many thanks!

Re: will zookeeper also high performance for data transfering?

Posted by Ted Dunning <te...@gmail.com>.
ZK can do a reasonable job of acting as a message bus and can efficiently
transfer a few thousand messages per second.

There are going to be some problems, however, in terms of how long you keep
old messages in a file and how you decide to acknowledge messages.

It is probably better to use a system like ZK for coordination of other
message passing systems that are designed for very reliable or very fast
message passing.  Consider Rabbit MQ, Netty and S4 for some very different
trade-offs.

On Fri, Apr 22, 2011 at 8:38 PM, 郑建锋 <zh...@zhihuiya.com> wrote:

> Hi
>
> I plan to use zookeeper for coordinating. And my system need answer
> requests
> in less than 1 second. And need transfering data between machines. I
> wordering if i can use zookeeper for data transfering like this:
>
> if machine A wants to say "hello" to machine B, we create two Znode in
> zookeeper: queue/a and queue/b. A write "hello from A" to queue/b first, B
> is listening on queue/b and can get the message, then B handles "hello form
> A" and write "got it" to queue/a. then A knows that the message was sent
> successfully.
>
> Will this as fast as socket messages directly between machine A and B?
> And if i have a zookeeper cluster with 5 servers, will the message "hello
> from A" be send to all these 5 machines? Is ZKClient on machine B get the
> event after the message was synchronized on these 5 machines?
>
> many thanks!
>