Search code examples
javaactivitibpmncamundacamunda-modeler

Disable Runtime DB in Camunda


I have a simple process like this:

enter image description here

The process doesn't have any user tasks, there are only some service tasks but the process will be started a lot of times and performance issue is important. I set HistoryLevel to none for better performance and it was effective in a load test.

I have a question which I couldn't find in searching on the web.

Is there any way for disabling Runtime DB in Camunda? I'm not sure this is a rational goal or not but I want to know about that.


Solution

  • The process models are not read from the classpath, but deployed to the database and read from there. So Camunda requires a relation database even if you disable the history and have no asynchronous continuations or wait states in your process model.

    However, if you do not require persistence at all, then you can simply configured an in-memory database, such as the H2 database Camunda ships for development purposes in its different distributions. You can switch the database url to e.g. jdbc:h2:mem:camunda-db (see https://www.h2database.com/html/features.html#in_memory_databases) to switch to an in-memory configuration.

    24 Hour Fitness is running millions of process instances daily using a similar approach. You may be interested in this talk they gave at CamundaCon 2020.1: https://vimeo.com/440715573