Bird
Raised Fist0
HLDsystem_design~20 mins

Throughput, latency, and availability in HLD - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
๐ŸŽ–๏ธ
Throughput, Latency & Availability Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
๐Ÿง  Conceptual
intermediate
2:00remaining
Understanding Throughput in a Web Service

Imagine a web service that handles user requests. Which of the following best describes throughput?

AThe number of requests the service can handle per second.
BThe time it takes for a single request to be processed.
CThe percentage of time the service is operational.
DThe amount of data transferred in a single request.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how many requests the system can complete over time.

โ“ Architecture
intermediate
2:00remaining
Reducing Latency in a Distributed System

You have a distributed system with multiple servers across regions. Which architectural choice will most effectively reduce latency for users?

AUse a single powerful server to handle all requests.
BDeploy servers closer to users geographically.
CStore all data in a central database far from users.
DIncrease the number of servers in a single data center.
Attempts:
2 left
๐Ÿ’ก Hint

Latency depends on the time data takes to travel between user and server.

โ“ scaling
advanced
2:00remaining
Scaling for High Availability

Your system must maintain high availability even during server failures. Which design choice best supports this?

ASchedule maintenance during peak hours to fix issues quickly.
BUse a single server with a powerful CPU and memory.
CUse multiple redundant servers with automatic failover.
DStore backups only once per week to save storage space.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how to keep the system running if one server stops working.

โ“ tradeoff
advanced
2:00remaining
Tradeoff Between Latency and Throughput

In a system design, increasing throughput sometimes increases latency. Which scenario best explains this tradeoff?

AAdding more servers to handle requests in parallel.
BProcessing each request immediately, reducing latency but lowering throughput.
CUsing caching to serve requests faster without affecting throughput.
DBatch processing many requests together to improve throughput but causing delay for each request.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how grouping requests affects speed and quantity.

โ“ estimation
expert
2:00remaining
Estimating System Availability

A system has 3 independent servers, each with 99.9% uptime. What is the approximate overall system availability if it requires at least one server to be up?

A99.9999%
B99.999%
C99.0%
D99.7%
Attempts:
2 left
๐Ÿ’ก Hint

Calculate the chance all servers fail simultaneously, then subtract from 100%.

Practice

(1/5)
1. Which metric best describes how many requests a system can handle per second?
easy
A. Throughput
B. Latency
C. Availability
D. Scalability

Solution

  1. Step 1: Understand throughput meaning

    Throughput measures the amount of work or requests a system can process in a given time.
  2. Step 2: Compare with other metrics

    Latency measures response time, availability measures uptime, scalability is about growth capacity.
  3. Final Answer:

    Throughput -> Option A
  4. Quick Check:

    Throughput = Requests per second [OK]
Hint: Throughput = how much work done per time [OK]
Common Mistakes:
  • Confusing latency with throughput
  • Mixing availability with throughput
  • Thinking scalability equals throughput
2. Which of the following correctly defines latency in system design?
easy
A. The total number of requests processed per second
B. The time taken to respond to a single request
C. The percentage of time the system is operational
D. The ability to add more servers to handle load

Solution

  1. Step 1: Define latency

    Latency is the delay or time taken for a system to respond to one request.
  2. Step 2: Eliminate other options

    The total number of requests processed per second describes throughput. The ability to add more servers to handle load describes scalability. The percentage of time the system is operational describes availability.
  3. Final Answer:

    The time taken to respond to a single request -> Option B
  4. Quick Check:

    Latency = Response time [OK]
Hint: Latency = response time per request [OK]
Common Mistakes:
  • Confusing latency with throughput
  • Thinking availability is latency
  • Mixing scalability with latency
3. A system processes 1000 requests in 10 seconds. Each request takes 5 milliseconds to respond. What is the system's throughput and average latency?
medium
A. Throughput: 1000 requests/sec, Latency: 5 ms
B. Throughput: 100 requests/sec, Latency: 50 ms
C. Throughput: 10 requests/sec, Latency: 5 ms
D. Throughput: 100 requests/sec, Latency: 5 ms

Solution

  1. Step 1: Calculate throughput

    Throughput = total requests / total time = 1000 / 10 = 100 requests per second.
  2. Step 2: Understand latency

    Latency is given as 5 milliseconds per request.
  3. Final Answer:

    Throughput: 100 requests/sec, Latency: 5 ms -> Option D
  4. Quick Check:

    Throughput = 100, Latency = 5 ms [OK]
Hint: Throughput = total requests รท time; latency given directly [OK]
Common Mistakes:
  • Dividing latency by number of requests
  • Confusing throughput units
  • Multiplying latency by total requests
4. A system claims 99.9% availability but is down for 10 minutes in a day. What is the actual availability and is the claim correct?
medium
A. Actual availability is 99.31%, claim is incorrect
B. Actual availability is 99.93%, claim is correct
C. Actual availability is 99.93%, claim is incorrect
D. Actual availability is 99.31%, claim is correct

Solution

  1. Step 1: Calculate total minutes in a day

    24 hours x 60 minutes = 1440 minutes per day.
  2. Step 2: Calculate availability

    Availability = (Total time - downtime) / Total time = (1440 - 10) / 1440 = 1430 / 1440 โ‰ˆ 0.9931 or 99.31%.
  3. Step 3: Compare with claim

    Claim is 99.9%, actual is 99.31%, so claim is incorrect.
  4. Final Answer:

    Actual availability is 99.31%, claim is incorrect -> Option A
  5. Quick Check:

    Availability = 99.31%, Claim wrong [OK]
Hint: Availability = (uptime รท total time) x 100% [OK]
Common Mistakes:
  • Using hours instead of minutes
  • Incorrectly subtracting downtime
  • Misreading percentage claim
5. You design a web service that must handle 10,000 requests per second with an average latency under 100 ms and 99.99% availability. Which design choice best balances these requirements?
hard
A. Use a single powerful server with caching to reduce latency
B. Use a database with strong consistency but no replication
C. Distribute load across multiple servers with load balancers and health checks
D. Optimize only latency by increasing CPU speed on one server

Solution

  1. Step 1: Analyze throughput and availability needs

    10,000 requests/sec and 99.99% availability require scaling and fault tolerance.
  2. Step 2: Evaluate design options

    Using a single powerful server with caching or optimizing CPU speed on one server risks overload and downtime. Using a database with strong consistency but no replication risks availability due to lack of fault tolerance. Distributing load across multiple servers with load balancers and health checks supports scaling and high availability.
  3. Final Answer:

    Distribute load across multiple servers with load balancers and health checks -> Option C
  4. Quick Check:

    Scaling + availability = load balancer + health checks [OK]
Hint: Scale horizontally with load balancers for throughput and availability [OK]
Common Mistakes:
  • Relying on single server for high throughput
  • Ignoring replication for availability
  • Focusing only on latency without scaling
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard