from zookeper embedded to standalone

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

from zookeper embedded to standalone

Rachid Bouacheria
Hi,

I am running solr 4.x on 3 servers with zookeper embedded in prod.

Each servers has 1 leader and 2 replicas.

I want to switch zookeper from embedded to standalone.

I want to know if the steps are documented anywhere? I could not find them.

I am worried my index will get messed up if in the transition.

Thank you very much!
Reply | Threaded
Open this post in threaded view
|

Re: from zookeper embedded to standalone

Erick Erickson
Hmmm, I don't think anyone's really documented this as the
supposition is that one would only run embedded for sandboxes
and set up an external ensemble "for real".

So, with the caveat that I haven't personally tried this, I'd
add external zookeepers as part of an ensemble that
contained my embedded zookeepers. That means your ZK
configurations pointing to your embedded ZK instances. At
that point the external ZK _should_ replicate the data from the
embedded instances to the external ones.

Then shut down all your Solrs and change your external
ensemble configurations to only point to each other (i.e.
take the embedded stuff out). Now start your solrs pointing
to the external ensemble.

As I said, though, I haven't personally done this so
go ahead and give it a try.

Or, if you're feeling _really_ brave, just copy the zookeeper data
directory from the place the embedded Zookeeper put it to the place
you specify in your external ensemble then start your external
ensemble.

Theoretically, this should work bu tas I said I haven't tried either of
these personally.

Best,
Erick

On Tue, Mar 15, 2016 at 9:59 AM, Rachid Bouacheria <[hidden email]> wrote:

> Hi,
>
> I am running solr 4.x on 3 servers with zookeper embedded in prod.
>
> Each servers has 1 leader and 2 replicas.
>
> I want to switch zookeper from embedded to standalone.
>
> I want to know if the steps are documented anywhere? I could not find them.
>
> I am worried my index will get messed up if in the transition.
>
> Thank you very much!
Reply | Threaded
Open this post in threaded view
|

Re: from zookeper embedded to standalone

Malcolm Upayavira Holmes
You need to be careful adding new nodes to Zookeeper as you change the
number of nodes required for quorum. If you then remove nodes
afterwards, how will the cluster know whether they were intentionally
removed, rather than being simply down?

One thing I've done recently, which seems to have worked, is to use a
Solr node embedded Zookeeper but no collections as a Zookeeper host.
This seems to work fine. So, what you could do is just add more nodes to
your Solr setup, replicate your collections onto those new nodes, and
once they've replicated successfully, remove them from the original
nodes, leaving them doing nothing but serving Zookeeper.

Essentially the issue with embedded Zookeeper, at least as I understand
it, is that it conflates two roles which should be kept separate - that
of hosting Zookeeper and that of hosting indexes. The above solution
fits in with that role separation.

Upayavira

On Tue, 15 Mar 2016, at 09:29 PM, Erick Erickson wrote:

> Hmmm, I don't think anyone's really documented this as the
> supposition is that one would only run embedded for sandboxes
> and set up an external ensemble "for real".
>
> So, with the caveat that I haven't personally tried this, I'd
> add external zookeepers as part of an ensemble that
> contained my embedded zookeepers. That means your ZK
> configurations pointing to your embedded ZK instances. At
> that point the external ZK _should_ replicate the data from the
> embedded instances to the external ones.
>
> Then shut down all your Solrs and change your external
> ensemble configurations to only point to each other (i.e.
> take the embedded stuff out). Now start your solrs pointing
> to the external ensemble.
>
> As I said, though, I haven't personally done this so
> go ahead and give it a try.
>
> Or, if you're feeling _really_ brave, just copy the zookeeper data
> directory from the place the embedded Zookeeper put it to the place
> you specify in your external ensemble then start your external
> ensemble.
>
> Theoretically, this should work bu tas I said I haven't tried either of
> these personally.
>
> Best,
> Erick
>
> On Tue, Mar 15, 2016 at 9:59 AM, Rachid Bouacheria <[hidden email]>
> wrote:
> > Hi,
> >
> > I am running solr 4.x on 3 servers with zookeper embedded in prod.
> >
> > Each servers has 1 leader and 2 replicas.
> >
> > I want to switch zookeper from embedded to standalone.
> >
> > I want to know if the steps are documented anywhere? I could not find them.
> >
> > I am worried my index will get messed up if in the transition.
> >
> > Thank you very much!
Reply | Threaded
Open this post in threaded view
|

Re: from zookeper embedded to standalone

