I’m looking for a way to upgrade our Axon Server docker image from 4.x series to 2024.x. So far I have the following questions:
Given that we are using standalone Axon Server instance I will be initializing the instance using axoniq.axonserver.standalone=true option. Should I remove this property after instance is initialized for safety? I mean what if there is a downtime on the data volume and Axon Server auto-restarts with this option?
Do I really need to mount replication log volume? We won’t be using cluster so I assume starting from clean replication volume every time should not make a difference for the integrity of the standalone event store?
How clients use hostname set in axoniq.axonserver.hostname on the server exactly? There is axon.axonserver.servers on axon-connector side so just wondering why they also need a hostname from the server?
Yes, it’s probably best to take it out once initialized. It’s a nice quick-start tool primarily for development purposes. You wouldn’t want to accidentally initialize the instance again if some misconfiguration occurs.
I’d keep the replication logs. There is no guarantee when you switch a node off that all elements have been written to the event store. It depends on the amount of activity on the server, of course, but better be safe than sorry. It shouldn’t be that much effort.
When you run in clustered mode, the node that a client chooses to connect to might not be the best candidate. In that case, the nodes will reply with “please connect to …”. That’s where the axoniq.axonserver.hostname comes in. In standalone mode, nodes always reply with “you’re good here”, so there is no need to share hostnames with clients. The axon.axonserver.servers property only needs to define one or more of the cluster’s nodes. Not necessarily all of them. In larger, more complex clusters, it’s possible to only configure “admin” nodes, and from there, connections are distributed across various data centers across the globe.
Just wondering, did you consider running a cluster? Upgrading a cluster can be done without downtime.
Do I understand it right that events first go into replication log and only then are written to event store, even in standalone instance?
Regarding hostname, understood and that make sense now. Could clarify though, does node reply with “you are good here” in standalone mode always, or should it still match hostname sent by the client?
Do I understand it right that events first go into replication log and only then are written to event store, even in standalone instance?
Yes, that’s correct. Whether you use clustering or not, the mechanism is the same.
Could clarify though, does node reply with “you are good here” in standalone mode always, or should it still match hostname sent by the client?
It will always say that. When Axon Server needs to reply with a different node to connect to, you should ensure the right node names (and domains) are configured. By default, it takes the domain and hostname from the OS. This might not always be how the DNS are configured to reach those nodes, though.
We have cluster in our plans, but not just yet
On AxonIQ Console, we have clustering in our “plans” too . All plans are free for the first 30 days.
Last question, how “Start standalone node” and “Start node and initialize multi-node cluster” in the UI are different?
I want to add these as an option in the docker image via argument, loading initial configuration from cluster template. But I was comparing cluster-template.yml for both these options, and it looks identical.