content/shared/influxdb3-reference/influxdb3-processing-engine.md
The Processing engine is an embedded Python virtual machine that runs inside an {{% product-name %}} database server. It executes Python code in response to triggers and database events without requiring external application servers or middleware.
The Processing Engine activates when --plugin-dir or INFLUXDB3_PLUGIN_DIR is configured.
When not configured, the Python environment and PyO3 bindings aren't initialized, and the server runs without Processing Engine functionality.
{{% show-in "enterprise" %}}
--plugin-dirSetting --plugin-dir automatically adds process mode to any node, regardless of the --mode setting.
You don't need to explicitly set --mode=process when --plugin-dir is configured.
Conversely, if you explicitly set --mode=process, you must also set --plugin-dir.
A node with --mode=process but no --plugin-dir won't function correctly.
For cluster node configuration examples, see Configure process nodes. {{% /show-in %}}
| Deployment | Default state | Configuration |
|---|---|---|
| Docker images | Enabled | INFLUXDB3_PLUGIN_DIR=/plugins |
| DEB/RPM packages | Enabled | plugin-dir="/var/lib/influxdb3/plugins" |
| Binary/source | Disabled | No plugin-dir configured |
Docker images set INFLUXDB3_PLUGIN_DIR=/plugins by default.
[!Warning] Setting
INFLUXDB3_PLUGIN_DIR=""(empty string) does not disable the Processing Engine. You must unset the variable, not set it to empty.
{{% show-in "enterprise" %}}
Use the INFLUXDB3_UNSET_VARS feature to unset inherited environment variables:
docker run -e INFLUXDB3_UNSET_VARS="INFLUXDB3_PLUGIN_DIR" influxdb:3-enterprise
INFLUXDB3_UNSET_VARS accepts one or more environment variable names (for example, a comma-separated list) and unsets them before the server starts.
Use it to clear any inherited variables that you don't want the InfluxDB 3 Enterprise container to see (for example, INFLUXDB3_PLUGIN_DIR, INFLUXDB3_LOG_LEVEL) when you can't modify the parent environment directly.
This is useful in orchestration environments (Kubernetes, Docker Compose) where removing an inherited variable isn't straightforward.
{{% /show-in %}}
{{% show-in "core" %}} Use a custom entrypoint that unsets the variable:
docker run --entrypoint /bin/sh influxdb:3-core -c 'unset INFLUXDB3_PLUGIN_DIR && exec influxdb3 serve --object-store memory'
{{% /show-in %}}
The post-install script sets plugin-dir="/var/lib/influxdb3/plugins" in the TOML configuration.
To disable the Processing Engine:
Edit the configuration file:
sudo nano /etc/influxdb3/influxdb3-{{< product-key >}}.conf
Comment out or remove the plugin-dir line:
# plugin-dir="/var/lib/influxdb3/plugins"
[!Warning] Do not set
plugin-dir=""(empty string)—you must remove or comment out the line.
Restart the service:
sudo systemctl restart influxdb3-{{< product-key >}}
[!Note] The
/var/lib/influxdb3/pluginsdirectory can remain on disk. The Processing Engine only activates based on theplugin-dirconfiguration, not directory existence.
When the Processing Engine is disabled:
This is useful for deployments that don't require plugin functionality and want a minimal server footprint.
The Processing engine runs Python code directly within a {{% product-name %}} server process. This design provides high performance and direct access to database resources.
[!Note] The Processing engine runs all plugins in the same Python process. Changes made by one plugin can affect other plugins.
When specific events occur in the database, the Processing engine handles them through a consistent sequence:
Triggers connect database events to Python code execution based on specific conditions:
The registry manages all Python code available to the Processing engine:
The Processing engine implements specialized memory handling to ensure stability and performance:
The Processing engine is designed for high-performance operation with minimal overhead:
The Processing engine includes multiple features to ensure consistent and dependable execution:
Extend and customize the Processing engine through several built-in mechanisms:
For a step-by-step guide to setting up and using the Processing engine, see the Getting started with plugins documentation.