Hello Jon,

Whether there will be randomness or not depends on your setup. As far as I know, there are two possible modes for the connection with Galera clusters: sequential and loadbalance. With the sequential mode, the connector will try to connect to hosts in the order in which they were declared in the connection URL, so no randomness. Using the loadbalance mode, the connector performs load-balancing for all queries by randomly picking a host from the connection URL for each connection, so even with all hosts up, you'll have random connections.

Regarding whether random connections are a problem, since you'll be using a Galera cluster, any MariaDB node should be basically the same (from the mgmt servers perspective), as all data is replicated, so it does not really matter which one is used. I don't see any problem with different mgmt servers connecting to different MariaDB nodes that are on the same Galera cluster.

Could you share the value that you configured for db.usage.uri? please make sure that you are connecting to the cloud_usage DB and not the cloud DB.

Best regards

João Jandre

On 8/13/24 08:24, Joan g wrote:
Hello Community,

I am trying to explore the mariadb flexible URI introduced in 4.19 Ref:
https://github.com/apache/cloudstack/pull/7895
My concern is on deployment with 2 or 3 Cloudstack management Servers.

In the event of a server failure or restart, there's a possibility that
each management service could connect to different MariaDB hosts. Is this
behavior acceptable? Will it cause any issues with the database? I've heard
that all management servers should  connect to the same MariaDB host.

Also Usage service is failing to start using  db.usage.uri, management is
fine

Jon

Reply via email to