zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andor Molnar <an...@cloudera.com>
Subject Re: Leader elections between 2 nodes.
Date Thu, 10 May 2018 23:07:40 GMT
Correct. I forgot about the readonly mode, thanks.
If readonly mode is enabled, you cloud have stale reads definitely.

Andor



On Thu, May 10, 2018 at 3:24 PM, s n <svadhyaya.prana@gmail.com> wrote:

> *ReadOnlyMode Servers*
>
> ReadOnlyMode allows clients sessions which requested ROM support to connect
> to the server even when the server might be partitioned from the quorum. In
> this mode ROM clients can still read values from the ZK service, but will
> be unable to write values and see changes from other clients
>
> Wouldn't this cause stale reads in case of network partition ?
>
>
> On Thu, May 10, 2018 at 2:26 PM, Andor Molnar <andor@cloudera.com> wrote:
>
> > You cannot read from ZooKeeper if there's no quorum, because it rejects
> > client connections.
> > But when you can, the request doesn't go to the leader, it served
> directly
> > from the server that client is connected to.
> >
> > As a consequence, you cannot read stale data from ZooKeeper.
> >
> > Andor
> >
> >
> >
> > On Thu, May 10, 2018 at 1:36 PM, David Brower <david.brower@oracle.com>
> > wrote:
> >
> > > Without quorum, the client has no idea how current the read data may
> be.
> > > It might be from a replica that is hours/days/weeks out of data.
> > > Sometimes this won't matter, sometimes it will be a critical failing.
> > >
> > > -dB
> > >
> > >
> > >
> > > On 5/9/2018 6:40 PM, Prasanth Mathialagan wrote:
> > >
> > >> For reads, is Quorum necessary? Reads are served from local the local
> > >> replica, right?
> > >>
> > >> On Wed, May 9, 2018 at 8:29 AM, Jordan Zimmerman <
> > >> jordan@jordanzimmerman.com
> > >>
> > >>> wrote:
> > >>> A quorum means (n/2)+1 - In a 3 node cluster that is 2. So, if 2
> > servers
> > >>> are up you can achieve quorum.
> > >>>
> > >>> we need odd
> > >>>> numbers in order to form a quorum
> > >>>>
> > >>> The "odd" in this formula refers to the number of configured servers
> > not
> > >>> how many are running at a given time. That's the reasoning for quorum
> > in
> > >>> the first place. Quorum I/O ensures that a majority of nodes is
> > >>> referenced
> > >>> for reads or writes (in ZooKeeper writes are what matter for quorum).
> > >>>
> > >>> -Jordan
> > >>>
> > >>> On May 9, 2018, at 10:26 AM, Kaushal Shriyan <
> kaushalshriyan@gmail.com
> > >
> > >>>>
> > >>> wrote:
> > >>>
> > >>>> Hi,
> > >>>>
> > >>>> In a ensemble of 3 nodes with 1 leader and 2 followers, if the
> leader
> > >>>>
> > >>> goes
> > >>>
> > >>>> down then two servers can elect a leader among themselves. But
we
> need
> > >>>>
> > >>> odd
> > >>>
> > >>>> numbers in order to form a quorum. I am confused. Please correct
me
> > if i
> > >>>>
> > >>> am
> > >>>
> > >>>> understanding it wrong.
> > >>>>
> > >>>> Any help will be highly appreciable
> > >>>>
> > >>>> Best Regards,
> > >>>>
> > >>>> Kaushal
> > >>>>
> > >>>
> > >>>
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message