Skip to content

v0.5.0 — Redis clustering and performance (nginx 1.31.7 / 1.30.6)

Choose a tag to compare

@github-actions github-actions released this 18 Oct 14:02
· 24 commits to main since this release

Redis coordination across gateway instances, more resilient browser recovery, and faster request verification. Protocol v2 remains in use.

Changes

  • Add optional pow_gate_redis coordination for one-use JS/no-JS redemption across independent nginx instances. Matching keys, policy and a provisioned epoch allow challenges and clearances to cross nodes without sticky routing. Ordinary clearance checks remain local.
  • Bound Redis work with nginx nonblocking socket events, connection/queue limits and a deadline covering queue time. Atomic epoch/clock checks fence lost control state; ambiguous redemption replies fail closed. The default remains the 2 MiB shared-memory replay store.
  • Scope cookie names automatically, confirm server-side cookie acceptance before navigation, and show a bounded error when cookies are blocked. Add bounded network retries, fresh challenges after ambiguous verification, worker watchdogs and in-page solver fallback.
  • Track crawler-feed snapshots independently, reject malformed replacements, expire stale sources and use indexed CIDR lookup. Add outcome logging variables and an optional ASN policy example.
  • Cache resolved configuration, policy fields and HMAC key schedules; enable native HMAC/P-256 verification in the module. Borrow token/configuration data, decode keys once, and send immutable response bodies without body-sized copies. Authentication, context, assurance and proof checks still run on every request.
  • Fingerprint public solver URLs for immutable caching across the page and workers. Keep challenges, verification and errors no-store; support nginx gzip filters with an example configuration.

Upgrade

Cookie names now include a scope suffix by default. Existing fixed-name cookies require a fresh solve. Update CDN bypass rules, logs and integrations that assumed the exact name pow_clearance; $pow_gate_cookie_name exposes the effective name. Set pow_gate_cookie_scope_suffix off explicitly if an exact fixed name is required. See cookie migration.

Install the .so atomically and deploy the module and solver together. Custom challenge pages should use the versioned solver URL and may adopt the embedded script-load recovery bootstrap. Cache keys must preserve the complete solver query.

Redis coordination requires one authoritative primary with noeviction and an explicitly provisioned shared epoch. It does not discover Redis Cluster/Sentinel topology or provide automatic durable failover. If spent-state continuity is uncertain, fence the fleet and rotate the epoch before resuming traffic. Switching replay backends invalidates existing tokens. Follow the Redis deployment and failover guide.

Validation and performance

CI, amd64 builds and native arm64 builds passed for the release commit on both pinned nginx channels, with glibc/musl coverage. The core passes 78 portable and 79 native-crypto tests. Coverage includes HTTP/1.1, HTTP/2, real TLS/QUIC HTTP/3, failed reloads, Redis cross-node races/failure fencing, feed freshness, gzip/HEAD/slow readers, and Chromium/Firefox recovery.

All performance tests ran on Linux/amd64. The first performance pass measured signed-proof throughput of 6,518 → 10,922 requests/second and worker CPU of 524.9 → 192.0 µs/request in a matched local four-worker setup. The allocation follow-up reduced normal clearance validation from six allocations to one; its separate matched run measured 10,530 → 10,965 proof requests/second. These are separate before/after experiments, not direct v0.4.0 release comparisons or production capacity estimates. Smaller throughput changes varied with concurrency and host load. See methodology and raw results.

Artifacts

Choose the exact nginx version, libc and architecture of your runtime.

nginx libc arch Module
1.31.7 glibc amd64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-glibc-amd64.so
1.31.7 glibc arm64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-glibc-arm64.so
1.31.7 musl amd64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-musl-amd64.so
1.31.7 musl arm64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-musl-arm64.so
1.30.6 glibc amd64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-glibc-amd64.so
1.30.6 glibc arm64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-glibc-arm64.so
1.30.6 musl amd64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-musl-amd64.so
1.30.6 musl arm64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-musl-arm64.so

Each module has a .sig signature and .pem signing certificate. SHA256SUMS covers all eight modules. The release workflow requires two independent, byte-identical builds of each module and attaches GitHub build-provenance attestations.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.5.0-nginx1.31.7-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.5.0' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"