You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by 吴靖 <qh...@126.com> on 2013/07/02 05:06:12 UTC

Is it a good idea to embed ZK in a product application ?

 Hi all:


   Recently my company want use zk to manage our cluster( For node management and HA). But someone in my team want to embed the ZK in our product application.  But somehow I always feel very odd to embed ZK in.
   Here my question are : Is it a  good idea to embed ZK in a product application ?
      And dose it work fine  in product mode (like overflow memory and other problems )?
  


thank you !


    

Re:Re: Is it a good idea to embed ZK in a product application ?

Posted by 吴靖 <qh...@126.com>.
Thank you for all your answers. Here I think It is a bad idea to  embed ZK in product application(which means in the same jvm),
because it may have exceptions in product application, and can affect the zk runtime.
But anyway, my team choose to embed it. 


At 2013-07-03 01:54:50,"Ted Dunning" <te...@gmail.com> wrote:
>The term embedding usually implies that ZK will run as part of the
>application process.
>
>As you say, there are other ways that work better.
>
>My comments about the awkwardness of having the blend quorum and update
>considerations during maintenance still apply.
>
>
>
>On Mon, Jul 1, 2013 at 9:05 PM, lukai <lu...@gmail.com> wrote:
>
>> you are assuming each binary are running quorum on each machine. He was
>> asking whether it suitable to use it in product application.
>>
>> Actually, then can just enable quorum for application on some machine, just
>> a configurable flag. Run clients in all of his application. It's quite easy
>> to solve the problem you said. Or they can run quorum as a separated
>> process.
>>
>> talking about upgrading problem, it really depends on how the quorums and
>> clients are distributed. And even the worse case, it can be done cluster
>> one by one(assume it has more than one cluster, a lot of big application
>> have that). Within one cluster, it can done by enable/disable quorum.
>>
>>
>> On Mon, Jul 1, 2013 at 8:37 PM, Ted Dunning <te...@gmail.com> wrote:
>>
>> > Embedding zk in a product is a fine thing.  Embedding zk in an
>> application
>> > is (in my estimation) a bad idea.  The problem is that you generally want
>> > to coordinate all the way down to zero, especially in upgrade situations.
>> >  Combining the uptime constraints of zk with those of your app is bad
>> > strategy.
>> >
>> > As a concrete example, suppose that you need one or more copy if your
>> > software to run and you are running it on 6 machines.  Should your zk
>> > quorum include all 6 machines?  I think not.
>> >
>> > Now what happens if you want to upgrade?  It is plausible that your app
>> > will work with only or copy running but you probably would want enough to
>> > handle current load during a rolling upgrade.  Should that requirement be
>> > combined with the need to preserve a zk quorum?  What if you have zk on 3
>> > machines and you want to upgrade all three of those in step 1 of a
>> rolling
>> > upgrade.  Do you really want to make that impossible?
>> >
>> > Sent from my iPhone
>> >
>> > On Jul 1, 2013, at 20:22, Kai Lu <lu...@gmail.com> wrote:
>> >
>> > > A lot of applications in big companies had done that already.
>> > >
>> > > On Jul 1, 2013, at 8:06 PM, 吴靖 <qh...@126.com> wrote:
>> > >
>> > >> Hi all:
>> > >>
>> > >>
>> > >>  Recently my company want use zk to manage our cluster( For node
>> > management and HA). But someone in my team want to embed the ZK in our
>> > product application.  But somehow I always feel very odd to embed ZK in.
>> > >>  Here my question are : Is it a  good idea to embed ZK in a product
>> > application ?
>> > >>     And dose it work fine  in product mode (like overflow memory and
>> > other problems )?
>> > >>
>> > >>
>> > >>
>> > >> thank you !
>> > >>
>> > >>
>> >
>>

Re: Is it a good idea to embed ZK in a product application ?

Posted by Ted Dunning <te...@gmail.com>.
The term embedding usually implies that ZK will run as part of the
application process.

As you say, there are other ways that work better.

My comments about the awkwardness of having the blend quorum and update
considerations during maintenance still apply.



On Mon, Jul 1, 2013 at 9:05 PM, lukai <lu...@gmail.com> wrote:

> you are assuming each binary are running quorum on each machine. He was
> asking whether it suitable to use it in product application.
>
> Actually, then can just enable quorum for application on some machine, just
> a configurable flag. Run clients in all of his application. It's quite easy
> to solve the problem you said. Or they can run quorum as a separated
> process.
>
> talking about upgrading problem, it really depends on how the quorums and
> clients are distributed. And even the worse case, it can be done cluster
> one by one(assume it has more than one cluster, a lot of big application
> have that). Within one cluster, it can done by enable/disable quorum.
>
>
> On Mon, Jul 1, 2013 at 8:37 PM, Ted Dunning <te...@gmail.com> wrote:
>
> > Embedding zk in a product is a fine thing.  Embedding zk in an
> application
> > is (in my estimation) a bad idea.  The problem is that you generally want
> > to coordinate all the way down to zero, especially in upgrade situations.
> >  Combining the uptime constraints of zk with those of your app is bad
> > strategy.
> >
> > As a concrete example, suppose that you need one or more copy if your
> > software to run and you are running it on 6 machines.  Should your zk
> > quorum include all 6 machines?  I think not.
> >
> > Now what happens if you want to upgrade?  It is plausible that your app
> > will work with only or copy running but you probably would want enough to
> > handle current load during a rolling upgrade.  Should that requirement be
> > combined with the need to preserve a zk quorum?  What if you have zk on 3
> > machines and you want to upgrade all three of those in step 1 of a
> rolling
> > upgrade.  Do you really want to make that impossible?
> >
> > Sent from my iPhone
> >
> > On Jul 1, 2013, at 20:22, Kai Lu <lu...@gmail.com> wrote:
> >
> > > A lot of applications in big companies had done that already.
> > >
> > > On Jul 1, 2013, at 8:06 PM, 吴靖 <qh...@126.com> wrote:
> > >
> > >> Hi all:
> > >>
> > >>
> > >>  Recently my company want use zk to manage our cluster( For node
> > management and HA). But someone in my team want to embed the ZK in our
> > product application.  But somehow I always feel very odd to embed ZK in.
> > >>  Here my question are : Is it a  good idea to embed ZK in a product
> > application ?
> > >>     And dose it work fine  in product mode (like overflow memory and
> > other problems )?
> > >>
> > >>
> > >>
> > >> thank you !
> > >>
> > >>
> >
>

