raptor 0.13.0 → 0.15.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7a531c4a4d9cfe93de0c4e8d255d9eac6a09d59f9af6d3884231cd0a383aca5
4
- data.tar.gz: 3155fd5b27d53b5a65a9be9cc36d139da801ad3ce33a188ea9a46c77289ee97e
3
+ metadata.gz: 064ae83daf94da7f8f08e7e8ec641da9d340980d7b79b74f5135a0cb6bbba420
4
+ data.tar.gz: a672546792de83d7567980cd37eb10d123a528b20c741ea03c9edd599e59dd92
5
5
  SHA512:
6
- metadata.gz: 53bfe180b9db4a6d9f7fdb3ea2f11bf2f19b5fa81c54beb09e74caa189381a52587756c6acae9b18ce16a5500a278a0b737934bc9b5e129fe3002605ee2ac5c1
7
- data.tar.gz: a235a90619e1a8c1935208d1c516280bf911335e075bc6e91d5be78d134c5cc385381dba899328ebc2f8da213753d31618f5328e5eec8d609a06cfb1c30b5cb8
6
+ metadata.gz: 558d707115b817ab6312c0c2b9ea118953b30a642d7d2b6fc7dffd8544fc3cf85b5add06eb97f4db837568cb67fca32f833a729adc89c9d62af2b2194243125f
7
+ data.tar.gz: a6a82af2ad505fd6c452f957b126c58522848163e80df0b6b856054c345837f4c46ce458370670c1a62f33255cfcd24c21df77bb0e556cd4c6f6d53485b95bfb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.15.0] - 2026-08-16
4
+
5
+ - Yield between accepts when the thread pool queue exceeds the pool size
6
+ - Default the worker count to the cgroup-aware available processor count
7
+
8
+ ## [0.14.0] - 2026-08-09
9
+
10
+ - Cap eager HTTP/2 frame consumption at thread pool saturation
11
+ - Bundle HTTP/2 frame writes into a single socket write
12
+
3
13
  ## [0.13.0] - 2026-07-21
4
14
 
5
15
  - 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
@@ -36,23 +36,23 @@ run proc { |_env| [200, { "content-type" => "text/plain" }, ["Hello, World!"]] }
36
36
 
37
37
  ```
38
38
  > bundle exec raptor -w 4 -t 3 hello_world.ru
39
- [Raptor 59013|Main|Main] Cluster initializing:
40
- [Raptor 59013|Main|Main] ├─ Version: 0.13.0
41
- [Raptor 59013|Main|Main] ├─ Ruby Version: ruby 4.0.5 (2026-05-20 revision 64336ffd0e) +YJIT +PRISM [arm64-darwin23]
42
- [Raptor 59013|Main|Main] ├─ Environment: development
43
- [Raptor 59013|Main|Main] ├─ Master PID: 59013
44
- [Raptor 59013|Main|Main] │ └─ 4 worker processes
45
- [Raptor 59013|Main|Main] │ ├─ 1 server thread
46
- [Raptor 59013|Main|Main] │ ├─ 1 reactor thread
47
- [Raptor 59013|Main|Main] │ ├─ 1 pipeline ractor
48
- [Raptor 59013|Main|Main] │ ├─ 1 pipeline collector thread
49
- [Raptor 59013|Main|Main] │ ├─ 3 worker threads
50
- [Raptor 59013|Main|Main] │ └─ 1 stats thread
51
- [Raptor 59013|Main|Main] └─ Listening on 0.0.0.0:9292
52
- [Raptor 59023|Main|Main] Worker 0 booted
53
- [Raptor 59024|Main|Main] Worker 1 booted
54
- [Raptor 59025|Main|Main] Worker 2 booted
55
- [Raptor 59026|Main|Main] Worker 3 booted
39
+ [Raptor 33061|Main|Main] Cluster initializing:
40
+ [Raptor 33061|Main|Main] ├─ Version: 0.15.0
41
+ [Raptor 33061|Main|Main] ├─ Ruby Version: ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +YJIT +PRISM [arm64-darwin23]
42
+ [Raptor 33061|Main|Main] ├─ Environment: development
43
+ [Raptor 33061|Main|Main] ├─ Master PID: 33061
44
+ [Raptor 33061|Main|Main] │ └─ 4 worker processes
45
+ [Raptor 33061|Main|Main] │ ├─ 1 server thread
46
+ [Raptor 33061|Main|Main] │ ├─ 1 reactor thread
47
+ [Raptor 33061|Main|Main] │ ├─ 1 pipeline ractor
48
+ [Raptor 33061|Main|Main] │ ├─ 1 pipeline collector thread
49
+ [Raptor 33061|Main|Main] │ ├─ 3 worker threads
50
+ [Raptor 33061|Main|Main] │ └─ 1 stats thread
51
+ [Raptor 33061|Main|Main] └─ Listening on 0.0.0.0:9292
52
+ [Raptor 33064|Main|Main] Worker 0 booted
53
+ [Raptor 33065|Main|Main] Worker 1 booted
54
+ [Raptor 33066|Main|Main] Worker 2 booted
55
+ [Raptor 33067|Main|Main] Worker 3 booted
56
56
  ```
57
57
 
