Cloud Run GCS Directory Sync

I have built a Cloud Run GCS Directory Sync sidecar. It is a lightweight, robust, and highly optimized Google Cloud Run sidecar container that synchronizes an ephemeral disk shared volume (emptyDir) with Google Cloud Storage (GCS).

This is a prototype of a persistent filesystem with full POSIX compliance that delivers the exact same performance characteristics as a local disk, since it reads and writes directly to local ephemeral /data mounts.

Architecture diagram of Cloud Run GCS Directory Sync
Architecture of Cloud Run GCS Directory Sync

How it works

This sidecar implements a highly responsive bidirectional and event-driven synchronization pattern designed for stateless containers that need access to persistent, shared file systems:

Design constraints

There are some important constraints to be aware of when using this prototype:

For more details, deployment instructions, and the source code, check out the GitHub repository.