Storage and Database Services
Core concepts
Storage tiers: OSS (object, buckets, storage classes such as Standard/IA/Archive, lifecycle rules, versioning), NAS (shared POSIX file system for multiple instances), and cloud disks (block storage: ESSD, SSD, efficient). Snapshots back up disks; OSS lifecycle transitions or expires objects automatically.
Databases: ApsaraDB RDS (managed MySQL, SQL Server, PostgreSQL, etc.), PolarDB (cloud-native, compute-storage separation, read replicas), Redis (in-memory cache), and MongoDB (document). Managed services handle backups, patching, and HA across zones. Read replicas offload read traffic; they are not a substitute for sharding write-heavy workloads.
Traps in questions
- Object vs. block vs. file: OSS cannot be mounted as a normal disk; NAS is shared across instances; disks attach to instances.
- Archive retrieval: Archive-class objects need restoration before access and incur retrieval time/cost.
- Read replica lag: replicas may be stale; do not send read-after-write critical reads to a replica without awareness.
- Snapshot scope: snapshots are incremental and region-scoped; they are not a cross-region backup unless copied.
- Redis eviction: a cache is not durable storage; eviction policies can drop data.
Rule of thumb
Choose by access pattern: block for a single instance's OS/data, file for shared concurrent access, object for HTTP-scale unstructured data. Use lifecycle rules to control cost.
Worked example
A media site stores millions of images accessed rarely after 30 days. Put them in OSS Standard, add a lifecycle rule to transition to IA at 30 days and Archive at 180 days, and serve hot content via CDN. Storing them on cloud disks would not scale economically.