You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Felipe Fraga <fe...@gmail.com> on 2019/07/27 16:59:49 UTC

Re: Shared store vs Replication with Colocated and Scale Down

Hello and sorry for the late response.

What I meant was, since an Artemis is running in a docker container with a
volume backed by a real file system directory, when this container is
scaled down it will transfer all current messages to another live server
and the actual file system directory that backed the docker volume is no
longer useful. Does that make sense?

That being said, I will try to explain my requirements and maybe you can
suggest the optimal setup for them:

1. I need to have Artemis running on docker containers (that was easy);
2. I need each node to see each other as a cluster (auto discovery of new
nodes is also and easy part);
3. Messages need to be persistent and never lost (from here on it gets
tricky)
4. Containers will be scaled up and down constantly and automatically via
Kubernetes
5. Even after full system crash (no container is active to receive failed
nodes messages), any undelivered messages should not be lost

Since Artemis cluster discovery is able to add new nodes without manual
intervention I thought I could achieve such requirements without things
like a Kubernetes Operator.

So, do you have any thoughts on this?

Thanks yet again and best regards.

Felipe


On Fri, Jun 28, 2019 at 1:20 PM Justin Bertram <jb...@apache.org> wrote:

> > Problem here is that with shared-store I will have to create a unique
> journal directory for each container on a shared docker volume.
>
> I don't quite understand this. Since this is shared-storage won't the
> brokers from each docker instance be sharing the same journal directory?
> Can you elaborate on specifically why "ghost directories" would be left
> behind?
>
>
> Justin
>
> On Mon, May 27, 2019 at 7:25 AM Felipe Fraga <fe...@gmail.com>
> wrote:
>
> > Hello all,
> >
> > I have some Apache Artemis running on identical docker containers and I
> am
> > trying to setup HA using modified configuration from the examples:
> >
> >      <ha-policy>
> >          <shared-store>
> >             <colocated>
> >                <backup-port-offset>100</backup-port-offset>
> >                <backup-request-retries>-1</backup-request-retries>
> >
> >  <backup-request-retry-interval>2000</backup-request-retry-interval>
> >                <max-backups>1</max-backups>
> >                <request-backup>true</request-backup>
> >                <master>
> >                   <failover-on-shutdown>true</failover-on-shutdown>
> >                </master>
> >                <slave>
> >                   <scale-down/>
> >                </slave>
> >             </colocated>
> >          </shared-store>
> >       </ha-policy>
> >
> > Seems almost ok to me, because when a master shutdowns normally (usually
> > because of low usage), its backup on another server will activate with
> the
> > shutdown server messages.
> >
> > Problem here is that with shared-store I will have to create a unique
> > journal directory for each container on a shared docker volume. I believe
> > this will start leaving ghost directories in my volume that I don't know
> if
> > they are being used by a server or not.
> >
> > So, thinking about replication, I believe that after a normal shutdown,
> the
> > journal directory associated with the shutdown server can be safely
> > deleted. Now If I try to configure it to use replication instead of
> > shared-store, the configuration is invalid because master doesn't have
> > failover-on-shutdown on replication. But I thinks that is not ok to me,
> > because in this case after a server scale down, any messages that were
> > being processed by it will be lost.
> >
> > Can I get this behaviour with replication?
> >
> > Thanks again.
> >
> > Felipe
> >
>