How to guarantee reliability when updating n8n?

Hello, recently when updating our production n8n server, there was an issue causing all of our pending executions to fail on restart. This was later solved, but it got me thinking : how to guarantee a reliable n8n production server ?

Do you have any recommendations on setting up a testing environment before upgrading n8n in the running production ?

It looks kind of difficult to write tests since n8n’s main role is to query multiple APIs from different vendors, and you don’t want to call those APIs for real when testing, and they are all specific into how they manage data.

I was thinking:

  • replicate the production databases, run it in another environment where you block all outgoing API calls, and scan logs for errors. But this may not work because lots of workflow will error without the APIs properly responding.
  • find a way to emulate mock data and mock APIs with environment variables
  • find a way to set up multiple production instances, and manage a progressive switch of the loads and pending executions gradually towards the updated instance, while monitoring for errors in the logs
  • … or another solution ?

What would you recommend ?
Thank you

Hey @branche,

That is a very good question, There isn’t really a recommended approach as it can all depend on policies when it comes to updates.

I would say having a test environment and database that contains simplier workflows may be enough for most cases and you can run those and see how it goes before updating the main prod environment.

One thing that we do with Cloud that could be useful for you is we don’t make the current release available so right now 0.183.0 is the latest release but on Cloud we have 0.182.2 as the latest stable and 0.182.1 as latest beta. This won’t catch all things but if n8n is an important part of your process it could be worth thinking about.

What I did with the n8n environment I was managing was use the test option above and I would also book in an outage for the service so I can bring it up and do some tests and if needed roll back.

It will be interesting to see what others do and suggest.

2 Likes

Thanks @Jon for your input. Small correction: did you mean 0.182.2 as latest beta and 0.182.0 as latest stable ? I’d love to see what others might suggest.

Looking now at the list it is 0.182.1 as Latest Stable and 0.183.0 as Latest Beta. It would have been 181.2 as stable and 182.1 as beta.

1 Like