You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**static-web** (default config) |~50,000 |920 µs |3.20 ms |
147
147
148
-
With `preload = true` and `gc_percent = 400`, static-web beats Bun's native static serving by ~6% in throughput.
148
+
With `preload = true` and `gc_percent = 400`, static-web delivers ~76k req/sec — within 20% of Bun's native static serving, while offering full security headers, TLS, and compression out of the box.
Enable `preload` to read every eligible file into the in-memory cache at startup. Combined with GC tuning, this yields the highest possible throughput — up to **~137,000 req/sec** on Apple M2 Pro (beating Bun's native static serve).
605
+
Enable `preload` to read every eligible file into the in-memory cache at startup. Combined with GC tuning, this yields the highest possible throughput — up to **~76,000 req/sec** on Apple M-series (within 20% of Bun's native static serve, while including full security headers, TLS, and compression).
Copy file name to clipboardExpand all lines: docs/index.html
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
<title>static-web — High-Performance Go Static File Server</title>
7
7
<meta
8
8
name="description"
9
-
content="Production-grade, blazing-fast static web file server written in Go. 137k req/sec with preload — beats Bun. In-memory LRU cache, HTTP/2, TLS 1.2+, gzip/brotli, security headers — minimal dependency footprint."
9
+
content="Production-grade, blazing-fast static web file server written in Go. ~76k req/sec with preload and GC tuning. In-memory LRU cache, HTTP/2, TLS 1.2+, gzip/brotli, security headers — minimal dependency footprint."
10
10
/>
11
11
<meta
12
12
name="keywords"
@@ -20,7 +20,7 @@
20
20
<metaproperty="og:title" content="static-web — High-Performance Go Static File Server" />
21
21
<meta
22
22
property="og:description"
23
-
content="Production-grade static web file server in Go. 137k req/sec with preload — faster than Bun. HTTP/2, TLS 1.2+, gzip/brotli, security hardened."
23
+
content="Production-grade static web file server in Go. ~76k req/sec with preload and GC tuning. HTTP/2, TLS 1.2+, gzip/brotli, security hardened."
"description": "A production-grade, blazing-fast static web file server written in Go. 137k req/sec with startup preloading — faster than Bun. Features in-memory LRU cache, TTL-aware cache expiry, HTTP/2, TLS 1.2+, gzip and brotli compression, and comprehensive security headers.",
83
+
"description": "A production-grade, blazing-fast static web file server written in Go. ~76k req/sec with startup preloading and GC tuning. Features in-memory LRU cache, TTL-aware cache expiry, HTTP/2, TLS 1.2+, gzip and brotli compression, and comprehensive security headers.",
84
84
"author": {
85
85
"@type": "Person",
86
86
"name": "Rolando Santamaria Maso",
@@ -92,7 +92,7 @@
92
92
"priceCurrency": "USD"
93
93
},
94
94
"featureList": [
95
-
"137k req/sec with startup preloading — faster than Bun",
95
+
"~76k req/sec with startup preloading and GC tuning",
96
96
"In-memory LRU cache with ~28 ns/op lookup",
97
97
"Startup preloading with path-safety cache pre-warming",
98
98
"TTL-aware cache expiry with optional automatic stale-entry eviction",
@@ -300,7 +300,7 @@ <h2 class="section-title" id="features-heading">Everything You Need</h2>
300
300
<divclass="feature-card">
301
301
<divclass="feature-icon">⚡</div>
302
302
<h3>Zero-Alloc Hot Path</h3>
303
-
<p><strong>137k req/sec</strong> with preload. Cache hits use direct <code>w.Write()</code> with pre-formatted headers — no <code>http.ServeContent</code>, no syscalls, zero allocations on the hot path.</p>
303
+
<p><strong>~76k req/sec</strong> with preload. Cache hits use direct <code>w.Write()</code> with pre-formatted headers — no <code>http.ServeContent</code>, no syscalls, zero allocations on the hot path.</p>
@@ -635,9 +635,9 @@ <h3>Preload & fast-path</h3>
635
635
</div>
636
636
<divclass="perf-card">
637
637
<divclass="perf-card-icon">🔤</div>
638
-
<h3>Beats Bun by ~6%</h3>
638
+
<h3>Competitive with Bun</h3>
639
639
<p>
640
-
With preload + GC tuning, <strong>static-web reaches 137k req/sec</strong> — outperforming <strong>Bun at 129k req/sec</strong> on the same workload.
640
+
With preload + GC tuning, <strong>static-web reaches ~76k req/sec</strong> — within 20% of <strong>Bun at ~90k req/sec</strong>, while offering full security headers, TLS, and compression out of the box.
0 commit comments