2 zato clusters with the same database. Is it possible?


#1

We want to distribute requests into 2 Zato clusters for the sake of high-availability. I was wondering if it’s possible to share the same database and kv server(redis) in both Zato clusters.

What’s your best practice on that topic?

Thank you.


#2

Hi @emrebeyler

  1. You can share a database instance but not the same database - e.g. if you have MySQL at 10.152.19.73:3306 and two Zato clusters then one cluster may use database production1 and other other production2 but it is not possible for them to share the same database in the sense of the same object created by a ‘CREATE DATABASE …’ SQL statement.

  2. You can share the same Redis instance but each cluster must pointer to a different logical Redis DB index - for instance, you have Redis at 10.152.22.19:6379 and in cluster1 you set kvdb.db=0 and in cluster2 you set kvdb.db=1 in server.conf of each server in both clusters.

As for HA - this really depends on what you are guarding against. Having two clusters is fine, having more servers within a single cluster is also good. Assigning more CPUs can be also prudent.

It depends on what you would like to ensure - that you can carry on when a single VM is down? When a computer is down? When a datacenter is down?

What kind of messages do you have? Mostly REST? Mostly background jobs? A mix of them? Are there any WebSocket connections? IBM MQ perhaps?


#3

Hey @dsuch,

Thanks for the reply. We’re utilizing zato mostly with REST connections.

It depends on what you would like to ensure - that you can carry on when a single VM is down? When a computer is down? When a datacenter is down?

We want to ensure if a Zato cluster is down, we can continue with the other one without touching to anything.

Actually, this image explains what we’re trying to achieve:

So for that scenario, how can one create two identical clusters without sharing database/kv server? What’s the practice on this?


#4

Hi @emrebeyler,

the best way will be to have your installation procedure as automated as possible, using custom scripts, Ansible or similar tools - then creating one cluster or two would be just a matter of changes to your deployment configuration.