All Exams Test series for 1 year @ ₹349 only
Question

Consider a popular sports news site. At a given moment, 20,000 concurrent users submit a request (a transaction. T) once every 2 minutes on average. Each transaction requires the webapp to download a new article that on average has 3k bytes in length. What is the throughput? 

The correct answer is

4 megabits per second

Understanding Throughput Calculation for Web Services

This problem asks us to calculate the throughput of a popular sports news site. Throughput is a measure of how much data is successfully transferred over a communication channel in a given amount of time. To find the throughput, we need to determine the total amount of data being requested by all users per second and then convert this to the required units (megabits per second).

We are given the following information:

  • Number of concurrent users: 20,000
  • Request frequency per user: Once every 2 minutes
  • Average article size per request: 3k bytes

Step-by-Step Throughput Calculation

Let's break down the calculation into steps:

  1. Calculate the total number of requests across all users per unit of time.
  2. Calculate the total amount of data transferred per unit of time (total data volume per second).
  3. Convert the data volume from bytes per second to bits per second.
  4. Convert the data volume from bits per second to megabits per second.

Calculating Total Requests Per Second

Each of the 20,000 users makes one request every 2 minutes. First, let's find the total number of requests in 2 minutes:

Total requests in 2 minutes = \( \text{Number of users} \times \text{Requests per user} \)

Total requests in 2 minutes = \( 20,000 \times 1 = 20,000 \) requests

Now, let's find the total requests per minute:

Total requests per minute = \( \frac{\text{Total requests in 2 minutes}}{2 \text{ minutes}} = \frac{20,000}{2} = 10,000 \) requests per minute

To find the requests per second, we convert minutes to seconds (1 minute = 60 seconds):

Total requests per second = \( \frac{\text{Total requests per minute}}{60 \text{ seconds per minute}} = \frac{10,000}{60} \) requests per second

Total requests per second \( = \frac{1000}{6} = \frac{500}{3} \) requests per second (approximately 166.67 requests per second)

Calculating Total Data Per Second

Each request downloads an article with an average size of 3k bytes. The 'k' in '3k bytes' typically means 1000 in the context of data transfer rates (kilobytes). So, 3k bytes = 3 \(\times\) 1000 bytes = 3000 bytes.

Total data per second = \( \text{Total requests per second} \times \text{Data size per request} \)

Total data per second = \( \frac{10,000}{60} \times 3000 \) bytes per second

Total data per second = \( \frac{10,000 \times 3000}{60} = \frac{30,000,000}{60} \) bytes per second

Total data per second = \( 500,000 \) bytes per second

Converting Data to Megabits Per Second

Throughput is often measured in bits per second (bps) or multiples like kilobits per second (kbps), megabits per second (Mbps), etc. We need to convert bytes per second to bits per second.

1 byte = 8 bits

Total data per second in bits = \( \text{Total data per second in bytes} \times 8 \)

Total data per second in bits = \( 500,000 \times 8 = 4,000,000 \) bits per second

Now, we need to convert bits per second to megabits per second. In networking and telecommunications, 'mega' (M) usually means \(10^6\) (one million). So, 1 megabit (Mb) = 1,000,000 bits.

Throughput in Mbps = \( \frac{\text{Total data per second in bits}}{1,000,000 \text{ bits per Mb}} \)

Throughput in Mbps = \( \frac{4,000,000}{1,000,000} = 4 \) Mbps

Therefore, the throughput of the sports news site is 4 megabits per second.

Metric Value Units
Concurrent Users 20,000 Users
Request Frequency per User 1 per 2 mins Transaction/User
Average Article Size 3k Bytes
Total Requests per 2 mins 20,000 Requests
Total Requests per min 10,000 Requests/min
Total Requests per sec \( \frac{10000}{60} \) Requests/sec
Article Size (Bytes) 3000 Bytes
Total Data per Sec (Bytes) \( \frac{10000}{60} \times 3000 = 500,000 \) Bytes/sec
Total Data per Sec (Bits) \( 500,000 \times 8 = 4,000,000 \) Bits/sec
Throughput (Mbps) \( \frac{4,000,000}{1,000,000} = 4 \) Mbps

Conclusion

Based on the calculations, the throughput required for the sports news site under these conditions is 4 megabits per second.

Revision Table: Key Concepts

Term Definition/Concept
Throughput The rate at which data is successfully transmitted over a communication channel per unit of time. Usually measured in bits per second (bps).
Concurrent Users The number of users actively using a system or application at the same time.
Transaction A single unit of work or request made by a user to a system, like downloading an article.
Bytes vs Bits A byte is a unit of digital information that most commonly consists of 8 bits. Network speeds (throughput) are typically measured in bits per second.
Prefixes (k, M, G) In networking/telecom (and often in this context): kilo (k) means 103, mega (M) means 106, giga (G) means 109. For storage, they sometimes refer to powers of 1024.

Additional Information: Factors Affecting Throughput

While our calculation provides a theoretical throughput requirement based on user activity and data size, actual throughput can be affected by many factors:

  • Network Congestion: Heavy traffic on the internet or local network can reduce available bandwidth.
  • Server Performance: The speed at which the server can process requests and send data impacts throughput.
  • Client Device Limitations: The user's device and internet connection speed also play a role.
  • Protocol Overhead: Data transfer protocols (like TCP/IP) add overhead to the data being sent, slightly increasing the actual data transferred.
  • Content Caching: If articles are cached by users' browsers or intermediate servers, not every request will hit the origin server, reducing the load.

Understanding these factors is important for designing and managing high-traffic websites like a popular sports news site to ensure a good user experience even with many concurrent users and frequent transactions.

Was this answer helpful?

Important Questions from Miscellaneous

  1. A stone is thrown horizontally from the top of a 20 m high building with a speed of 12 m/s. It hits the ground at a distance R from the building. Taking g = 10 m/s2 and neglecting air resistance will give :

  2. A sphere of volume V is made of a material with lower density than water. While on Earth, it floats on water with its volume f1V (f1 < 1) submerged. On the other hand, on a spaceship accelerating with acceleration a < g (g is the acceleration due to gravity on Earth) in outer space, its submerged volume in water is f2V. Then:

  3. A railway wagon (open at the top) of mass M1 is moving with speed v1 along a straight track. As a result of rain, after some time it gets partially filled with water so that the mass of the wagon becomes M2 and speed becomes v2. Taking the rain to be falling vertically and the water stationery inside the wagon, the relation between the two speeds v1 and v2 is :

  4. Consider the following statements:

    1. Distance between the longitudes becomes zero on North Pole and South Pole.

    2. Distance between the longitudes is maximum on the Equator.

    3. Number of longitudes is more than number of latitudes.

    Which of the statements given above is/are correct?

  5. One block of 2⋅0 kg mass is placed on top of another block of 3⋅0 kg mass. The coefficient of static friction between the two blocks is 0⋅2. The bottom block is pulled with a horizontal force F such that both the blocks move together without slipping. Taking acceleration due to gravity as 10 m/s2, the maximum value of the frictional force is :

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App