hiett/serverless-redis-http
49.4
Weak · 18 September 2026
875
lines of production code
Elixir
primary language
1
measurement over time
What this system is
This system is an SRH application that acts as a proxy or gateway, managing HTTP requests and forwarding them to a Redis backend. It handles authentication via configurable token resolution with in-memory caching and supports SSL connections to Redis. The service exposes a standardized JSON API for executing Redis commands, including optional Base64 encoding for binary data, and is designed for deployment in various environments through flexible configuration and release packaging.
Features
Added release environment and VM configuration templates
Added new template files for release configuration, including \env.bat.eex\ and \env.sh.eex\ for setting environment variables like node distribution, and \vm.args.eex\ and \remote.vm.args.eex\ for customizing Erlang VM flags such as IO schedulers and GC behavior. These files provide a baseline for configuring the application's runtime environment and distributed node settings in production releases.
rel · high confidence
Behavioural changes
Configurable server port and IPv6 support
The application now allows the HTTP server port to be configured via the SRH\_PORT environment variable, defaulting to the previously hardcoded value for backward compatibility. Additionally, users can enable IPv6 networking by setting the SRH\_IPV6 environment variable to true, which switches the underlying Cowboy server to use the :inet6 protocol.
lib · high confidence
Introduction of environment-based configuration for the SRH application
The application now uses a structured configuration system that allows the token resolution mode, file path, and listening port to be customized per environment. In development, the app defaults to file-based token resolution and port 8080. In production, it listens on port 80. At runtime, these settings can be overridden via environment variables (TOKEN\_RESOLUTION\_MODE, TOKEN\_RESOLUTION\_FILE\_PATH, PORT), with sensible defaults provided in runtime.exs to ensure the application starts correctly without explicit configuration.
config · high confidence
Redis client now supports connection borrowing and SSL
The Redis client library has been refactored to support a borrow/return pattern for worker connections, allowing commands to be executed directly on allocated workers rather than locking the main client process. This change introduces explicit \borrow\_worker\ and \return\_worker\ APIs and tracks borrowed connections to ensure proper cleanup. Additionally, the client now supports SSL connections via \rediss://\ URLs, automatically configuring hostname verification when SSL is enabled. The idle timeout for the client has been increased to 15 minutes, and verbose logging has been removed.
lib/srh/redis · high confidence
Standardized error responses and optional Base64 encoding for binary data
The HTTP API now enforces that POST, PUT, PATCH, and DELETE requests must include an \application/json\ content type, returning a standardized 400 error otherwise. Binary data returned by Redis commands is now optionally encoded to Base64 when the \upstash-encoding\ header is set, using a new \ResultEncoder\ to handle single items and command lists. Additionally, all API responses now follow a consistent JSON structure: successful data is wrapped in \{"data": ...}\ and errors in \{"error": ...}\, with specific HTTP status codes for authorization failures (401) and connection issues (500).
lib/srh/http · high confidence
Token resolution now uses an in-memory ETS cache via a GenServer
The token resolver has been refactored from a stateless function into a GenServer that loads token-to-connection mappings into an in-memory ETS table at startup. This change significantly improves lookup performance by avoiding repeated decoding or external calls during resolution. The system now supports two configuration modes: loading from a local file (default) or from environment variables, with the loaded data stored in the shared ETS table for fast access.
lib/srh/auth · high confidence
Dependencies
Add release configuration for Unix tar archives
The project now includes a release configuration for the 'prod' environment that specifies including executables for Unix systems and defines build steps to assemble and create a tar archive, facilitating Docker-based building and release workflows.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 49.
Lenses
- Code Health 100
- Architecture 69
- Maturity 45
- Readiness 35
- Security 88
Changes since last survey
- 93 commits — 87 feature/other, 6 fixes
By area
- .github/workflows — 29 commits
- lib/srh — 27 commits
- (root) — 18 commits
- (repo) — 14 commits
- example/src — 3 commits
- config/test.exs — 1 commit
- lib/srh.ex — 1 commit
Notable commits
- fix: Fix env configuration
- fix: HOTFIX: Redis connections not getting properly destroyed
- fix: Merge pull request #11 from jahands/fix-invalid-auth
- fix: Minor fix
- fix: fix: Add not_authorized to ResultEncoder
- fix: syntax mistake in action fixed
- change: 0.0.5-alpha candidate, changes to use that and the new environment config mode
- change: Add docker hub link to docs
- change: Add needs build requirement
- change: Add support for environment variable loading for a single redis connection
- change: All 3 methods are now destroying pools on failures, need to test normal functionality then can remove logging
- change: Automatically run tests
- change: Begin work ensuring that the pool is correctly being destroyed on connection failures
- change: Better error handling for failure to connect to Redis server
- change: Blank commit to re-run with updated image
- change: Change to localhost, figuring out action networking with services
- change: Change when action runs
- change: Clarify internal error is from SRH
- change: Clean up test workflow
- change: Cleaning up old logs
- …and 73 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
hiett/serverless-redis-http was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 939e1a8271ae4f07e4f957a743c1e1b6c96ef953 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.