🚀 Horizontal vs Vertical Scaling — sodda tushuntirish

Hi, I’m Azizbek — a backend developer specializing in the Laravel ecosystem. I build scalable, real-time applications with a focus on clean architecture, performance, and developer experience. 🚀 Tech Stack: Laravel, PHP, Livewire, Octane Redis, MySQL, RabbitMQ, WebSocket REST APIs, Microservices, Webhooks Payment integrations (Click, Payme, etc.) Docker (when needed), Git, CI/CD 🛠 Projects I’ve worked on: ProPay, ProID, Goodlook, Soul HR Influencer Wallet System Real-Time Order Processing Platform 🎓 I also share Laravel tips and dev tutorials on my YouTube channel and Telegram. Let’s build something powerful.
Backend’da yuklama oshganda, tizimni kengaytirish uchun 2 ta yo‘l bor:
📈 Vertical Scaling (Scale Up)
👉 Bitta serverni kuchaytirasiz
Masalan:
2 core → 8 core
8GB RAM → 32GB RAM
✅ Afzalliklari:
Oson
Tez implement
❌ Kamchiliklari:
Limit bor
Single point of failure
🌐 Horizontal Scaling (Scale Out)
👉 Serverlar sonini ko‘paytirasiz
Masalan:
- 1 server → 5 server
Load balancer requestlarni taqsimlaydi.
✅ Afzalliklari:
Cheksizga yaqin scale
High availability
❌ Kamchiliklari:
Murakkab arxitektura
Redis / Queue / Shared DB kerak
🧠 Real misol (Laravel stack)
[Load Balancer]
↓ ↓ ↓
[App1] [App2] [App3]
↓ ↓ ↓
Redis (cache/session)
RabbitMQ (queue)
Database (shared)
👉 Har bir app bir xil ishlaydi 👉 Requestlar bo‘linadi 👉 System scalable bo‘ladi
⚠️ Eng muhim tushuncha
Horizontal scaling ishlashi uchun:
👉 App stateless bo‘lishi kerak
Ya’ni:
Session → faylda emas ❌
Session → Redis’da ✅
🔥 Xulosa
Vertical — oddiy va tez
Horizontal — professional va scalable
👉 Katta loyihalar Hybrid ishlatadi.
