raptor 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Dockerfile +2 -0
- data/README.md +19 -20
- data/docs/brisrails-talk.md +2358 -0
- data/docs/raptor-vs-puma.md +3 -1
- data/lib/raptor/cluster.rb +3 -3
- data/lib/raptor/http1.rb +4 -4
- data/lib/raptor/http2.rb +17 -18
- data/lib/raptor/reactor.rb +2 -2
- data/lib/raptor/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90014b6262f682d50ed48e31fea60c483aeb217fa28f758bcef6eeada39baf98
|
|
4
|
+
data.tar.gz: 37b4e90995cc4e76319318f14a6c1d73a6d1ab841c97f25c5b0543ef07f52c87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba970eef596750d5e2cc885018bc6d981edb0ef1479dfade73d66264e54693f513e52e5ec4a630f198b1ba241f121ca976588717b9c15e34360198a8c8bbcb75
|
|
7
|
+
data.tar.gz: 6aa65a255c612c094b568b252c8f5ac42debabf92e72896a341fd0ac5031960e56255774c750bdafa2e6658261dc2e3104dc0a546e839d99ce1be773d42cd26e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.14.0] - 2026-08-09
|
|
4
|
+
|
|
5
|
+
- Cap eager HTTP/2 frame consumption at thread pool saturation
|
|
6
|
+
- Bundle HTTP/2 frame writes into a single socket write
|
|
7
|
+
|
|
3
8
|
## [0.13.0] - 2026-07-21
|
|
4
9
|
|
|
5
10
|
- Tune BPF reuseport routing to spread bursts across near-idle workers
|
data/Dockerfile
CHANGED
|
@@ -18,6 +18,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
18
18
|
&& rm -rf /var/lib/apt/lists/*
|
|
19
19
|
|
|
20
20
|
COPY --from=hey-builder /go/bin/hey /usr/local/bin/hey
|
|
21
|
+
COPY --from=hey-builder /usr/local/go /usr/local/go
|
|
22
|
+
ENV PATH=/usr/local/go/bin:${PATH}
|
|
21
23
|
|
|
22
24
|
ENV BUNDLE_PATH=/workspace/.bundle
|
|
23
25
|
ENV BUNDLE_APP_CONFIG=/workspace/.bundle
|
data/README.md
CHANGED
|
@@ -37,7 +37,7 @@ run proc { |_env| [200, { "content-type" => "text/plain" }, ["Hello, World!"]] }
|
|
|
37
37
|
```
|
|
38
38
|
> bundle exec raptor -w 4 -t 3 hello_world.ru
|
|
39
39
|
[Raptor 59013|Main|Main] Cluster initializing:
|
|
40
|
-
[Raptor 59013|Main|Main] ├─ Version: 0.
|
|
40
|
+
[Raptor 59013|Main|Main] ├─ Version: 0.14.0
|
|
41
41
|
[Raptor 59013|Main|Main] ├─ Ruby Version: ruby 4.0.5 (2026-05-20 revision 64336ffd0e) +YJIT +PRISM [arm64-darwin23]
|
|
42
42
|
[Raptor 59013|Main|Main] ├─ Environment: development
|
|
43
43
|
[Raptor 59013|Main|Main] ├─ Master PID: 59013
|
|
@@ -193,29 +193,28 @@ Worker 1 (phase 0): pid=91351, requests=1199, busy=1/3, backlog=0, booted, last_
|
|
|
193
193
|
|
|
194
194
|
## (Micro) Benchmarks
|
|
195
195
|
|
|
196
|
-
Raptor 0.
|
|
197
|
-
interleaves 5-10 short sleeps (total 2.5-15ms) with small CPU work, simulating a read path that makes
|
|
198
|
-
cache calls. **CPU-bound** is a POST endpoint that accepts a small JSON body, interleaves 3-5 chunks of
|
|
199
|
-
building (total 450-1500 items) with sub-100µs sleeps, and returns the built array, simulating a write path
|
|
200
|
-
most of its work in Ruby with a few near-zero-cost cache hits.
|
|
196
|
+
Raptor 0.14.0 vs Puma 8.0.2 vs PumaPlus 0.1.0 vs Falcon 0.57.0 across two workload profiles. **IO-bound** is a GET
|
|
197
|
+
endpoint that interleaves 5-10 short sleeps (total 2.5-15ms) with small CPU work, simulating a read path that makes
|
|
198
|
+
several DB or cache calls. **CPU-bound** is a POST endpoint that accepts a small JSON body, interleaves 3-5 chunks of
|
|
199
|
+
JSON item building (total 450-1500 items) with sub-100µs sleeps, and returns the built array, simulating a write path
|
|
200
|
+
that does most of its work in Ruby with a few near-zero-cost cache hits.
|
|
201
201
|
|
|
202
202
|
Each cell reports the median throughput and median p95 latency independently across 5 runs, so the two numbers in a row
|
|
203
203
|
may come from different runs. Every run starts a fresh server process so the samples are independent of each other;
|
|
204
204
|
state accumulated in a previous run cannot bias the next. Across the whole table, the widest spread
|
|
205
|
-
((max - min) / 2 / median) between runs of a single cell was ±
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
|
209
|
-
|
|
|
210
|
-
| HTTP/1.1 |
|
|
211
|
-
| HTTP/1.1
|
|
212
|
-
| HTTP/1.1 (keep-alive) |
|
|
213
|
-
| HTTP/
|
|
214
|
-
| HTTP/2 |
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
>
|
|
218
|
-
> 4 worker processes; Raptor and Puma run 3 threads per worker, Falcon runs unbounded fibers per worker;
|
|
205
|
+
((max - min) / 2 / median) between runs of a single cell was ±35.4% for throughput and ±95.1% for p95.
|
|
206
|
+
|
|
207
|
+
| Protocol | Workload | Raptor req/s | Raptor p95 | Puma req/s | Puma p95 | vs Puma req/s | vs Puma p95 | PumaPlus req/s | PumaPlus p95 | vs PumaPlus req/s | vs PumaPlus p95 | Falcon req/s | Falcon p95 | vs Falcon req/s | vs Falcon p95 |
|
|
208
|
+
| --------------------- | -------- | ------------ | ---------- | ----------- | --------- | ------------- | ----------- | -------------- | ------------ | ----------------- | --------------- | ------------ | ---------- | --------------- | ------------- |
|
|
209
|
+
| HTTP/1.1 | IO | 1.33k req/s | 52.20 ms | 0.48k req/s | 140.60 ms | 175.8% higher | 62.9% lower | 0.48k req/s | 122.30 ms | 177.0% higher | 57.3% lower | 3.41k req/s | 21.50 ms | 60.9% lower | 142.8% higher |
|
|
210
|
+
| HTTP/1.1 | CPU | 3.93k req/s | 20.80 ms | 1.74k req/s | 39.60 ms | 125.6% higher | 47.5% lower | 2.32k req/s | 27.60 ms | 69.2% higher | 24.6% lower | 3.60k req/s | 16.40 ms | 9.3% higher | 26.8% higher |
|
|
211
|
+
| HTTP/1.1 (keep-alive) | IO | 1.31k req/s | 46.00 ms | 0.46k req/s | 133.80 ms | 183.3% higher | 65.6% lower | 0.46k req/s | 128.20 ms | 186.0% higher | 64.1% lower | 2.06k req/s | 35.40 ms | 36.5% lower | 29.9% higher |
|
|
212
|
+
| HTTP/1.1 (keep-alive) | CPU | 3.48k req/s | 21.50 ms | 1.73k req/s | 41.00 ms | 101.5% higher | 47.6% lower | 2.09k req/s | 30.40 ms | 66.0% higher | 29.3% lower | 3.74k req/s | 17.70 ms | 7.0% lower | 21.5% higher |
|
|
213
|
+
| HTTP/2 | IO | 0.47k req/s | 161.47 ms | N/A | N/A | - | - | 0.52k req/s | 113.14 ms | 8.1% lower | 42.7% higher | 2.12k req/s | 34.10 ms | 77.6% lower | 373.6% higher |
|
|
214
|
+
| HTTP/2 | CPU | 2.09k req/s | 40.26 ms | N/A | N/A | - | - | 2.23k req/s | 29.19 ms | 5.9% lower | 37.9% higher | 2.85k req/s | 36.93 ms | 26.4% lower | 9.0% higher |
|
|
215
|
+
|
|
216
|
+
> ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +YJIT +PRISM [aarch64-linux]
|
|
217
|
+
> 4 worker processes; Raptor, Puma, and PumaPlus run 3 threads per worker, Falcon runs unbounded fibers per worker;
|
|
219
218
|
> 48 concurrent HTTP/1.1 client connections; 16 concurrent HTTP/2 client connections × 3 streams each
|
|
220
219
|
|
|
221
220
|
See [bin/benchmark](bin/benchmark) for more details.
|