Skip to main content
Floci supports four storage backends. You can set a global default and override it per service, giving you fine-grained control over the durability and performance trade-offs for each AWS service independently.

Storage modes

ModeData survives restartWrite performanceBest for
memoryNoFastest — no I/OUnit tests, CI pipelines
persistentYesSynchronous disk write on every changeDevelopment with strict durability
hybridYesIn-memory reads, async flush to diskGeneral local development
walYesAppend-only write-ahead log with compactionHigh-write workloads
hybrid is the recommended mode for local development. It survives container restarts without blocking writes, keeping Floci fast while preserving your state.

Global configuration

Set the storage mode and data directory once and all services inherit it:
floci:
  storage:
    mode: hybrid              # default for all services
    persistent-path: ./data   # base directory for all persistent data
    wal:
      compaction-interval-ms: 30000
The equivalent environment variables:
FLOCI_STORAGE_MODE=hybrid
FLOCI_STORAGE_PERSISTENT_PATH=/app/data
The WAL compaction interval controls how often Floci rewrites the append-only log into a compact snapshot. The default is 30000 ms (30 seconds). Lower values reduce log file growth; higher values reduce compaction overhead.

Per-service override

When a service omits mode, it inherits the global storage.mode. Set a per-service mode only when you need different behaviour for that service:
floci:
  storage:
    mode: memory              # default — everything uses memory
    services:
      dynamodb:
        mode: persistent      # DynamoDB survives restarts; everything else stays in memory
        flush-interval-ms: 5000
      s3:
        mode: hybrid          # S3 uses hybrid; everything else uses memory
All services run in memory. Fastest possible startup and test execution — nothing is written to disk.
floci:
  storage:
    mode: memory
In docker-compose or GitHub Actions:
FLOCI_STORAGE_MODE=memory

Per-service environment variable overrides

Override the global mode for individual services without touching the YAML file. When a variable is not set, the service inherits FLOCI_STORAGE_MODE.
VariableDefaultDescription
FLOCI_STORAGE_SERVICES_SSM_MODEglobal defaultSSM storage mode
FLOCI_STORAGE_SERVICES_SSM_FLUSH_INTERVAL_MS5000SSM async flush interval (ms)
FLOCI_STORAGE_SERVICES_SQS_MODEglobal defaultSQS storage mode
FLOCI_STORAGE_SERVICES_S3_MODEglobal defaultS3 storage mode
FLOCI_STORAGE_SERVICES_DYNAMODB_MODEglobal defaultDynamoDB storage mode
FLOCI_STORAGE_SERVICES_DYNAMODB_FLUSH_INTERVAL_MS5000DynamoDB async flush interval (ms)
FLOCI_STORAGE_SERVICES_SNS_MODEglobal defaultSNS storage mode
FLOCI_STORAGE_SERVICES_SNS_FLUSH_INTERVAL_MS5000SNS async flush interval (ms)
FLOCI_STORAGE_SERVICES_LAMBDA_MODEglobal defaultLambda storage mode
FLOCI_STORAGE_SERVICES_LAMBDA_FLUSH_INTERVAL_MS5000Lambda async flush interval (ms)
FLOCI_STORAGE_SERVICES_CLOUDWATCHLOGS_MODEglobal defaultCloudWatch Logs storage mode
FLOCI_STORAGE_SERVICES_CLOUDWATCHLOGS_FLUSH_INTERVAL_MS5000CloudWatch Logs async flush interval (ms)
FLOCI_STORAGE_SERVICES_CLOUDWATCHMETRICS_MODEglobal defaultCloudWatch Metrics storage mode
FLOCI_STORAGE_SERVICES_CLOUDWATCHMETRICS_FLUSH_INTERVAL_MS5000CloudWatch Metrics async flush interval (ms)
FLOCI_STORAGE_SERVICES_SECRETSMANAGER_MODEglobal defaultSecrets Manager storage mode
FLOCI_STORAGE_SERVICES_SECRETSMANAGER_FLUSH_INTERVAL_MS5000Secrets Manager async flush interval (ms)
FLOCI_STORAGE_SERVICES_ACM_MODEglobal defaultACM storage mode
FLOCI_STORAGE_SERVICES_ACM_FLUSH_INTERVAL_MS5000ACM async flush interval (ms)
FLOCI_STORAGE_SERVICES_OPENSEARCH_MODEglobal defaultOpenSearch storage mode
FLOCI_STORAGE_SERVICES_OPENSEARCH_FLUSH_INTERVAL_MS5000OpenSearch async flush interval (ms)

Build docs developers (and LLMs) love