gitmyhub

web-frameworks

PHP ★ 7.1k updated 1d ago

Which is the fastest web framework?

A benchmark suite that measures how many HTTP requests per second popular web frameworks can handle across many programming languages, giving developers a performance data point when choosing a stack.

RubyDockerPostgreSQLPHPwrksetup: hardcomplexity 3/5

This repository measures and compares the performance of web frameworks across many programming languages. The central question it tries to answer is which framework can handle the most HTTP requests per second under a standard workload. The results give developers a data point when choosing which language and framework to use for a new server-side project.

The approach is to run each framework inside its own Docker container so every framework is tested in the same kind of isolated environment. A tool called wrk generates HTTP load against each container, and the resulting numbers (requests per second, latency, and similar figures) get stored in a PostgreSQL database for consistent record-keeping and later comparison.

Getting the benchmark running locally requires a few dependencies: Ruby (because the benchmarking scripts are written in Ruby), wrk itself, Docker, PostgreSQL, and jq for processing Docker metadata. On macOS, docker-machine is also needed to allow Docker usage for each framework. Once the dependencies are in place, a bundle install and rake config call set things up, and individual frameworks can be built and tested by pointing make at the framework's own Makefile inside its subdirectory.

Each framework in the collection, such as PHP's Lumen, lives in its own folder and includes the Makefile targets needed to build its container and run the benchmarks against it. The repository covers a range of languages and frameworks, and a contributing guide describes how to add a new one.

Published results are available at the project's benchmark website rather than in the README itself, so checking the external site is the quickest way to see which framework leads current rankings.

Where it fits