58
58
  ```
@@ -193,30 +193,29 @@ 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.13.0 vs Puma 8.0.2 vs Falcon 0.55.5 across two workload profiles. **IO-bound** is a GET endpoint that
197
- interleaves 5-10 short sleeps (total 2.5-15ms) with small CPU work, simulating a read path that makes several DB or
198
- cache calls. **CPU-bound** is a POST endpoint that accepts a small JSON body, interleaves 3-5 chunks of JSON item
199
- building (total 450-1500 items) with sub-100µs sleeps, and returns the built array, simulating a write path that does
200
- most of its work in Ruby with a few near-zero-cost cache hits.
196
+ Raptor 0.15.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 ±30.0% for throughput
206
- and ±22.8% for p95.
207
-
208
- | Protocol | Workload | Raptor req/s | Raptor p95 | Puma req/s | Puma p95 | vs Puma req/s | vs Puma p95 | Falcon req/s | Falcon p95 | vs Falcon req/s | vs Falcon p95 |
209
- | --------------------- | -------- | ------------ | ---------- | ----------- | -------- | ------------- | ----------- | ------------ | ---------- | --------------- | ------------- |
210
- | HTTP/1.1 | IO | 1.39k req/s | 50.20 ms | 0.96k req/s | 66.20 ms | 44.1% higher | 24.2% lower | 4.54k req/s | 15.00 ms | 69.4% lower | 234.7% higher |
211
- | HTTP/1.1 | CPU | 4.55k req/s | 18.10 ms | 3.64k req/s | 16.50 ms | 24.9% higher | 9.7% higher | 3.87k req/s | 15.00 ms | 17.5% higher | 20.7% higher |
212
- | HTTP/1.1 (keep-alive) | IO | 1.42k req/s | 30.00 ms | 0.92k req/s | 65.80 ms | 54.8% higher | 54.4% lower | 4.08k req/s | 16.70 ms | 65.3% lower | 79.6% higher |
213
- | HTTP/1.1 (keep-alive) | CPU | 4.51k req/s | 11.20 ms | 3.77k req/s | 17.50 ms | 19.8% higher | 36.0% lower | 4.00k req/s | 16.50 ms | 12.9% higher | 32.1% lower |
214
- | HTTP/2 | IO | 0.71k req/s | 85.84 ms | N/A | N/A | - | - | 3.88k req/s | 17.43 ms | 81.7% lower | 392.3% higher |
215
- | HTTP/2 | CPU | 4.07k req/s | 21.85 ms | N/A | N/A | - | - | 4.33k req/s | 30.84 ms | 6.0% lower | 29.2% lower |
216
-
217
- > ruby 4.0.5 (2026-05-20 revision 64336ffd0e) +YJIT +PRISM [aarch64-linux]
218
- > 4 worker processes; Raptor and Puma run 3 threads per worker, Falcon runs unbounded fibers per worker;
219
- > 48 concurrent HTTP/1.1 client connections; 16 concurrent HTTP/2 client connections × 3 streams each
205
+ ((max - min) / 2 / median) between runs of a single cell was ±29.5% for throughput and ±42.2% 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 | 3.28k req/s | 59.90 ms | 1.44k req/s | 132.20 ms | 127.7% higher | 54.7% lower | 1.55k req/s | 91.30 ms | 111.3% higher | 34.4% lower | 12.50k req/s | 13.80 ms | 73.7% lower | 334.1% higher |
210
+ | HTTP/1.1 | CPU | 8.49k req/s | 32.40 ms | 9.08k req/s | 19.40 ms | 6.5% lower | 67.0% higher | 8.79k req/s | 17.40 ms | 3.4% lower | 86.2% higher | 6.89k req/s | 25.50 ms | 23.2% higher | 27.1% higher |
211
+ | HTTP/1.1 (keep-alive) | IO | 2.08k req/s | 54.60 ms | 1.40k req/s | 112.80 ms | 48.0% higher | 51.6% lower | 1.53k req/s | 91.10 ms | 35.8% higher | 40.1% lower | 6.17k req/s | 28.70 ms | 66.3% lower | 90.2% higher |
212
+ | HTTP/1.1 (keep-alive) | CPU | 9.04k req/s | 17.40 ms | 8.92k req/s | 21.30 ms | 1.3% higher | 18.3% lower | 9.04k req/s | 17.00 ms | 0.1% higher | 2.4% higher | 7.32k req/s | 29.90 ms | 23.5% higher | 41.8% lower |
213
+ | HTTP/2 | IO | 0.97k req/s | 201.32 ms | N/A | N/A | - | - | 1.49k req/s | 92.51 ms | 35.0% lower | 117.6% higher | 6.61k req/s | 27.95 ms | 85.4% lower | 620.4% higher |
214
+ | HTTP/2 | CPU | 5.42k req/s | 35.22 ms | N/A | N/A | - | - | 8.61k req/s | 18.18 ms | 37.0% lower | 93.8% higher | 7.32k req/s | 29.95 ms | 25.9% lower | 17.6% higher |
215
+
216
+ > ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +YJIT +PRISM [aarch64-linux]
217
+ > 10 worker processes; Raptor, Puma, and PumaPlus run 3 threads per worker, Falcon runs unbounded fibers per worker;
218
+ > 120 concurrent HTTP/1.1 client connections; 40 concurrent HTTP/2 client connections × 3 streams each
220
219
 
221
220
  See [bin/benchmark](bin/benchmark) for more details.
222
221