Hi everyone,
Question regarding the architechture,
I’m currently running n8n on 2 datacenters, while keeping a master DNS record that points to one of the instances.
On the “main site” the instance is turned on and on the other site it is turned off,
both of the instances import all the workflows and credentials from git, so i know they are synced with the latest flows (we develop the flows on localhost and push them to git).
Once the site is down for whatever reason, we start the secondary site instance and point the DNS to it.
now,
Is it possible to run those 2 instances at the same time (active active setup)?
If it’s possible, how would the Cron trigger behave? will flows get triggered twice?
did anyone here had to solve this kind of scenrio? any ideas will be appreciated, the goal is to have as less manual intervention possible and keep my n8n always on.
The main instance for n8n can’t be ran in an active / active setup so you would need to take an active / passive approach to it at the moment.
In your case though as your sites are split and you are doing your data syncing using Git you could in theory run both instances at the same time but the instances wouldn’t be aware of each other so your schedules would trigger twice. You could in theory add a step to your workflows to check if the other instance is online and if it is just exit but you would then have to designate one of your instances are your main.
For most things an active / passive implementation would work though, What sort of service level are you looking for in terms of 9s? That would maybe help you work out which approach to take.