Skip to main content
Namespaces let you run multiple isolated environments in the same database. For example, you can use one database for both staging and production by giving each environment a different namespace. Workflows in one namespace are completely invisible to another.

How Namespaces Work

Every workflow run and step attempt is tagged with a namespaceId. Workers and clients only see data in their namespace.

Default Namespace

If you don’t specify a namespaceId, the default is "default":

Use Cases

Environment Isolation

Run development, staging, and production in the same database:
Set the namespace per environment:

Multi-Tenancy

Isolate workflows per tenant:

Testing

Use separate namespaces for test runs:

SQLite Namespaces

Namespaces work the same way with SQLite:

Data Visibility

Each namespace is completely isolated: A worker with namespaceId: "production" will never pick up work from the staging namespace.

Dashboard

The dashboard shows workflows for the namespace configured in your config file. To view a different namespace, update the config and restart the dashboard.

Best Practices

  1. Use environment variables - Don’t hardcode namespace IDs
  2. Consistent naming - Use clear names like production, staging, development
  3. One namespace per worker pool - Don’t mix namespaces in the same worker process
  4. Clean up test namespaces - Periodically remove old test data