RTSP Load Testing at Scale

WINK RTSP Benchmark is a high-performance load testing tool for RTSP streaming servers. Simulate 10,000+ concurrent connections with real RTP packet loss tracking. Built in Go for efficient resource usage and massive concurrency.

Free Open Source Go
Install GitHub

Quick Start

# Basic test: 1,000 connections for 1 minute
$ wink-rtsp-bench --url rtsp://server:554/stream --readers 1000 --duration 1m
# Stress test: 10,000 connections over TCP
$ wink-rtsp-bench --url rtsp://server:554/stream --readers 10000 --rate 500/s --transport tcp
# Real-world simulation: variable load with bad clients
$ wink-rtsp-bench --url rtsp://server:554/stream --real-world --avg-connections 5000 --hours 24

Sample Output

╔══════════════════════════════════════════════════════════════╗ ║ WINK Streaming RTSP Benchmark Tool v1.0.0 ║ ╚══════════════════════════════════════════════════════════════╝ Configuration: Target URL: rtsp://stream.example.com:554/live Concurrent Readers: 10000 Connection Rate: 500.00/sec Transport: TCP [14:23:05] Active: 1000 | Connects: 1000 (+200.0/s) | Failures: 0 | RTP Packets: 125420 | Loss: 0 [14:23:10] Active: 2500 | Connects: 2500 (+300.0/s) | Failures: 2 | RTP Packets: 523180 | Loss: 3 [14:23:15] Active: 4200 | Connects: 4200 (+340.0/s) | Failures: 5 | RTP Packets: 1245630 | Loss: 12 ════════════════════════════════════════════════════════════════ BENCHMARK COMPLETE ──────────────────────────────────────────────────────────────── Duration: 5m0.234s Total Connects: 10000 Success Rate: 99.77% RTP Packets: 45,234,521 RTP Loss: 234 (0.0005%)

Features

10,000+ Connections Go goroutines for massive scale
TCP & UDP Interleaved or unicast transport
Packet Loss Tracking Real RTP sequence analysis
Ramp-Up Testing Configurable connection rate
Real-World Mode Variable load simulation
Bad Client Simulation Test with misbehaving clients
JSON Output Machine-readable results
Multi-IP Support Break the 64k port limit

Command Line Options

Flag Default Description
--url localhost RTSP URL to test
--readers 1000 Number of concurrent connections
--duration 5m How long each connection stays active
--rate 600/m Connection rate (e.g., 500/s, 1000/m)
--transport tcp Transport protocol (tcp or udp)
--real-world false Enable variable load simulation
--avg-connections 500 Average connections for real-world mode
--include-bad-clients false Include misbehaving clients
--log text Output format (text or json)

Installation

Requires Go 1.21 or later

Install via Go
$ go install github.com/winkmichael/wink-rtsp-bench/cmd/wink-rtsp-bench@latest
Build from Source
$ git clone https://github.com/winkmichael/wink-rtsp-bench.git
$ cd wink-rtsp-bench
$ go build -o wink-rtsp-bench ./cmd/wink-rtsp-bench

For tests exceeding 10,000 connections, see the system tuning guide in the repository.

Frequently Asked Questions

How many connections can it handle?

Tested up to 10,000 on an 8-core system. With proper tuning and multiple source IPs, you can achieve 100,000+ connections. See the multi-IP guide in the repository for scaling beyond 64k.

Why Go instead of other languages?

Go's goroutines use only ~2KB of stack memory vs 1MB+ for OS threads. This allows spawning 100,000+ concurrent connections without complex thread pool management.

Does it decode video?

No. It establishes RTSP sessions and tracks RTP packets at the protocol level. This means minimal CPU usage and no codec dependencies.

What is "real-world mode"?

It simulates realistic usage patterns with variable load throughout the day, connection churn, and optionally misbehaving clients. Better for finding memory leaks and resource exhaustion over long runs.

Why am I getting "too many open files"?

The default file descriptor limit is 1024. Run ulimit -n 1048576 to increase it. For permanent changes, see the system tuning guide.

Can I test my server's actual capacity?

Yes, but remember bandwidth math: 1,000 connections at 6 Mbps each = 6 Gbps. Use realistic bitrates and monitor your network, not just connection counts.

Questions or issues? support@wink.co

Apache License 2.0