hyperion-rb 1.6.1 → 1.6.2
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 +7 -0
- data/README.md +23 -0
- data/lib/hyperion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a134460ea9e2ed0f20a2c063b643593f9198d5206f382f8669e332b68510c16d
|
|
4
|
+
data.tar.gz: c64216c7532fc4f3f2476459abc0e9df41473ae2774c9806a33a6c8186925ed6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5dcaf718cc108753c757e8e6b44cd2072e018e3c6133fc38f562285c45ab7b90f5be4819d64e5a9ea32de451622cb7b9597a16b053a0cee0c7f1a3b1fb85355
|
|
7
|
+
data.tar.gz: 0136f9605c114a90faae7169bef1027dc06f1d7ca520a8a38e4cf4d7ed5b8b9b9eda87ca86611c74e8033d9ede6ae74b0ab7ca768e8f2c6ebf042d30c1f0e783
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.2] - 2026-04-27
|
|
4
|
+
|
|
5
|
+
Doc release. No code changes.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **README "Production tuning (real Rails apps)" section** — distilled from a real-app bench against the Exodus platform (Rails 8.1, on-LAN PG + Redis at ~0.3 ms RTT, `-w 4 -t 10`, `wrk -t8 -c200 -d30s`). Headline: the simplest drop-in (`hyperion -t N -w M` matching Puma's existing `-t/-w`) is the right answer; `+9%` rps and `28×` lower p99 on health endpoints over the same Puma config, no other knobs needed. Documents which synthetic-bench knobs (`-t 30`, `--yjit`, larger `RAILS_POOL`, `--async-io`) DON'T help on real Rails and why (GVL contention past `-t 10`, dev-mode YJIT instability, pool rarely the bottleneck, sync Redis blocking ahead of async-pg yields). Saves operators from the trap of "tune harder = faster" — the simple drop-in IS the answer on real workloads.
|
|
9
|
+
|
|
3
10
|
## [1.6.1] - 2026-04-27
|
|
4
11
|
|
|
5
12
|
Audit follow-up from the [BENCH_2026_04_27.md](docs/BENCH_2026_04_27.md) sweep. No code-path changes; doc surface and operator-UX polish.
|
data/README.md
CHANGED
|
@@ -378,6 +378,29 @@ Tail latency tells the queueing story; rps tells the throughput story. Hyperion'
|
|
|
378
378
|
|
|
379
379
|
**Size capacity by p99, not by mean.** Throughput peaks are easy to fake under controlled bench conditions; tail latency reflects what your slowest user actually experiences when the load balancer fans them onto a busy worker.
|
|
380
380
|
|
|
381
|
+
### Production tuning (real Rails apps)
|
|
382
|
+
|
|
383
|
+
Distilled from a real-app bench against the [Exodus platform](https://github.com/andrew-woblavobla/hyperion/blob/master/docs/BENCH_2026_04_27.md) (Rails 8.1, on-LAN PG + Redis at ~0.3 ms RTT, `-w 4 -t 10`, `wrk -t8 -c200 -d30s`). The headline finding: the **simplest drop-in is the right answer**, and the additional knobs operators reach for first don't help on real Rails.
|
|
384
|
+
|
|
385
|
+
**Recommended for migrating from Puma**: `hyperion -t N -w M` matching your current Puma `-t N:N -w M`. No other flags. That gives you (vs Puma at the same `-t/-w`):
|
|
386
|
+
|
|
387
|
+
- **+9% rps on lightweight endpoints** (matches the 5-10% per-request CPU savings the rest of the bench section documents).
|
|
388
|
+
- **28× lower p99 on health-style endpoints** — the queue-of-doom shape Puma exhibits under sustained 200-conn load doesn't reproduce on Hyperion's worker-owns-connection model.
|
|
389
|
+
- **3.8× lower p99 on PG-touching endpoints**.
|
|
390
|
+
- **Same RSS, same operator surface** — you keep all your existing config, monitoring, and deploy scripts.
|
|
391
|
+
|
|
392
|
+
**Knobs that help on synthetic benches but NOT on real Rails — leave them off:**
|
|
393
|
+
|
|
394
|
+
| Knob | Synthetic bench result | Real Rails result | Recommendation |
|
|
395
|
+
|---|---|---|---|
|
|
396
|
+
| `-t 30` (more threads/worker) | Helped Hyperion 5-10% on hello-world | **Hurt** p99 vs `-t 10` on real Rails (3.51 s vs 148 ms on /up) — GVL + middleware Mutex contention dominates past `-t 10` | Stay at `-t 10`. Match Puma's recommended `RAILS_MAX_THREADS`. |
|
|
397
|
+
| `--yjit` | 5-10% on synthetic CPU-bound | Wash on dev-mode Rails (312 vs 328 rps, p99 worse with YJIT) | Skip for now. Production-mode Rails may behave differently — verify with your own bench before flipping. |
|
|
398
|
+
| `RAILS_POOL` > 25 | n/a | No improvement at pool=50 or pool=100 on real Rails (rps within 3%, p99 within noise). Pool starvation is rarely the bottleneck on a `-w 4 -t 10` config | Keep your existing AR pool size. |
|
|
399
|
+
| `--async-io` | 33-42× rps on PG-bound (with `hyperion-async-pg`) | **Worse** than drop-in on real Rails (4.14 s p99 on /up vs 148 ms drop-in) | **Don't enable** until your full I/O stack is fiber-cooperative. The synchronous Redis client (`redis-rb`) blocks the OS thread before async-pg can yield, so fibers can't compound. Migrate to `async-redis` *first*, then revisit. |
|
|
400
|
+
| `--async-io` + `hyperion-async-pg` AR adapter | Verified 48× rps lift on a single-PG-query bench | Marginal-or-negative on real Rails (similar reason: Redis-first handlers don't yield) | Same — wait for a full-async I/O stack. |
|
|
401
|
+
|
|
402
|
+
**Why the simple drop-in wins on real Rails:** the per-request budget on a real handler is dominated by the Rails middleware chain (rack-attack, locale redirect, tagger, etc.) + handler logic + DB + cache I/O. Hyperion's per-request CPU optimizations (C-ext header parser, response builder, lock-free metrics, fiber-cooperative TLS dispatch in 1.4.0+) shave ~5-10% off the *non-I/O* portion of the budget consistently — and the [worker-owns-connection model](#concurrency-at-scale-architectural-advantages) prevents the queue-amplification that Puma's thread-pool dispatch shows under sustained load. You don't need to "tune" anything to get those.
|
|
403
|
+
|
|
381
404
|
## Logging
|
|
382
405
|
|
|
383
406
|
Default behaviour (rc16+):
|
data/lib/hyperion/version.rb
CHANGED