Cost & Capacity Estimation Interview Questions Hindi mein

Cost & Capacity Estimation कोर्स के 30 सवाल, हर सवाल के सही जवाब और explanation के साथ। जवाब देखने से पहले ख़ुद सोचें।

Why Estimate: The Mental Model

1. Why is an estimate that is 2x off usually acceptable?

  1. Because cloud providers refund overestimates automatically
  2. Because architecture choices usually change only when a number moves by an order of magnitude
  3. Because estimates are never checked after launch
  4. Because servers always run at 50% utilisation
जवाब देखें

जवाब: Because architecture choices usually change only when a number moves by an order of magnitude

Designs differ mainly between 10, 10,000 and 10 million requests per second. A 2x error rarely changes the design, while a 100x error does.

पाठ: Why Engineers Estimate

2. In the five-step process, what is the main benefit of listing assumptions separately from calculations?

  1. It makes the arithmetic more precise
  2. It removes the need for sanity checks
  3. When an input is challenged you change one value and recompute instead of redoing the whole estimate
  4. It guarantees the estimate matches production
जवाब देखें

जवाब: When an input is challenged you change one value and recompute instead of redoing the whole estimate

Separated assumptions make the estimate easy to revise and make disagreements specific: people argue about one input, not the whole result.

पाठ: A Repeatable Estimation Process

3. Roughly how many bytes per second can a 1 Gbps link carry at most?

  1. About 1 GB per second
  2. About 8 GB per second
  3. About 1 MB per second
  4. About 125 MB per second
जवाब देखें

जवाब: About 125 MB per second

1 Gbps is 10^9 bits per second; dividing by 8 gives 1.25 x 10^8 bytes, about 125 MB/s, and real throughput is a little lower due to protocol overhead.

पाठ: Units, Powers of Ten and Bits vs Bytes

Numbers Every Engineer Should Know

4. Which is closest to the latency of a random read from main memory?

  1. About 100 nanoseconds
  2. About 100 microseconds
  3. About 10 milliseconds
  4. About 150 milliseconds
जवाब देखें

जवाब: About 100 nanoseconds

Main memory access is on the order of 100 ns. SSD random reads are around tens to a hundred microseconds, disk seeks several milliseconds, and intercontinental round trips over 100 ms.

पाठ: Latency Orders of Magnitude

5. A request needs 4 ms of CPU time. Ignoring other limits, about how many such requests can one core serve per second?

  1. About 25
  2. About 400
  3. About 250
  4. About 4,000
जवाब देखें

जवाब: About 250

One second is 1,000 ms; 1,000 / 4 = 250 requests per second per core at full utilisation.

पाठ: Throughput Rules of Thumb

6. A service receives 50 million requests per day. What is the average rate, roughly?

  1. About 50 per second
  2. About 5,000 per second
  3. About 50,000 per second
  4. About 600 per second
जवाब देखें

जवाब: About 600 per second

50 x 10^6 / 86,400 is about 580 per second; the mental shortcut 5 x 10^7 / 10^5 = 500 is close enough.

पाठ: Time Conversions Without a Calculator

Estimating Traffic

7. A chat app has 10 million DAU, each sending 40 messages a day. Roughly what is the average message write rate?

  1. About 400 per second
  2. About 46,000 per second
  3. About 4,600 per second
  4. About 460,000 per second
जवाब देखें

जवाब: About 4,600 per second

10^7 x 40 = 4 x 10^8 messages per day; divided by 86,400 gives about 4,600 per second.

पाठ: From Users to Requests per Second

8. If 10% of a day's requests arrive in the busiest hour, what is the peak-to-average factor?

  1. 2.4x
  2. 10x
  3. 1.1x
  4. 24x
जवाब देखें

जवाब: 2.4x

Spread evenly, each hour would carry 1/24 (about 4.2%) of traffic. 10% / 4.17% = 2.4x.

पाठ: Peaks, Spikes and Seasonality

9. Which component is usually the first choice for scaling a read-heavy workload?

  1. Adding more write shards
  2. Caching and read replicas
  3. Increasing the replication factor of writes
  4. Switching to a message queue
जवाब देखें

जवाब: Caching and read replicas

Reads that repeat can be served from caches and replicas, which take load off the primary. Sharding is mainly for scaling writes and data size.

पाठ: Read/Write Ratio and Fan-out

Storage and Bandwidth

10. A service stores 1 million 2 KB records per day for 1,000 days. About how much raw data is that before replication?

  1. About 2 GB
  2. About 2 PB
  3. About 200 GB
  4. About 2 TB
जवाब देखें

जवाब: About 2 TB

10^6 x 2 x 10^3 bytes = 2 x 10^9 bytes per day; over 1,000 days that is 2 x 10^12 bytes, about 2 TB.

