Hi Everyone,
Runs are now at least 3X faster What happened?
We’ve been working on a large refactor to upgrade our engine and infrastructure, and here are the details, Thanks @shahedmashni for helping!
A new execution mode
We introduced a new execution mode on the self-hosted versions of Activepieces. This mode will be able to process runs much faster. Starting from Activepieces 0.29.0 you’ll be on this execution mode by default and enjoy unprecedented execution speed.
How fast is it? How CPU intensive is it?
The overhead for running a basic webhook and returning an HTTP response used to be ~2,000ms. It now takes around 600ms, with the fraction of the CPU usage.
Before
Flows per second: 3.20 [#/sec] (mean)
After
Flows per second: 14.50 [#/sec] (mean)
Future work
There is still some overhead due to the data and calls that workers make to the backend. These can be heavily cached, reducing the timestamp and increasing throughput.
How to use it
Starting from 0.29.0, you don’t have to change anything, this execution mode is the default one. If you’re on an older version, just upgrade to 0.29.0 when it comes out this week, or use the pre-release version 0.29.0-rc.1.
You need to set the AP_EXECUTION_MODE Environment variable: to UNSANDBOXED
: Environment Variables - Activepieces
Technical Details
If you’rd like to geek out and dig into the technical details about our new architecture and sandboxing, we’ve put it together on the following pages:
- Architecture: Overview - Activepieces
- Workers: Workers & Sandboxing - Activepieces
- Engine: Engine - Activepieces
- PRS: feat(worker): huge speed up in unsandboxed mode by ShahedAlMashni · Pull Request #4984 · activepieces/activepieces · GitHub feat(worker): separate workers files into their standalone package by abuaboud · Pull Request #4967 · activepieces/activepieces · GitHub