Yük Sınaması ve Kapasite Planlama
Bir LLM uygulamasına gerçekçi trafiği benzetmeyi, kırılma noktasını bulmayı ve yük altında üretimin hızlı ve bütçe dâhilinde kalması için kapasite planlamayı öğrenin.
Yük Sınaması ve Kapasite Planlama, CoddyKit'te ücretsiz bir LLM Apps in Production (RAG + Vector DB + Caching) dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, LLM Apps in Production (RAG + Vector DB + Caching) öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. LLM Apps in Production (RAG + Vector DB + Caching) kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Why Load Test LLM Apps?
LLM apps behave differently under load than typical web services: token generation is slow, requests are long-lived, and upstream provider rate limits add a hard ceiling.
Load testing reveals how your system degrades before real users do.
Key Metrics
Track these under load:
- Throughput — requests or tokens per second
- Latency percentiles — p50, p95, p99
- Error rate — timeouts, 429s
- Time to first token for streaming
Open vs Closed Load Models
Two ways to generate load:
- Closed — fixed number of virtual users, each waits for a response before sending the next
- Open — requests arrive at a fixed rate regardless of responses
Open-model tests better expose queue buildup.
Realistic Workloads
Use realistic prompts. A test with tiny prompts hides cost; production prompts include long retrieved context. Sample real queries and vary input length to mimic actual token distributions.
Percentile Latency in Code
Averages lie; percentiles tell the truth about tail latency.
def percentile(values, p):
s = sorted(values)
idx = int(round((p/100) * (len(s)-1)))
return s[idx]
lat = [120, 130, 140, 900, 150]
print('p95 =', percentile(lat, 95))Finding the Breaking Point
Ramp the request rate gradually until latency or error rate crosses your SLO. That inflection point is your saturation capacity. Run below it in production with headroom.
Estimating Required Capacity
Use Little's Law: concurrency = arrival rate x average latency. Estimate how many concurrent slots you need for peak traffic.
def concurrency(rps, avg_latency_s):
return rps * avg_latency_s
print('Need', concurrency(50, 2.0), 'concurrent slots')Accounting for Provider Limits
Your effective capacity may be capped by the LLM provider's tokens-per-minute and requests-per-minute limits, not your servers. Plan around those quotas and request increases ahead of launches.
Headroom and Autoscaling
Run at a target utilization (often 60-70 percent) so spikes do not immediately saturate. Configure autoscaling on a leading signal like queue depth, since CPU is a poor proxy for LLM load.
Soak and Spike Tests
Beyond steady ramps, run:
- Soak — sustained load for hours to catch leaks
- Spike — sudden surge to test autoscaling reaction
From Test to Plan
Turn results into a capacity plan: peak rps, required concurrency, provider quota needs, scaling rules, and a cost estimate. Re-test after major changes since model and prompt changes shift the numbers.
Quick Check
Test your understanding of capacity planning.
Recap
You learned to load test LLM apps with realistic workloads, track latency percentiles and error rate, find the saturation point, and size capacity with Little's Law. Account for provider quotas, keep headroom, autoscale on queue depth, and run soak and spike tests.
Sıkça Sorulan Sorular
“Yük Sınaması ve Kapasite Planlama” dersi ücretsiz mi?
Evet — “Yük Sınaması ve Kapasite Planlama” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve LLM Apps in Production (RAG + Vector DB + Caching) kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. LLM Apps in Production (RAG + Vector DB + Caching) kursu toplamda 4 dersten oluşur.
“Yük Sınaması ve Kapasite Planlama” dersinde ne öğreneceğim?
Bir LLM uygulamasına gerçekçi trafiği benzetmeyi, kırılma noktasını bulmayı ve yük altında üretimin hızlı ve bütçe dâhilinde kalması için kapasite planlamayı öğrenin. LLM Apps in Production (RAG + Vector DB + Caching) ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
LLM Apps in Production (RAG + Vector DB + Caching) öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te LLM Apps in Production (RAG + Vector DB + Caching), başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Yük Sınaması ve Kapasite Planlama” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu LLM Apps in Production (RAG + Vector DB + Caching) dersinde kod yazıp çalıştırabilir miyim?
Evet. Her LLM Apps in Production (RAG + Vector DB + Caching) dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- RAG Bileşenlerini Yatay Ölçeklendirme
- Gözlemlenebilirlik: Günlükleme, Ölçütler, İzleme
- LLM Operasyonları İçin Uyarı ve Olay Müdahalesi
- Yük Sınaması ve Kapasite Planlama