SeaweedFS Installation Overview
SeaweedFS is used in Opstella as a distributed object storage system providing S3-compatible APIs. It is a critical component for storing PostgreSQL WALs (Write-Ahead Logs) and backups managed by CloudnativePG.
Architecture Design: Bootstrap vs. HA
Section titled “Architecture Design: Bootstrap vs. HA”Installing SeaweedFS in Opstella involves a “cold start” logic to resolve a circular dependency between the storage layer and the database layer.
The Circular Dependency
Section titled “The Circular Dependency”- SeaweedFS (HA Mode) requires an external database (PostgreSQL) to store its filer metadata and maintain high availability across multiple pods.
- PostgreSQL (CloudnativePG) requires an S3-compatible storage (SeaweedFS) to store its WALs and backups for durability and point-in-time recovery.
The Two-Phase Solution
Section titled “The Two-Phase Solution”To break this loop, Opstella uses a two-phase deployment:
-
SeaweedFS Bootstrap:
- A minimal, single-pod instance of SeaweedFS.
- Does not require an external database (uses local storage for metadata).
- Its sole purpose is to provide the initial S3 API endpoints for CloudnativePG.
-
PostgreSQL (CNPG):
- Installs using the SeaweedFS Bootstrap instance as its backup target.
- Once running, it provides the stable database backend needed for the full storage layer.
-
SeaweedFS HA:
- The production-grade, highly available SeaweedFS cluster.
- It connects to the PostgreSQL instance created in step 2 to store its filer metadata.
- After it is operational, other Opstella services and future database clusters switch to using SeaweedFS HA for their storage needs.
Finished?
Use the below navigation to proceed