InfraHub Storage S3 & MinIO
Platform-wide, tenant-partitioned, content-addressable file storage built on MinIO/S3 with automatic deduplication, capacity protection, and enterprise-grade data lifecycle management.
IObjectStorageProvider.StoreAsync() and receives a Content ID (CID) back. Files are stored once, tenant-isolated, automatically deduplicated, and protected against disk overflow. The same CID can be passed across nodes and retrieved by any service in the platform.
Key Capabilities
| Capability | What it does |
|---|---|
| Content-Addressable Storage | Files are stored by SHA-256 hash (CID). Uploading the same file twice stores it once — zero duplication cost. |
| Tenant Isolation | Every file key is prefixed with tenant_{tenantID}/. One bucket, fully isolated per tenant at the key level. |
| Capacity Guard | Writes are blocked before disk reaches 90% (configurable). Alert thresholds at 70% / 85% / 95% via Prometheus. |
| Backend Flexibility | Single configuration switch selects MinIO (self-hosted), AWS S3, Cloudflare R2, or Backblaze B2 — no code changes. |
| Automated Backup | Daily encrypted incremental backups via restic to Backblaze B2. Retention: 7 daily, 4 weekly, 12 monthly, 2 annual. |
| Lifecycle Archival | Objects automatically tiered to cold storage at Day 30, expired at Day 365 via MinIO lifecycle policies. |
| Point-in-Time Restore | Recover any snapshot to any point within the retention window using restic restore commands. |
How It Works
Node / Agent
Provider
Guard
Compute
Check
Upload
Documentation Guides
Overview
Architecture, design decisions, project structure, SRP decomposition, and dependency graph.
Getting Started
Register the service, store your first file, retrieve it, and verify deduplication in under 10 minutes.
Setup & Configuration
Docker Compose for MinIO, environment variables, appsettings, and multi-environment configuration patterns.
Use Cases & Scenarios
8 real business scenarios — invoice archival, HR documents, AI artefacts, workflow attachments, audit trails, and more.
Storing Files
Complete developer integration guide: StoreAsync, GetStreamAsync, ExistsAsync, StoreOptions, and error handling.
Backup
Automated encrypted daily backups with restic + Backblaze B2, retention policy, monitoring, and manual procedures.
Archival & Lifecycle
MinIO lifecycle rules — hot → cold at Day 30, expiry at Day 365, compliance holds, and storage class transitions.
Resiliency & Monitoring
Prometheus metrics, Grafana dashboards, disk threshold alerts (70%/85%/95%), and incident response runbooks.
Maintenance
Day-to-day operations — capacity checks, backup verification, log review, MinIO console, and health endpoints.
Point-in-Time Restore
Recover files from any snapshot — full restore, selective restore, disaster recovery procedures, and RTO targets.
Configuration Reference
Complete reference for all FileStorage settings, environment variables, defaults, and per-environment examples.
Project Map
| Project | Type | Responsibility |
|---|---|---|
BizFirst.Integration.S3.Domain | Domain | S3Credential, request/result records, MinIO path style support |
BizFirst.Integration.S3.Services | Services | S3ClientFactory, IS3ObjectService, bucket and folder services |
BizFirst.Ai.InfraHub.Storage.Domain | Domain | IObjectStorageProvider, StoreOptions, StorageCapacityException |
BizFirst.Ai.InfraHub.Storage.S3.Services | Services | ICidProvider, IStorageCapacityGuard, S3ObjectStorageProvider, DI registration |
Compatible Backends
| Backend | Endpoint setting | ForcePathStyle | Notes |
|---|---|---|---|
| MinIO (self-hosted) | http://minio:9000 | true | Default for BizFirst deployments |
| AWS S3 | Leave blank | false | Uses RegionEndpoint routing |
| Cloudflare R2 | https://<account>.r2.cloudflarestorage.com | true | S3-compatible, no egress fees |
| Backblaze B2 | https://s3.<region>.backblazeb2.com | true | Low-cost backup target |