Storage Overview

Storage providers persist tasks and their state. With persistent storage, tasks can resume after application restarts, you can track task history, maintain an audit trail of execution, and store scheduled or recurring tasks for future execution.

Choosing a Storage Provider

Provider Use Case Pros Cons
In-Memory Development, Testing Fast, no setup Data lost on restart
SQL Server Production, Enterprise Scalable, ACID, stored procedures Requires SQL Server
PostgreSQL Production, Open-source Relational, scalable, server-side queries, writable-CTE optimizations Requires PostgreSQL
MySQL/MariaDB Production, Open-source Relational, scalable, server-side recovery & cleanup Requires MySQL 8.0+ / MariaDB 10.11+ (net9.0/net10.0 only)
SQLite Small-scale production, Single-server Simple, file-based, no server Limited concurrent writes

Storage Provider Details

In-Memory Storage

For development and testing when you don’t need persistence.

  • Zero setup
  • Fast
  • No external dependencies
  • Tasks lost on application restart
  • Not suitable for production

Learn more: In-Memory Storage

SQL Server Storage

Storage for production environments.

  • Production-ready
  • Highly scalable
  • ACID transactions
  • Stored procedures for performance
  • Rich querying capabilities
  • Requires SQL Server instance
  • Additional infrastructure cost

Learn more: SQL Server Storage

PostgreSQL Storage

Relational, open-source storage for production, comparable to the SQL Server provider.

  • Production-ready
  • Open-source (no licensing cost)
  • Highly scalable, multi-server
  • ACID transactions
  • Server-side querying for all recovery and cleanup operations
  • Writable-CTE optimizations for hot writes (single-statement, atomic)
  • Requires a PostgreSQL instance

Learn more: PostgreSQL Storage

MySQL / MariaDB Storage

Relational, open-source storage for production, comparable to the SQL Server and PostgreSQL providers.

  • Production-ready
  • Open-source (no licensing cost)
  • Highly scalable, multi-server
  • ACID transactions
  • Server-side querying for all recovery and cleanup operations
  • Supports MySQL 8.0+ and MariaDB 10.11+ (net9.0/net10.0 only)
  • Requires a MySQL or MariaDB instance

Learn more: MySQL / MariaDB Storage

SQLite Storage

Lightweight, file-based storage that works well for single-server deployments.

  • Simple setup - single file
  • No server required
  • Perfect for small-scale production
  • Easy backups (copy file)
  • Lower infrastructure cost
  • Limited concurrent writes
  • Single server only (no clustering)
  • Provider limitation with DateTimeOffset filtering

Learn more: SQLite Storage

Custom Storage

Implement custom storage providers for Redis, MongoDB, or any other database.

Learn more: Custom Storage

Quick Comparison

When to Use Each Provider

Use In-Memory when:

  • Developing locally
  • Running integration tests
  • Prototyping features
  • Tasks don’t need to survive restarts

Use SQL Server when:

  • Running in production at scale
  • Need high availability
  • Require server-side querying
  • Have existing SQL Server infrastructure
  • Need high reliability

Use PostgreSQL when:

  • Running in production at scale
  • Need high availability with an open-source database
  • Require server-side querying
  • Have existing PostgreSQL infrastructure
  • Want no database licensing cost

Use MySQL / MariaDB when:

  • Running in production at scale
  • Need high availability with an open-source database
  • Require server-side querying
  • Have existing MySQL or MariaDB infrastructure
  • Want no database licensing cost

Use SQLite when:

  • Running a small application
  • Single-server deployment
  • Limited infrastructure budget
  • Desktop or edge applications
  • Need simple file-based persistence

Use Custom Storage when:

  • Have specific database requirements
  • Need integration with existing data stores
  • Require specialized storage features
  • Working with cloud-native databases (CosmosDB, DynamoDB)

Next Steps


Copyright © 2025 Giampaolo Gabba. Distributed under the APACHE 2.0 License.

This site uses Just the Docs, a documentation theme for Jekyll.