☁️ Storage & Database Deep Dive
S3 storage classes, EBS vs EFS, RDS vs DynamoDB vs ElastiCache
🪣 S3 Storage Classes
Standard — tez-tez kirish (millisecond latency). Intelligent-Tiering — kirish patterniga qarab avtomatik tier o'tkazadi. Standard-IA — kam kirish, arzon saqlash, retrieval narxi bor. One Zone-IA — bitta AZ, Standard-IA dan 20% arzon lekin AZ failure bo'lsa yo'qoladi. Glacier Instant — millisecond retrieval. Glacier Flexible — minutes to hours. Glacier Deep Archive — 12-48 soat, eng arzon.
💾 EBS vs EFS vs Instance Store
EBS (Elastic Block Store) — bitta EC2 ga birikadi, AZ-level, SSD/HDD. EFS (Elastic File System) — ko'p EC2 ga bir vaqtda, regional, NFS, serverless, auto-scale. Instance Store — fizik disk, EC2 o'chsa data yo'qoladi (ephemeral), eng tez, cache uchun. EBS Multi-Attach — faqat Nitro-based io1/io2, bir nechta EC2.
🗄️ RDS vs DynamoDB vs ElastiCache
RDS — managed SQL (MySQL, PostgreSQL, Oracle, MariaDB, SQL Server, Aurora). Multi-AZ, Read Replicas. Aurora — MySQL/PostgreSQL compatible, 5x tez, serverless variant. DynamoDB — serverless NoSQL, millisecond latency, auto-scale, key-value/document. ElastiCache — in-memory cache (Redis/Memcached), ms altida response, session store, leaderboard uchun.
🔄 Database Migration & Backup
AWS DMS (Database Migration Service) — on-premises dan RDS ga, yoki bir RDS dan boshqasiga migratsiya. RDS Automated Backup — 1-35 kun retention, point-in-time restore. DynamoDB Backup — on-demand va PITR (35 kun). S3 Lifecycle Policy — ob'ektlarni avtomatik arxivlash yoki o'chirish.
📊 Storage Xizmatlar Taqqoslash
| Xizmat | Tur | Access | Scope | Asosiy Use Case |
|---|---|---|---|---|
| S3 | Object | HTTP/API | Global | Fayl, backup, static web, data lake |
| EBS | Block | EC2 only | AZ | OS disk, database, boot volume |
| EFS | File (NFS) | Ko'p EC2 | Regional | Shared file system, CMS, home dirs |
| Instance Store | Block (ephemeral) | EC2 only | AZ | Temp files, cache, buffer |
| Glacier | Object (archive) | HTTP | Regional | Arxiv, compliance, backup |
💡 Asosiy nuqtalar
- S3: Standard > IA > One Zone-IA > Glacier — narx kamayib, retrieval sekinlashib boradi
- EBS: bitta EC2, AZ-bound. EFS: ko'p EC2, regional, NFS
- Instance Store: ephemeral, eng tez, cache uchun
- RDS Multi-AZ: HA uchun. Read Replica: performance uchun
- DynamoDB: serverless NoSQL, predictable ms latency
- ElastiCache: in-memory, database oldida cache qatlami
🎯 Imtihon maslahatlari
- "Shared file system across multiple EC2" → EFS (NFS), "single EC2 block storage" → EBS
- "Millisecond latency NoSQL" → DynamoDB, "relational database" → RDS/Aurora
- "In-memory caching" → ElastiCache, "session store" → ElastiCache Redis
- S3 durability = 99.999999999% (11 nines), Availability va Durability farqi muhim
- Aurora = RDS ni kuchaytirgan versiyasi, ikkala MySQL va PostgreSQL compatible
⚠️ Ko'p adashadigan
- EFS va EBS ni bir xil deb o'ylash: EBS=bitta EC2, EFS=ko'p EC2
- S3 ni database sifatida ishlatish tavsiya etiladi deb o'ylash — S3 object storage, DB emas
- DynamoDB ni slow deb o'ylash — DynamoDB single-digit millisecond latency kafolatlaydi
- Read Replica = standby backup deb o'ylash: Read Replica=performance, Multi-AZ=HA/failover
🧠 Eslab qolish: "EBS=Eksklyuziv Bitta Server, EFS=Erkin Ko'p Server" — S3 storagelar: "Standard → IA → OneZone → Glacier" = narx kamayib boradi
Storage & Database Deep Dive bo'yicha o'zingizni sinab ko'ring
Bepul interaktiv quiz, mock imtihon va to'liq darslar — CertMaster platformasida.
Bepul boshlash →