Clustering setup during migration to new infra while preserving db

Hi everyone!

We need to move our production environment to a new infra. We will use a blue/green strategy while preserving the same MongoDB ReplicaSet.

Current infra:

  1. Squidex v5
  2. MongoDB RS (3 nodes)
  3. k8s with 4 app running pods
  4. LoadBalancer
  5. ORLEANS__CLUSTERING = "MongoDB"

New infra:

  1. Squidex v5
  2. Same MongoDB RS
  3. ECS with 4 running tasks
  4. A new LoadBalancer

There is no connectivity between k8s and ECS. With the new infra ready, the migration will simply involve repointing the DNS to the new LB. We need to minimize downtime.

How should we manage the clustering setup? Would it be correct and sufficient to clear the Orleans_* collections before repointing the DNS?

Thanks in advance.

I think you cannot get it working without downtime. If you clear the Orleans collection you will probably have issues with the existing cluster.

Hi Sebastian!
Thanks for the very quick response.

Yes, we know we’ll have some downtime. We just want to minimize it.

Would these steps be correct?:

  1. Stop traffic and current pods.
  2. Clear Orleans collections.
  3. Repoint DNS.

Yes. I would do it like this:

  1. Stop traffic on current pods.
  2. Clear Orleans Collections.
  3. Start new pods
  4. Repoint LoadBalancer

Ideally you keep the DNS intact, not sure if this is possible in AWS. And it was also unclear when you start the new pods.

In our case, we have deployed a new LB, so we must update the DNS.
The steps would be:

  1. Stop traffic on the current pods (and the pods themselves).
  2. Clear the Orleans collections.
  3. Start the new service (we are moving to ECS).
  4. Repoint the DNS to the new load balancer.

Thank you so much, Sebastian.
We will contact you again if we have any other questions or issues.