Skip to main content

Storage Architecture Overview

MCSP uses a multi-tier object storage model for media assets and separate purpose-fitted databases for operational data. All media assets reside in S3-compatible object storage. Nigeria-resident content is logically and physically isolated in a separate bucket with a distinct IAM boundary.

Object Storage Tiers

Tier nameS3 classRegionUse caseRetrieval latency
HotS3 Standardus-east-1 (global default)Actively played content; content < 30 days oldMilliseconds (CDN cache); seconds (origin miss)
ColdS3 Standard-IAus-east-1Infrequently accessed content (< 100 views/30 days)Milliseconds (CDN); first-byte slightly higher at origin
ArchiveS3 Glacier Flexible Retrievalus-east-1Long-tail content (< 10 views/90 days)1–12 hours restore time required before playback
Nigeria HotS3 Standardaf-south-1All Nigeria-resident content regardless of access frequencyMilliseconds (MTN PoP); seconds (origin miss)
Nigeria-resident content is never moved to Cold or Archive tiers. The tiering engine explicitly excludes content with residency: NG from all tier transition evaluations. This is a hard constraint from ADR-003.

Tiering Thresholds

The automated tiering engine runs daily at 02:00 UTC. Thresholds are configurable in the tiering engine configuration store.
Current tierConditionAction
Hot → Coldview_count_30d < 100 AND content older than 14 daysMove object to Standard-IA
Cold → Archiveview_count_90d < 10Move object to Glacier Flexible Retrieval
Archive → Hot (on-demand restore)Client requests archived contentInitiate Glacier restore; serve HTTP 202 with Retry-After
Any tier — Safety netObject not transitioned by engine within 180 daysS3 Lifecycle rule transitions to Standard-IA at 180 days, Glacier at 365 days

Media Object Naming Convention

All S3 keys follow the pattern:
{residency}/{content_id}/{rendition_id}/{segment_number}.{ext}
Examples:
  • global/a1b2c3d4/1080p_6000kbps/seg_00001.cmfv — Video segment
  • ng/e5f6g7h8/audio_128kbps/seg_00001.cmfa — Nigeria-resident audio segment
  • global/a1b2c3d4/manifest.mpd — DASH manifest
  • global/a1b2c3d4/manifest.m3u8 — HLS master manifest

Operational Database Summary

StoreEngineTierWhat it owns
User & Auth DBPostgreSQL multi-AZ (us-east-1)HotUser accounts, sessions (non-cached), RBAC roles, 2FA secrets
Content DBPostgreSQL multi-AZ (us-east-1)HotContent records, metadata, publish status, visibility, moderation state
Subscription DBPostgreSQL multi-AZ (us-east-1)HotSubscription state, plan, billing dates, entitlement flags
Billing Ledger DBPostgreSQL multi-AZ (us-east-1)HotImmutable billing records, payout records, FX rate snapshots
Engagement CacheRedis Cluster 6-shardHotReal-time counters (likes, views, comments), watch history, playlists
Session StoreRedis ClusterHotJWT session state, idempotency keys, upload session state
Analytics DBTimescaleDB / ClickHouseWarmTime-series aggregates: view counts, engagement rates, revenue metrics
Search IndexElasticsearchWarmFull-text content search, creator search
Notification StatePostgreSQLHotNotification preferences, delivery receipts
Nigeria User ReplicaPostgreSQL (read replica in af-south-1)HotRead replica of user/auth data for Nigeria users — write path always goes to us-east-1 primary

Year 3 Storage Projections

Asset typePer-item sizeItem countTotal
Raw uploads (pre-transcode)~2 GB average3M~6 PB (short-lived; deleted after transcoding)
Encoded video (all renditions, per item)~1.5 GB3M~4.5 PB
Encoded audio (all bitrates, per item)~50 MB3M~150 TB
Thumbnails and preview images~5 MB3M~15 TB
DRM manifests and init segments~1 MB3M~3 TB
Nigeria-resident subset (10% of catalogue)As above × 10%300K~450 TB (always hot)
Total operational media storage~5.1 PB

Build docs developers (and LLMs) love