पाठ: Sizing Stored Data

11. Logical data is 10 TB, replication factor is 3, and you want disks at most 75% full. Ignoring indexes, how much disk should you provision?

  1. About 13 TB
  2. About 30 TB
  3. About 40 TB
  4. About 22.5 TB
जवाब देखें

जवाब: About 40 TB

10 TB x 3 replicas = 30 TB raw. Dividing by 0.75 for headroom gives 40 TB.

पाठ: Replication, Indexes and Headroom

12. Why is egress often a bigger cost concern than ingress for a consumer media app?

  1. Egress is slower than ingress
  2. Each object is uploaded once but downloaded many times, and providers commonly charge for outbound transfer
  3. Ingress requires a CDN
  4. Egress cannot be compressed
जवाब देखें

जवाब: Each object is uploaded once but downloaded many times, and providers commonly charge for outbound transfer

Download volume is multiplied by the number of views, and outbound internet transfer is the direction cloud providers typically bill. CDNs and compression reduce it.

पाठ: Bandwidth, Ingress and Egress

Compute and Concurrency

13. A service handles 500 requests per second with an average latency of 200 ms. About how many requests are in flight on average?

  1. 100
  2. 2,500
  3. 10
  4. 1,000
जवाब देखें

जवाब: 100

L = lambda x W = 500 x 0.2 = 100 requests in flight.

पाठ: Little's Law

14. Peak is 9,000 QPS, each server handles 1,000 QPS, and the target utilisation is 50%. Ignoring redundancy, how many servers are needed?

  1. 9
  2. 4.5
  3. 12
  4. 18
जवाब देखें

जवाब: 18

Each server is planned to carry 1,000 x 0.5 = 500 QPS, and 9,000 / 500 = 18 servers.

पाठ: How Many Servers?

15. In the M/M/1 model, if utilisation goes from 80% to 90%, what happens to the average time in system?

  1. It increases by about 12%
  2. It doubles
  3. It stays the same
  4. It halves
जवाब देखें

जवाब: It doubles

W = S / (1 - rho): at 80% it is 5S, at 90% it is 10S, so it doubles even though utilisation rose by only 10 points.

पाठ: Utilisation and Queueing Delay

Memory, Caches and Data Stores

16. Reads are 20,000 per second. If the cache hit ratio rises from 90% to 98%, what happens to database reads?

  1. They drop from 2,000/s to 400/s
  2. They drop from 18,000/s to 19,600/s
  3. They stay at 2,000/s
  4. They drop from 2,000/s to 1,600/s
जवाब देखें

जवाब: They drop from 2,000/s to 400/s

Misses are 10% then 2% of 20,000: 2,000/s falls to 400/s, a 5x reduction from an 8-point change in hit ratio.

पाठ: Sizing a Cache

17. Writes need 6 shards, data size needs 10 shards. With no extra headroom, how many shards do you plan?

  1. 6
  2. 16
  3. 10
  4. 8
जवाब देखें

जवाब: 10

Take the maximum across limits: 10 shards satisfy both the write and size constraints.

पाठ: Database Capacity: IOPS, Connections, Shards

18. A backlog of 600,000 messages exists. Producers send 4,000/s and consumers process 5,000/s. How long to drain it?

  1. 2 minutes
  2. About 67 seconds
  3. 150 seconds
  4. 10 minutes
जवाब देखें

जवाब: 10 minutes

Net drain rate is 5,000 - 4,000 = 1,000/s; 600,000 / 1,000 = 600 seconds, which is 10 minutes.

पाठ: Queues, Partitions and Backlog

Modelling Cloud Cost

19. Which item is most often forgotten in a first cost estimate?

  1. The number of application servers
  2. Logging, monitoring and data-transfer charges between zones or to the internet
  3. The size of the primary database
  4. Object storage for user uploads
जवाब देखें

जवाब: Logging, monitoring and data-transfer charges between zones or to the internet

Servers and primary storage are obvious. Observability ingestion and network transfer charges are less visible but can be significant.

पाठ: What Actually Drives the Bill

20. A database cluster costs the same whether it runs at 20% or 60% load. What kind of cost is that?

  1. Variable cost
  2. Egress cost
  3. Marginal cost per request
  4. Fixed (step) cost
जवाब देखें

जवाब: Fixed (step) cost

Provisioned capacity is paid for whether or not it is used, so it behaves as a fixed cost until you resize to a different step.

पाठ: Unit Economics: Cost per User and per Request

21. Which workload fits spot or preemptible instances best?

  1. A stateless video-transcoding worker pulling jobs from a queue
  2. The single primary database
  3. A license server that must never restart
  4. A long-lived WebSocket gateway with no reconnection logic
जवाब देखें

