QA
Beginner LevelSystem Design & Architecture

What is Latency vs Throughput and how do SLA/SLO performance targets work?

❓ Interview Prompt: Explain Latency (duration per request), Throughput (requests per second), Percentiles ($p50, p95, p99$), SLA, and SLO metrics.

Measuring system performance parameters:

β€’
Latency: The time taken to process a single request from client invocation to response receipt (e.g. $45\text{ms}$).
β€’
Throughput: The volume of work or requests the system can process per unit of time (e.g. $10,000\text{ Requests Per Second - RPS}$).
β€’
Percentiles ($p95, p99$): $p99$ latency represents the worst $1\%$ of requests. Never rely on average latency!
β€’
SLO (Service Level Objective): Target performance bound (e.g. $p99 \text{ Latency} < 200\text{ms}$).

Code Implementation Example

typescript
// Measuring p99 Latency & Throughput in OpenTelemetry
const startTime = performance.now();
await processRequest();
const duration = performance.now() - startTime;
metrics.histogram('http_request_duration_ms', duration);
πŸ’‘Tracking request duration metrics for p99 latency SLO evaluation.
🎯 Interview Key Takeaway

Target latency percentiles (p95, p99) rather than averages to ensure acceptable performance for all users.

#System Design#Latency#Throughput#SLO#Beginner
Back to all System Design & Architecture Questions→

More System Design & Architecture Interview Questions

Beginner LevelSystem Design & Architecture

Explain the CAP Theorem and PACELC Theorem with real-world database examples.

Beginner LevelSystem Design & Architecture

What is Vertical Scaling (Scale Up) vs Horizontal Scaling (Scale Out)?

Beginner LevelSystem Design & Architecture

How do Load Balancers distribute traffic (Round Robin, Least Connections, IP Hash)?