Hi Vikram,
It's okay for you system to ad hoc add and remove nodes from the group.
So, you don't have to close down your cluster while you're starting up a new one.
I'll try to give you a little background why it's okay to do so:
When you use Axon's JGroupsConnector for command routing and sending in your DistributedCommandBus, the underlying mechanism to decide which nodes picks up a command is done by a
Consistent Hash Ring. You can envision the consistent hash ring to be an actual ring, where each node in your cluster gets an equal portion of the ring. When a command needs to be routed to a node, a hash is performed (typically over the Aggregate Identifier, which is what the AnnotationRoutingStrategy by default does in Axon) over a field in the command message. That hash falls on a specific spot in the ring, which as described earlier is pointing to a specific node in your cluster.
Additionally, the consistent hashing algorithm allows for easy addition and removal of nodes, as the ring would just be repartitioned over the new set of known nodes in your cluster.
Thus, you're not required to close down a complete cluster of nodes if you want to adjust the number of nodes in the system.
Do note that this will only work if all the nodes can access the same aggregates repository.
When event sourcing, this is thus the event store. If you're not event sourcing, the other aggregate repository should be reachable by all.
Additionally, the consistent hash ring is also implemented in the SpringCloudCommandRouter implementation, which thus also guarantees you that you can add/remove nodes freely.
If you'd implement your own CommandRouter, this is obviously not the case :)
Hoping this gives you some insight!
Cheers,
Steven