Toolvito

Works on this device

Concurrent Connection Calculator

Find how many connections, requests or sessions are open at the same time. Use Little's law with a rate and a mean duration, count users and the connections each keeps, or find the most open at once in a list of sessions. You type every figure.

Enter your values

Little's law: connections open at the same time = arrival rate × mean duration. It also works the other two ways.

Your values

New connections (or requests, or sessions) at your busiest time.

The mean time from when a connection opens until it closes.

Type a limit, such as max_connections, to see the share of it in use.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose what you want to work out. Connections open from a rate and a duration (Little's law) is the first choice.
  2. Type the new connections at your busiest time, choose whether they are counted each second, minute or hour, and type the mean duration of one connection.
  3. Add a connection limit if you want the share of it in use.
  4. Choose Calculate. To work the law the other way, choose the arrival rate or the duration in Work out.

The formulas

  • Little's law: connections open at the same time = arrival rate × mean duration. Rate = open ÷ duration. Duration = open ÷ rate.
  • From users: users online at the same time × connections each keeps open × share of them active.
  • From a list: the most sessions open at one instant. A session that ends at the second another starts does not overlap it. Mean number open = sum of the durations ÷ the time from the first start to the last end.
  • Little's law (John D. C. Little, 1961) holds for averages over a long, steady time. The busiest second has more open than the average.

Worked examples

Little's law: 150 new connections each second that stay open 4 seconds on average give 150 × 4 = 600 connections open at the same time. With a limit of 1,000 that is 60% in use.

The other way: a limit of 600 open connections with a mean duration of 4 seconds allows at most 150 new connections each second.

From users: 2,500 users online at once, each keeping 2 connections open, hold 5,000 connections.

From a list: sessions from 09:00:00 to 09:05:00, 09:01:30 to 09:03:00, 09:02:00 to 09:10:00, 09:03:00 to 09:04:00 and 09:06:00 to 09:07:30. At most 3 are open at once, from 09:02:00 until 09:04:00. The durations add up to 1,020 seconds in 600 seconds, so 1.7 are open on average.

Other tools for the same subject

Limits you should know

  • The tool reads no server and no log file: you type the figures or the session times.
  • Session times are clock times of one day. An end earlier than its start is taken as the next day; a longer list needs dates.
  • Little's law gives a long-run average. Plan for the busiest moment with room to spare.

Related tools