The 3D version of this sim advances the queue with fixed periodic ticks (an accumulator that spawns a device every 1/λ seconds and serves one every 1/μ seconds) and gives every failed device a deterministic backoff delay. This 2D companion instead runs the exact underlying continuous-time Markov chain using the Gillespie stochastic simulation algorithm (SSA): every arrival, service completion and retry attempt is a genuine Poisson/exponential-clock event, so inter-arrival times are truly random (not evenly spaced) and a device's next retry time is drawn from an exponential distribution whose mean equals the backoff delay — the natural memoryless stochastic counterpart of a fixed backoff timer.
It also models a different, real queueing discipline: a retrial queue. A device that fails does not sit in a FIFO line — it joins an "orbit" and keeps attempting the CA independently at its own exponential clock (rate 1 / min(30s, base·2ⁿ) after n failures), so whichever orbiting device's clock fires first is the one that gets served next, not necessarily whoever failed first. This is the standard queueing-theory model used for cellular re-registration and contention-based retry systems.
Gillespie SSA, one step:
R = λ + μ·[busy] + Σ_i 1/min(30, base·2^retries_i) (i over orbit)
τ ~ Exponential(R) time to next event
event ~ categorical(λ, μ·[busy], retry_i) / R
Exact identities checked live, for this lossless single-server retrial queue:
ρ (fraction of time server busy) = λ / (μ·(1 − failRate))
L (time-avg number in system) = λ_eff · W (Little's Law, always true)
Note ρ is not the plain λ/μ from a textbook M/M/1 queue: a failed attempt still occupies the CA for a full exponential service time before the device goes to orbit and eventually returns, so each device costs the server 1/(1 − failRate) attempts on average. Verified numerically against a 300,000-second standalone run of this exact algorithm: at λ=1.5, μ=3, failRate=0.3 the naive λ/μ = 0.500 is off by 43%, while λ/(μ·(1−failRate)) = 0.714 matches the measured busy fraction to 0.2%.
- Arrival rate λ — Poisson rate of new devices entering the enrollment flow.
- CA throughput μ — the exponential service-completion rate while the CA is signing a request.
- Failure rate — probability a completed signing attempt fails, sending the device into orbit to retry.
- Backoff base delay — the mean of each orbiting device's own exponential retry clock; it doubles (in expectation) after every further failure.
Watch the ρ box and the Little's-Law row: because neither identity depends on the retry mechanism's details, they should track the theoretical λ/μ and the measured L / (λ_eff·W) ratio closely once enough simulated time has accumulated — a genuine numerical self-check of the physics, not a scripted animation.