जवाब: A stateless video-transcoding worker pulling jobs from a queue

Queue-driven, stateless, retryable work tolerates interruptions. The others suffer directly when a node is reclaimed.

पाठ: On-demand, Committed and Spot Capacity

Capacity Planning in Practice

22. Why should you not plan capacity at the maximum throughput a load test reached?

  1. Because load tests always overestimate throughput by exactly 2x
  2. Because providers forbid running servers at maximum
  3. Because latency rises sharply near the knee, leaving no headroom for spikes, failures or deploys
  4. Because maximum throughput is only reached with spot instances
जवाब देखें

जवाब: Because latency rises sharply near the knee, leaving no headroom for spikes, failures or deploys

Near saturation, latency and errors climb rapidly. Planning below the knee keeps latency stable and leaves room for real-world variation.

पाठ: Validating Estimates with Load Tests

23. Usage grows 10% per month, compounding. Roughly how much larger is it after 12 months?

  1. About 1.2x
  2. About 3.1x
  3. About 2x
  4. About 12x
जवाब देखें

जवाब: About 3.1x

1.1^12 is about 3.14. Compounding makes growth much faster than the simple 12 x 10% = 120% you might guess.

पाठ: Forecasting Growth and Lead Time

24. In the USE method, what does 'Saturation' measure?

  1. The fraction of time a resource is busy
  2. The number of failed operations
  3. The total cost of a resource
  4. The amount of work waiting because the resource cannot keep up
जवाब देखें

जवाब: The amount of work waiting because the resource cannot keep up

Saturation is queued or waiting work, such as run-queue length or queue depth. Utilisation is busy time and Errors counts failures.

पाठ: Monitoring Saturation

Pitfalls, Tail Latency and Optimisation

25. An estimate says each user will store 40 GB of text messages per day. What is the most likely explanation?

  1. Text messages are larger than expected
  2. A unit conversion error, such as multiplying by 1,000 one time too many
  3. The replication factor was set to 3
  4. The retention period is too short
जवाब देखें

जवाब: A unit conversion error, such as multiplying by 1,000 one time too many

A per-user sanity check exposes the absurdity: nobody types 40 GB of text a day. That magnitude of error almost always comes from a unit slip.

पाठ: Common Estimation Mistakes

26. A request fans out to 10 backends in parallel, each slow 5% of the time independently. About what fraction of requests wait on at least one slow backend?

  1. 5%
  2. About 40%
  3. 50%
  4. About 10%
जवाब देखें

जवाब: About 40%

1 - 0.95^10 is about 0.40, so roughly 40% of top-level requests see at least one slow call.

पाठ: Tail Latency and Fan-out

27. A fleet of stateless web servers runs at 70% CPU in the evening peak and 10% overnight. Which optimisation fits best?

  1. Move the servers to an archive storage tier
  2. Increase the replication factor
  3. Autoscale the fleet with the daily traffic curve
  4. Shard the web servers
जवाब देखें

जवाब: Autoscale the fleet with the daily traffic curve

Stateless tiers can add and remove instances with load, so autoscaling removes the overnight idle cost while preserving the evening peak capacity.

पाठ: Optimising Cost Without Breaking Capacity

Revision and Interview Prep

28. Which formula gives the number of requests in flight?

  1. Requests per day / 86,400
  2. Arrival rate x average time in system
  3. Service time / (1 - utilisation)
  4. Total reads x (1 - hit ratio)
जवाब देखें

जवाब: Arrival rate x average time in system

That is Little's Law, L = lambda x W. The others give average QPS, M/M/1 response time and backend read load.

पाठ: Cheat Sheet: Formulas and Anchors

29. In the URL shortener walkthrough, what is the main design conclusion from the numbers?

  1. The system is write-heavy and needs many write shards
  2. The dataset is too large to store on disks
  3. Reads dominate, so caching popular links pays off and storage is modest
  4. A 4-character code is enough for 5 years
जवाब देखें

जवाब: Reads dominate, so caching popular links pays off and storage is modest

With 100:1 reads to writes and only a few terabytes of logical data, the read path benefits most from caching. 62^4 is about 14.8 million, far too few codes.

पाठ: Worked Interview Problem: A URL Shortener

30. A system has an average of 3,000 QPS, a peak factor of 4, servers that sustain 1,500 QPS each, a 50% utilisation target, and must survive losing one of two zones. How many servers in total?

  1. 16
  2. 8
  3. 24
  4. 32
जवाब देखें

जवाब: 32

Peak is 12,000 QPS. Each server is planned at 750 QPS, so 16 servers carry the peak. To survive losing one of two zones, each zone must hold all 16, so 32 in total.

पाठ: Mixed Self-Check

← कोर्स पर वापस जाएँ