Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

HTTP Server Performance Lab

A high-performance benchmarking framework for evaluating HTTP server implementations under realistic workloads. The project focuses on measuring throughput, latency, scalability, resource utilization, and concurrency across different HTTP servers and frameworks.

This repository is designed for backend developers, systems engineers, and performance engineers who want to analyze and optimize HTTP server performance.


Features

  • HTTP GET, POST, PUT, DELETE, and PATCH benchmarking
  • Configurable concurrent connections
  • Configurable request rate
  • Latency distribution analysis
  • Throughput measurement (Requests/sec)
  • Error rate analysis
  • CPU utilization monitoring
  • Memory utilization monitoring
  • Multi-threaded load generation
  • JSON, CSV, and HTML report generation
  • Benchmark comparison between multiple server implementations

Performance Metrics

The framework measures:

  • Requests per Second (RPS)
  • Average Latency
  • Median Latency
  • P95 Latency
  • P99 Latency
  • Maximum Latency
  • Success Rate
  • Error Rate
  • CPU Usage
  • Memory Usage
  • Network Throughput
  • Connection Time
  • Time to First Byte (TTFB)

Benchmark Scenarios

  • Single Client
  • Multi-Client
  • Constant Load
  • Burst Traffic
  • High Concurrency
  • Long Duration Stress Test
  • Large Payload Transfer
  • Small Payload Transfer
  • Keep-Alive Connections
  • HTTP/1.1
  • HTTP/2 (Planned)

Supported Server Implementations

Examples include:

  • Go net/http
  • fasthttp
  • Fiber
  • Gin
  • Chi
  • Echo

Additional implementations in C++, Rust, Java, or other languages can also be benchmarked.


Example Benchmark Output

Target Server: localhost:8080

Duration:          60 seconds
Concurrent Users:  500

Requests/sec:      154,238
Average Latency:   4.21 ms
P95 Latency:       8.74 ms
P99 Latency:       13.02 ms
Success Rate:      99.98%
CPU Usage:         71%
Memory Usage:      326 MB

Project Structure

HTTP-Server-Performance-Lab/

├── cmd/
├── internal/
│   ├── benchmark/
│   ├── metrics/
│   ├── loadgen/
│   ├── report/
│   └── utils/
├── configs/
├── examples/
├── reports/
├── docs/
├── scripts/
└── tests/

Roadmap

Phase 1

  • Basic HTTP benchmarking
  • Concurrent request generation
  • Performance metrics collection

Phase 2

  • Advanced latency analysis
  • Resource monitoring
  • CSV and JSON reports

Phase 3

  • Interactive HTML dashboard
  • HTTP/2 support
  • HTTPS benchmarking
  • WebSocket benchmarking

Phase 4

  • Distributed load generation
  • Multi-machine benchmarking
  • Automated comparison reports
  • Historical benchmark tracking

Tech Stack

  • Go
  • Linux
  • HTTP
  • TCP/IP
  • Goroutines
  • Performance Profiling
  • Benchmarking
  • JSON
  • CSV

Target Users

  • Performance Engineers
  • Backend Engineers
  • Systems Engineers
  • Infrastructure Engineers
  • Platform Engineers
  • Site Reliability Engineers (SRE)
  • Open Source Contributors

Future Enhancements

  • Real-time dashboard
  • Prometheus metrics
  • Grafana integration
  • Flamegraph support
  • Docker benchmarking
  • Kubernetes benchmarking
  • Automated regression detection
  • CI performance testing

Contributing

Contributions are welcome. Feel free to open issues, submit pull requests, or suggest new benchmarking scenarios and performance metrics.


License

This project is licensed under the MIT License.

About

High-performance HTTP server benchmarking framework for evaluating throughput, latency, concurrency, CPU utilization, memory usage, and scalability across different HTTP server implementations.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors