Skip to main content

static_web

Static web server

Static web server latency​

Serving smaller (1-64 KiB) and larger (256-512 KiB) files using a static HTTPHTTP: Hypertext Transfer ProtocolThe request-response protocol of the web, in which a client asks a server for a resource by URL and gets back a status code, headers, and a body. HTTPS is HTTP over an encrypted connection.MDNGlossary server (binservebinserveAn open-source static web server written in Rust, distributed as a single binary and configured with one JSON file. It maps URL routes to files and directories, can keep files cached in memory, and can also serve encrypted connections and list directory contents.binserve on GitHubGlossary) as a single process, and benchmarking each workload (wrkwrkAn open-source HTTP benchmarking tool written in C. It generates load from a few threads, each handling many open connections through an event loop, and reports latency and requests-per-second statistics. Lua scripts can customize the requests it sends and process the responses.wrk on GitHubGlossary) using variable number of threads (and keeping the threads with the maximum performance) and connections (recorded after divided by the number of vCPUsvCPU: virtual CPUA CPU of a virtual machine, the unit in which cloud vendors sell compute. It is usually one hardware thread of a physical core with SMT, so two vCPUs may share one physical core.WikipediaGlossary to make it comparable with other servers with different vCPU count) on the same server. The average latency reported by wrk.

Benchmark details

Benchmark ID
static_web:latency
Unit of measurement
Seconds (sec)
Server types evaluated
3,655
Total measurements
102,340
Range of measurements
0.00000674 – 0.224 sec
Better
↓ Lower is better

Configuration options

FieldDescriptionExample values
sizeServed file size (KiB).16k 1k 256k 512k 64k
connections_per_vcpusOpen HTTP connections per vCPU(s).0.5 0.8888888888888888 1 1.7777777777777777 2 3.5555555555555554 4 7.111111111111111 8 14.222222222222221 16 28.444444444444443 32
warning

Latency is recorded during the static_web:rps run, not as a standalone benchmark. As it reflects a characteristic of that throughput measurement, it is not recommended for comparing instances on its own; use it instead as a filter when interpreting the related throughput scores.

Score distribution (102,340 measurements)

Score distribution of Static web server latency

Static web server+client speed​

Serving smaller (1-64 KiB) and larger (256-512 KiB) files using a static HTTP server (binserve) as a single process, and benchmarking each workload (wrk) using variable number of threads (and keeping the threads with the maximum performance) and connections (recorded after divided by the number of vCPUs to make it comparable with other servers with different vCPU count) on the same server. The measured RPS is not the maximum expected server speed, as the server shares CPUCPU: Central Processing UnitThe general-purpose processor of a computer, which runs the operating system and programs. A CPU has one or more physical cores, and with SMT each core runs two or more hardware threads.WikipediaGlossary with the client.

Benchmark details

Benchmark ID
static_web:rps
Unit of measurement
Requests per second (rps)
Server types evaluated
3,655
Total measurements
102,340
Range of measurements
342 – 10M rps
Better
↑ Higher is better

Configuration options

FieldDescriptionExample values
sizeServed file size (KiB).16k 1k 256k 512k 64k
connections_per_vcpusOpen HTTP connections per vCPU(s).0.5 0.8888888888888888 1 1.7777777777777777 2 3.5555555555555554 4 7.111111111111111 8 14.222222222222221 16 28.444444444444443 32
warning

This benchmark does not scale well on large instances (100+ vCPUs) due to a listener bottleneck in the single-process HTTP server.

Score distribution (102,340 measurements)

Score distribution of Static web server+client speed

Static web server (extrapolated) speed​

Serving smaller (1-64 KiB) and larger (256-512 KiB) files using a static HTTP server (binserve) as a single process, and benchmarking each workload (wrk) using variable number of threads (and keeping the threads with the maximum performance) and connections (recorded after divided by the number of vCPUs to make it comparable with other servers with different vCPU count) on the same server. The extrapolated RPS is based on the measured RPS adjusted by the server's and client's time spent executing in user/system mode, so trying to control for the client resource usage.

Benchmark details

Benchmark ID
static_web:rps-extrapolated
Unit of measurement
Requests per second (rps)
Server types evaluated
3,655
Total measurements
102,340
Range of measurements
603.9 – 20.1M rps
Better
↑ Higher is better

Derived from static_web:rps: Measured RPS adjusted by server/client user+system CPU time to control for client resource usage.

Configuration options

FieldDescriptionExample values
sizeServed file size (KiB).16k 1k 256k 512k 64k
connections_per_vcpusOpen HTTP connections per vCPU(s).0.5 0.8888888888888888 1 1.7777777777777777 2 3.5555555555555554 4 7.111111111111111 8 14.222222222222221 16 28.444444444444443 32
warning

This benchmark does not scale well on large instances (100+ vCPUs) due to a listener bottleneck in the single-process HTTP server.

Score distribution (102,340 measurements)

Score distribution of Static web server (extrapolated) speed

Static web server+client throughput​

Serving smaller (1-64 KiB) and larger (256-512 KiB) files using a static HTTP server (binserve) as a single process, and benchmarking each workload (wrk) using variable number of threads (and keeping the threads with the maximum performance) and connections (recorded after divided by the number of vCPUs to make it comparable with other servers with different vCPU count) on the same server. Throughput is calculated by multiplying the RPS with the served file size. The measured RPS is not the maximum expected server speed, as the server shares CPU with the client.

Benchmark details

Benchmark ID
static_web:throughput
Unit of measurement
Bytes per second (Bps)
Server types evaluated
3,655
Total measurements
102,340
Range of measurements
4.6M – 475.8G Bps
Better
↑ Higher is better

Configuration options

FieldDescriptionExample values
sizeServed file size (KiB).16k 1k 256k 512k 64k
connections_per_vcpusOpen HTTP connections per vCPU(s).0.5 0.8888888888888888 1 1.7777777777777777 2 3.5555555555555554 4 7.111111111111111 8 14.222222222222221 16 28.444444444444443 32
warning

This benchmark does not scale well on large instances (100+ vCPUs) due to a listener bottleneck in the single-process HTTP server.

Score distribution (102,340 measurements)

Score distribution of Static web server+client throughput

Static web server (extrapolated) throughput​

Serving smaller (1-64 KiB) and larger (256-512 KiB) files using a static HTTP server (binserve) as a single process, and benchmarking each workload (wrk) using variable number of threads (and keeping the threads with the maximum performance) and connections (recorded after divided by the number of vCPUs to make it comparable with other servers with different vCPU count) on the same server. Extrapolated throughput is calculated by multiplying the extrapolated RPS with the served file size. The extrapolated RPS is based on the measured RPS adjusted by the server's and client's time spent executing in user/system mode, so trying to control for the client resource usage.

Benchmark details

Benchmark ID
static_web:throughput-extrapolated
Unit of measurement
Bytes per second (Bps)
Server types evaluated
3,655
Total measurements
102,340
Range of measurements
10M – 1T Bps
Better
↑ Higher is better

Derived from static_web:throughput: Measured throughput adjusted by server/client user+system CPU time to control for client resource usage.

Configuration options

FieldDescriptionExample values
sizeServed file size (KiB).16k 1k 256k 512k 64k
connections_per_vcpusOpen HTTP connections per vCPU(s).0.5 0.8888888888888888 1 1.7777777777777777 2 3.5555555555555554 4 7.111111111111111 8 14.222222222222221 16 28.444444444444443 32
warning

This benchmark does not scale well on large instances (100+ vCPUs) due to a listener bottleneck in the single-process HTTP server.

Score distribution (102,340 measurements)

Score distribution of Static web server (extrapolated) throughput