Understanding key performance metrics that determine API quality - how fast it responds and how many requests it can handle.
Performance has two dimensions: latency (individual request speed) and throughput (how many requests/second). Both matter - a fast API that can only handle 10 requests/second is insufficient for 1000 users. Understanding these concepts helps identify performance issues.
Time from request start to response complete. Example: 245ms latency means took 245 milliseconds.
Number of requests per second (RPS) the API can handle. Example: 1000 RPS = 1000 requests per second.
Scenario: Your video streaming API has these performance metrics: (1) Latency: p50=100ms (50% of requests), p99=500ms (99% of requests), (2) Throughput: Currently 2000 RPS, (3) User base: 50,000 concurrent users during peak hours, (4) SLA: 99% requests < 400ms, (5) Budget: Can add $5000 for infrastructure. Your manager says 'Latency seems fine, no action needed.' Do you agree? Why or why not? Provide a detailed analysis and recommendation.