A comprehensive multi-phase server stress testing tool written in Python. Tests HTTP, HTTPS, TCP, and ICMP layers to identify your server's breaking point under concurrent load.
- 6-phase progressive load test — from baseline (20 conns) to maximum stress (2000 conns)
- Multi-protocol — HTTP, HTTPS, TCP, and ICMP ping floods
- Mix of methods — GET, POST, HEAD, OPTIONS requests with randomized paths and user agents
- Real-time stats — response times, success/failure rates, and status code distribution
- Health assessment — automatic grading from EXCELLENT to CRITICAL
- Failure analysis — breakdown of every error type with percentages
- Percentile reporting — P50, P95, P99 response times
- Python 3.8+
aiohttplibrary
pip install aiohttpOpen stress_test.py and change the DEFAULT_TARGET variable (line 23):
DEFAULT_TARGET = "your-server.com"Then run:
python stress_test.pypython stress_test.py your-server.com
python stress_test.py 192.168.1.1
python stress_test.py https://example.com/The tool automatically strips
https://,http://, and trailing slashes.
| Phase | Concurrency | Duration | Type |
|---|---|---|---|
| 1 — Baseline | 20 | 10s | HTTP + HTTPS |
| 2 — Medium | 100 | 15s | HTTP + HTTPS |
| 3 — Heavy | 500 | 15s | HTTP + HTTPS |
| 4 — TCP Flood | 200 per port | 10s | TCP (ports 22, 80, 443) |
| 5 — Ping Flood | 500 pings | — | ICMP |
| 6 — Maximum | 2000 | 20s | HTTP + HTTPS |
Total: ~21,000+ requests in under 2 minutes
| Grade | Failure Rate | Meaning |
|---|---|---|
| EXCELLENT | <1% | Server handles load perfectly |
| GOOD | <5% | Minor strain, acceptable |
| MODERATE | 5-15% | Server shows visible strain |
| WEAK | 15-30% | Server struggles significantly |
| CRITICAL | >30% | Server collapses under load |
- P50 (Median) — half of requests were faster than this
- P95 — 95% of requests completed within this time
- P99 — tail latency for slowest 1% of requests
- Std Dev — consistency of response times (lower = more stable)
[PHASE 1] BASELINE TEST (Light Load)
[STATS] HTTP Baseline (20 conns)
+-- Total Requests : 345
+-- Successes : 345 (100.0%)
+-- Failures : 0 (0.0%)
+-- Response Time:
| +-- Avg : 549.4 ms
| +-- Min : 94.0 ms
| +-- Max : 4219.0 ms
| +-- P50 : 250.0 ms
| +-- P95 : 1859.0 ms
| +-- P99 : 3828.0 ms
| +-- Std : 729.9 ms
+-- Status Codes : 403: 345
The domain does not resolve via your system DNS. Try:
- Use the server's direct IP instead of the domain
- Switch to a public DNS (e.g., Google
8.8.8.8or Cloudflare1.1.1.1) - The domain may be behind Cloudflare proxy — check with
nslookup
Normal — the server is behind nginx and rejecting unauthenticated paths. The tool measures response availability, not content validity. A 403 is still a successful server response.
Your server has a connection limit. Recommendations:
- Increase nginx
worker_connections - Enable
keepalive_timeoutandkeepalive_requests - Deploy a CDN (Cloudflare, Fastly)
- Upgrade VPS resources (CPU, RAM, network)
You can customize these values inside the script:
| Variable | Default | Description |
|---|---|---|
DEFAULT_TARGET |
"169.58.148.152" |
Target IP or domain |
PORTS |
{80, 443, 22} |
Ports to test |
PATHS |
8 common paths | URL paths to randomize |
METHODS |
GET, POST, HEAD, OPTIONS |
HTTP methods to randomize |
USER_AGENTS |
5 agents | User-Agent strings |
Adjust concurrency and duration values in each phase function call within main() to customize test intensity.
MIT