feat(storage): add RustFS attachments and presigned uploads

Add two API replicas, safe object reconciliation, upload validation, regression tests and documented load experiments.
This commit is contained in:
2026-11-12 10:16:39 +03:00
parent ec540a1a72
commit dc46ac213d
118 changed files with 44628 additions and 38 deletions
+18
View File
@@ -14,7 +14,25 @@ IDEMPOTENCY_TTL_SECONDS=86400
S3_ENDPOINT=http://s3:9000
S3_REGION=us-east-1
S3_BUCKET=messenger-attachments
# Compose: root is used only by RustFS and the one-shot bootstrap.
S3_ROOT_ACCESS_KEY_ID=LABSTORAGE
S3_ROOT_SECRET_ACCESS_KEY=local_app_storage_password
S3_API_ACCESS_KEY_ID=LABAPI
S3_API_SECRET_ACCESS_KEY=local_api_storage_password
S3_RECONCILER_ACCESS_KEY_ID=LABRECONCILER
S3_RECONCILER_SECRET_ACCESS_KEY=local_reconciler_storage_password
# Running outside Compose: files must contain the selected restricted role's keys.
S3_ACCESS_KEY_ID_FILE=/run/secrets/s3_access_key_id
S3_SECRET_ACCESS_KEY_FILE=/run/secrets/s3_secret_access_key
MAX_UPLOAD_BYTES=10485760
MAX_IMAGE_PIXELS=40000000
# Total time to receive an upload body, even if bytes continue arriving.
UPLOAD_BODY_TIMEOUT_MS=15000
S3_PUBLIC_PORT=9000
S3_PUBLIC_ENDPOINT=http://127.0.0.1:9000
DIRECT_UPLOAD_TTL_SECONDS=60
# Optional per-stage upload diagnostics; keep disabled outside experiments.
UPLOAD_MEMORY_PROFILE=0
# S3 orphan cleanup: grace period and pause between reconciliation passes.
ORPHAN_GRACE_SECONDS=600
RECONCILE_INTERVAL_SECONDS=60