Persistent storage is currently supported on AWS only (EFS). GCP and Azure storage support is on the roadmap.
Persistent Disk (EFS)
Amazon Elastic File System (EFS) provides a shared filesystem that multiple services can mount simultaneously. Any services mounting the disk can read and write to the same files.Use Cases
- Shared file storage: Multiple services need access to the same files
- Read-intensive workloads: Cache frequently accessed data on disk
- Media processing: Store uploaded files for processing by multiple workers
- Machine learning: Share model files across inference services
Setup
Create the persistent disk
Navigate to Add-ons in your Porter dashboard and create a Persistent Disk add-on.
Enable persistent disk on your service
Go to your application’s Services tab, select the service, and navigate to Advanced Settings.Enable Persistent disk.
Accessing the Disk
Once configured, your service can access the shared disk at:Example
If you have two services (api and worker) both mounting the same persistent disk ‘my-disk’:
apiwrites a file to/data/api/my-disk/uploads/image.pngworkercan read the same file from/data/worker/my-disk/image.png
Best Practices
Use for appropriate workloads
EFS is optimized for throughput rather than IOPS. It’s best suited for:- Large file reads and writes
- Shared access patterns
- Workloads that can tolerate slightly higher latency than local disk
Monitor storage usage
Keep track of storage usage to avoid unexpected costs. EFS charges based on the amount of data stored.Plan for data migration
If you need to move data off EFS, plan your migration strategy before deleting the add-on.Deleting a Persistent Disk
Before deleting:- Migrate any important data to another storage location
- Update your services to remove the persistent disk configuration
- Redeploy affected services
- Delete the persistent disk add-on

