Aşağıdaki uygulama için performans test ve ölçeklendirme planı hazırla:
UYGULAMA:
- Tip: [WEB / API / E-TİCARET]
- Mevcut RPS: [N]
- Hedef RPS: [N]
- Mevcut latency: [P50/P95/P99 ms]
- SLA: [%99.9 / %99.99]
ÜRET:
1. PERFORMANS TEST TÜRLERİ:
- Load test: beklenen yük altında davranış (1x normal)
- Stress test: limitin üstüne çık (2x-5x), kırılma noktası bul
- Spike test: ani yük artışı (10 dk içinde 10x)
- Soak test: uzun süre sabit yük (24-72 saat, memory leak tespiti)
- Capacity test: max ne kadar kaldırır
2. ARAÇLAR:
- k6 (JavaScript, developer-friendly)
- JMeter (klasik, GUI)
- Locust (Python)
- Artillery (Node.js)
- Gatling (Scala, CI uyumlu)
- Cloud: AWS Load Testing / BlazeMeter
3. TEST SENARYOSU:
```
Aşama 1: Ramp-up (0→1000 user, 5 dk)
Aşama 2: Steady state (1000 user, 30 dk)
Aşama 3: Spike (1000→5000 user, 2 dk)
Aşama 4: Recovery (5000→1000, 5 dk)
Aşama 5: Ramp-down (1000→0, 5 dk)
```
4. BOTTLENECK TESPİTİ:
- CPU profiling: flame graph, hot path
- Memory profiling: heap snapshot, GC pause
- DB: slow query log, connection pool saturation
- Network: bandwidth, DNS resolution, TLS handshake
- Application: APM (New Relic, Datadog, Elastic APM)
5. OPTİMİZASYON:
- Frontend: lazy loading, code splitting, image optimization (WebP), minification
- Backend: connection pooling, async processing, batch operations
- Cache: Redis (hot data), CDN (static assets), browser cache (Cache-Control)
- DB: index, query optimize, read replica, connection pool
- Infra: auto-scaling, load balancer, CDN edge locations
6. KPI'LAR:
- P50, P95, P99 latency (ms)
- Throughput (RPS)
- Error rate (%)
- Apdex score
- CPU/Memory utilization (%)
- DB connection pool usage
7. PERFORMANS BÜTÇESİ:
- Sayfa yükleme: <2 saniye (LCP)
- API yanıt: <200ms (P95)
- TTFB: <100ms
- Core Web Vitals: LCP <2.5s, FID <100ms, CLS <0.1
Türkçe, performans mühendisliği best practice.