Add all assessment files

هذا الالتزام موجود في:
2026-07-28 15:54:03 +03:00
الأصل daad97fa34
التزام da82e724cd
11 ملفات معدلة مع 917 إضافات و0 حذوفات

ثنائية
q4-scalability/architecture.png Normal file

ملف ثنائي غير معروض.

بعد

العرض:  |  الارتفاع:  |  الحجم: 1.4 MiB

عرض الملف

@@ -0,0 +1,66 @@
# Scalability Design
## 1. Architecture
The application is deployed on a Kubernetes cluster hosted on Ghaymah Cloud.
Incoming traffic is distributed through a Ghaymah Load Balancer across multiple application containers. The application stores persistent data using Ghaymah Block Storage, which is mounted as a Persistent Volume.
---
## 2. Required Number of Containers
### Given
- Incoming traffic = **15,000 requests/second**
- One container handles = **500 requests/second**
- Safety margin = **30%**
### Step 1
Base number of containers
15000 / 500 = 30 containers
### Step 2
Add 30% capacity
30 × 1.3 = 39 containers
### Final Answer
**39 containers**
---
## 3. Cold Start Strategy
To reduce startup latency for newly created containers:
- Keep a minimum number of warm replicas running.
- Use Kubernetes readiness probes before routing traffic.
- Pull container images in advance on cluster nodes.
- Use Horizontal Pod Autoscaler (HPA) to scale before traffic reaches peak levels.
- Deploy applications with rolling updates to avoid downtime.
---
## 4. Using Ghaymah Block Storage
Ghaymah Block Storage provides persistent storage for stateful workloads.
Typical use cases include:
- Databases
- PostgreSQL
- MySQL
- Redis persistence
- Application uploaded files
- Persistent logs
Benefits:
- Data persists even if a container is recreated.
- Storage can be attached to new containers.
- Reliable and durable storage for production workloads.