Re: Is it a good idea to embed ZK in a product application ?

Posted by lukai <lu...@gmail.com>.
you are assuming each binary are running quorum on each machine. He was
asking whether it suitable to use it in product application.

Actually, then can just enable quorum for application on some machine, just
a configurable flag. Run clients in all of his application. It's quite easy
to solve the problem you said. Or they can run quorum as a separated
process.

talking about upgrading problem, it really depends on how the quorums and
clients are distributed. And even the worse case, it can be done cluster
one by one(assume it has more than one cluster, a lot of big application
have that). Within one cluster, it can done by enable/disable quorum.


On Mon, Jul 1, 2013 at 8:37 PM, Ted Dunning <te...@gmail.com> wrote:

> Embedding zk in a product is a fine thing.  Embedding zk in an application
> is (in my estimation) a bad idea.  The problem is that you generally want
> to coordinate all the way down to zero, especially in upgrade situations.
>  Combining the uptime constraints of zk with those of your app is bad
> strategy.
>
> As a concrete example, suppose that you need one or more copy if your
> software to run and you are running it on 6 machines.  Should your zk
> quorum include all 6 machines?  I think not.
>
> Now what happens if you want to upgrade?  It is plausible that your app
> will work with only or copy running but you probably would want enough to
> handle current load during a rolling upgrade.  Should that requirement be
> combined with the need to preserve a zk quorum?  What if you have zk on 3
> machines and you want to upgrade all three of those in step 1 of a rolling
> upgrade.  Do you really want to make that impossible?
>
> Sent from my iPhone
>
> On Jul 1, 2013, at 20:22, Kai Lu <lu...@gmail.com> wrote:
>
> > A lot of applications in big companies had done that already.
> >
> > On Jul 1, 2013, at 8:06 PM, 吴靖 <qh...@126.com> wrote:
> >
> >> Hi all:
> >>
> >>
> >>  Recently my company want use zk to manage our cluster( For node
> management and HA). But someone in my team want to embed the ZK in our
> product application.  But somehow I always feel very odd to embed ZK in.
> >>  Here my question are : Is it a  good idea to embed ZK in a product
> application ?
> >>     And dose it work fine  in product mode (like overflow memory and
> other problems )?
> >>
> >>
> >>
> >> thank you !
> >>
> >>
>

Re: Is it a good idea to embed ZK in a product application ?

Posted by Ted Dunning <te...@gmail.com>.
Embedding zk in a product is a fine thing.  Embedding zk in an application is (in my estimation) a bad idea.  The problem is that you generally want to coordinate all the way down to zero, especially in upgrade situations.  Combining the uptime constraints of zk with those of your app is bad strategy.  

As a concrete example, suppose that you need one or more copy if your software to run and you are running it on 6 machines.  Should your zk quorum include all 6 machines?  I think not.  

Now what happens if you want to upgrade?  It is plausible that your app will work with only or copy running but you probably would want enough to handle current load during a rolling upgrade.  Should that requirement be combined with the need to preserve a zk quorum?  What if you have zk on 3 machines and you want to upgrade all three of those in step 1 of a rolling upgrade.  Do you really want to make that impossible?

Sent from my iPhone

On Jul 1, 2013, at 20:22, Kai Lu <lu...@gmail.com> wrote:

> A lot of applications in big companies had done that already.
> 
> On Jul 1, 2013, at 8:06 PM, 吴靖 <qh...@126.com> wrote:
> 
>> Hi all:
>> 
>> 
>>  Recently my company want use zk to manage our cluster( For node management and HA). But someone in my team want to embed the ZK in our product application.  But somehow I always feel very odd to embed ZK in.
>>  Here my question are : Is it a  good idea to embed ZK in a product application ?
>>     And dose it work fine  in product mode (like overflow memory and other problems )?
>> 
>> 
>> 
>> thank you !
>> 
>> 

Re: Is it a good idea to embed ZK in a product application ?

Posted by Kai Lu <lu...@gmail.com>.
A lot of applications in big companies had done that already.

On Jul 1, 2013, at 8:06 PM, 吴靖 <qh...@126.com> wrote:

> Hi all:
> 
> 
>   Recently my company want use zk to manage our cluster( For node management and HA). But someone in my team want to embed the ZK in our product application.  But somehow I always feel very odd to embed ZK in.
>   Here my question are : Is it a  good idea to embed ZK in a product application ?
>      And dose it work fine  in product mode (like overflow memory and other problems )?
> 
> 
> 
> thank you !
> 
>