Recommended single node deployment strategy

Hi there,
I’d like to know if there is any recommendation on how to deploy a single node setup without any downtime.

Our current setup is the following:

1.) We have a running instance
2.) A second instance is started and will boot up
3.) If the startup is successful, the old instance will get a shutdown signal
4.) In the meantime where two instances are running we get a lot of exceptions at the new instance like this

WARN 1 — [,] [ parallel-10] .s.e.g.UploadedProductVariationProcessor : exception while executing CreateProductVariationCreateOrUpdateProcess command

java.util.concurrent.CompletionException: org.axonframework.commandhandling.NoHandlerForCommandException: No handler was subscribed to command [package.command.CreateProductVariationCreateOrUpdateProcess]

5.) When the old instance was shutdown successfully and released all token_entries the new one start to working as expected without any exceptions.

Is there any other way to deploy more gracefully?

Hi @mgreivel,

First of all, we are talking about Axon Framework instances and not Axon Server, right? Just to be clear.

We have an idea of something that can be happening here, let me try to explain:

  1. Your second instance asks the first one to shutdown
  2. It will trigger the @ShutdownHandlers of the first instance to start and from this point on, it won’t process any new Commands
  3. Meanwhile, the second instance is not yet fully registered (it’s @CommandHandlers are not registered
  4. After some time, the registration is complete and it is back to work as usual

So, a couple of questions for you:

  1. Are you using axon-spring-boot-starter?
  2. How do you check if the second instance started up successfully?

The first question is because of this issue.
The second one is to check if we can improve on that.

KR,