Rachid Bouacheria
In reply to this post by Erick Erickson
Thank you very much Erick.
You described almost for word what I thought about doing.
I just wasn't sure about how "drinkable" a cocktail made out of embedded
and the external zookeeper.
I was worried I'd get a severe hangover :-)

I will give it a try and give an update.
Rachid.



On Tue, Mar 15, 2016 at 2:29 PM, Erick Erickson <[hidden email]>
wrote:

> Hmmm, I don't think anyone's really documented this as the
> supposition is that one would only run embedded for sandboxes
> and set up an external ensemble "for real".
>
> So, with the caveat that I haven't personally tried this, I'd
> add external zookeepers as part of an ensemble that
> contained my embedded zookeepers. That means your ZK
> configurations pointing to your embedded ZK instances. At
> that point the external ZK _should_ replicate the data from the
> embedded instances to the external ones.
>
> Then shut down all your Solrs and change your external
> ensemble configurations to only point to each other (i.e.
> take the embedded stuff out). Now start your solrs pointing
> to the external ensemble.
>
> As I said, though, I haven't personally done this so
> go ahead and give it a try.
>
> Or, if you're feeling _really_ brave, just copy the zookeeper data
> directory from the place the embedded Zookeeper put it to the place
> you specify in your external ensemble then start your external
> ensemble.
>
> Theoretically, this should work bu tas I said I haven't tried either of
> these personally.
>
> Best,
> Erick
>
> On Tue, Mar 15, 2016 at 9:59 AM, Rachid Bouacheria <[hidden email]>
> wrote:
> > Hi,
> >
> > I am running solr 4.x on 3 servers with zookeper embedded in prod.
> >
> > Each servers has 1 leader and 2 replicas.
> >
> > I want to switch zookeper from embedded to standalone.
> >
> > I want to know if the steps are documented anywhere? I could not find
> them.
> >
> > I am worried my index will get messed up if in the transition.
> >
> > Thank you very much!
>
Reply | Threaded
Open this post in threaded view
|

Re: from zookeper embedded to standalone

Erick Erickson
Looking forward to finding out if it works as I haven't had
to do this myself ;).

As Upayavira mentions though, you might have to do  some
fancy dancing with the ZK quorum. I'm assuming that
once all the data is moved around, shutting down _all_
the Zookeepers (and Solrs!) and reconfiguring the configs
should solve the quorum problem....

Best,
Erick

On Tue, Mar 15, 2016 at 10:14 PM, Rachid Bouacheria <[hidden email]> wrote:

> Thank you very much Erick.
> You described almost for word what I thought about doing.
> I just wasn't sure about how "drinkable" a cocktail made out of embedded
> and the external zookeeper.
> I was worried I'd get a severe hangover :-)
>
> I will give it a try and give an update.
> Rachid.
>
>
>
> On Tue, Mar 15, 2016 at 2:29 PM, Erick Erickson <[hidden email]>
> wrote:
>
>> Hmmm, I don't think anyone's really documented this as the
>> supposition is that one would only run embedded for sandboxes
>> and set up an external ensemble "for real".
>>
>> So, with the caveat that I haven't personally tried this, I'd
>> add external zookeepers as part of an ensemble that
>> contained my embedded zookeepers. That means your ZK
>> configurations pointing to your embedded ZK instances. At
>> that point the external ZK _should_ replicate the data from the
>> embedded instances to the external ones.
>>
>> Then shut down all your Solrs and change your external
>> ensemble configurations to only point to each other (i.e.
>> take the embedded stuff out). Now start your solrs pointing
>> to the external ensemble.
>>
>> As I said, though, I haven't personally done this so
>> go ahead and give it a try.
>>
>> Or, if you're feeling _really_ brave, just copy the zookeeper data
>> directory from the place the embedded Zookeeper put it to the place
>> you specify in your external ensemble then start your external
>> ensemble.
>>
>> Theoretically, this should work bu tas I said I haven't tried either of
>> these personally.
>>
>> Best,
>> Erick
>>
>> On Tue, Mar 15, 2016 at 9:59 AM, Rachid Bouacheria <[hidden email]>
>> wrote:
>> > Hi,
>> >
>> > I am running solr 4.x on 3 servers with zookeper embedded in prod.
>> >
>> > Each servers has 1 leader and 2 replicas.
>> >
>> > I want to switch zookeper from embedded to standalone.
>> >
>> > I want to know if the steps are documented anywhere? I could not find
>> them.
>> >
>> > I am worried my index will get messed up if in the transition.
>> >
>> > Thank you very much!
>>