Skip to main content

On This Page

AWS Emulation Storage Optimization: Floci vs. LocalStack

3 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

Floci (LocalStack alternative) storage modes: pick the right tradeoff per service (and never pay for it)

Floci is a LocalStack alternative that provides four distinct storage modes—memory, hybrid, persistent, and WAL—as free core features for AWS emulation. It enables granular per-service overrides to optimize for CI speed or local data durability without locking persistence behind a paywall.

Why This Matters

In cloud emulation, persistence is often treated as a binary enterprise feature, but technical reality requires different I/O strategies for different services. Managing state across container restarts is essential for local development, yet global persistence settings in tools like LocalStack often introduce request-blocking bottlenecks or high I/O latency that degrade performance in high-throughput testing environments. Floci addresses this by decoupling persistence from the enterprise tier and offering specific write behaviors—such as asynchronous flushes or write-ahead logging—that align with specific workload requirements.

Key Insights

  • Floci achieves a 24ms cold start and 13 MiB idle footprint, allowing developers to spin up fresh emulators per test class (2026).
  • Storage granularity allows per-service overrides, such as setting DynamoDB to persistent while keeping S3 in hybrid mode to balance durability and performance.
  • The Write-Ahead Log (WAL) mode provides durability for high-throughput workloads like Kinesis-heavy pipelines without the random-write cost of synchronous persistence.
  • Unlike LocalStack Pro, which uses snapshot mechanisms that block requests during saves, Floci’s native storage modes ensure writes never pause.
  • Floci is MIT-licensed and includes all four storage modes in its core version, removing the cost barrier for persistent local AWS environments.

Working Examples

Docker Compose configuration demonstrating per-service storage overrides to maintain DynamoDB state on disk while keeping other services ephemeral.

services:  floci:    image: floci/floci:latest    ports:      - '4566:4566'    volumes:      - ./data:/app/data    environment:      FLOCI_STORAGE_MODE: memory      FLOCI_STORAGE_SERVICES_DYNAMODB_MODE: persistent      FLOCI_STORAGE_SERVICES_S3_MODE: hybrid

Practical Applications

  • CI/CD Pipelines: Use memory mode to ensure each run starts with a clean state and avoid managing complex volumes. Pitfall: Using persistent volumes in CI leads to stale state bugs and increased job duration.
  • Local Development: Use hybrid mode for DynamoDB to preserve seeded test data across container restarts without I/O latency. Pitfall: Synchronous persistent mode for high-volume writes can become a bottleneck during local performance testing.
  • High-Throughput Testing: Implement WAL mode for write-heavy Kinesis or DynamoDB streams to ensure crash-safety without blocking requests. Pitfall: Relying on point-in-time snapshots can cause mid-test request timeouts during the save process.

References:

Continue reading

Next article

Color as Syntax: Enhancing Cellular Automata Visualization

Related Content