Token bucket burst simulator calculator

Calculate accepted request count and rejected request count with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use accepted request count and rejected request count to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Bucket capacity (tokens)
10
Token refill per second
2
Initial tokens
10
Requests: name, arrival seconds, token cost
A,0,7 B,1,6 C,2,4
Accepted request count
2
Rejected request count
1
Tokens after each request
3, 5, 3
Request decisions
A: accepted; B: rejected; C: accepted
Minimum observed post-request tokens
3

Try another scenario

Bucket capacity (tokens)
5
Token refill per second
0
Initial tokens
5
Requests: name, arrival seconds, token cost
A,0,7 B,1,6 C,2,4
Accepted request count
1
Rejected request count
2
Tokens after each request
5, 5, 1
Request decisions
A: rejected; B: rejected; C: accepted
Minimum observed post-request tokens
1
Calculation method

Calculation method

Accepted request count

Accept when the replenished bucket covers the whole token cost; consume tokens only on acceptance.

Rejected request count

Count costs that exceed available tokens. Rejections do not wait.

Tokens after each request

Before each request refill by elapsed seconds × rate, capped at capacity.

Request decisions

Input-order events at equal timestamps are processed sequentially.

Minimum observed post-request tokens

Minimum bucket balance immediately after any event.

Symbols and units
a
Bucket capacity (tokens)
b
Token refill per second
c
Initial tokens
d
Requests: name, arrival seconds, token cost

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • A continuous-refill single token bucket with request rejection and no queue, initially observed at t=0. Costs above bucket capacity remain valid requests that will be rejected.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Further reading

Cisco: single token bucket mechanism ↗

Background reading; this does not imply endorsement or independent review of SumFizz.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.