Flowable multi site failover instance setup


I have scenario, where two flowable instances required on Cloud Test env(T1, T2).
This is the first multi site environment(T1, T2), so we need to determine the following:

  1. Can we do active(T1) / active(T2) setup? or do we need to have a active(T1)/ passive(T2) setup?
  2. How can we fail over from one site to the other?
  3. Shared DB for T1&T2 or dedicated DB for each T1,T2 instances?

Any specific recommendation for this?

The Flowable engines are stateless, in the sense that any engine can handle any request. Obviously, they need to go to the same database (and this is where the state is kept).

A simple loadbalancer that distributes the work between T1 and T2 is possible (active/active).Or a loadbalancer that does failover to T2 in case of a problem is also possible (active/passive).

You can boot up as many Flowable engines as you need, the determining factor will be the database. The database can be shared between all instances. This makes failover easy, but might introduce some complex setup depending on which database type you’re using in case you want active/active for the database. In case you want a dedicated database for each site, you’d need to have a synchronization between the databases (active/passive).

But all of this heavily depends on your architecture and choice of database. Can you give some more details about that?

Hi, Joram - Do we have any document about T1/T2 (active/active) or (active/passive) configuration. I could not find it in docs. Please advise if you are aware of the source. Thank you.

Flowable is implemented in a very microservice like way, where each instance is stateless. Any instance connected to the same database can handle any request. Because Flowable scales horizontally like most microservice apps, the documentation is fairly light.

The configuration for an active/active setup is done via load balancing and database setup. Example: 5 instances all connected to the same database and load balanced together are all in an active/active relationship.

An active/passive relationship is a little harder to achieve, you’d start by not routing calls to the passive instances via the load balancer. Perhaps you’d have them connected to different databases with database syncing. But asynchronous tasks will get executed on any instance with an AnsycExecutor enabled, so you’d need to disable it on the passive instances and enable it when you failed over. It might be worthwhile to do an active/passive configuration example/blog post.


Did you ever figure out how to do this ? We are in similar boat for disaster recovery setup. Need our services which depend on flowable to be present in both the sites and want to achieve active active setup. We have to use different MySQL instances in both the sites for the entire product to be active active (should be still operational when one site goes down).


I think it heavily depends on what kind of database you’re working with. E.g. on AWS these things can be configured to have multi-AS and failover automatically. If you’re running MySQL yourself, there isn’t much what Flowable can do about this, as this is all done by the database and/or the load balancers you have in front of your application.