Skip to content
Merged

Dev #16

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ Thumbs.db
PLAN.md
NOTES.md

scripts/
# Local scratch scripts stay out, but the ones the README and the docs site link
# to have to be tracked or those links 404.
#
# `scripts/*` rather than `scripts/`: git cannot re-include a file whose parent
# directory is excluded, so a bare `scripts/` would make the negations below
# silently do nothing.
scripts/*
!scripts/bump-version.sh
!scripts/benchmark.sh
!scripts/update-formula-checksums.sh

# Cache snapshots / AOF written by a server started in the repo root
# (e.g. while running scripts/benchmark.sh). Never artifacts to commit.
Expand Down
26 changes: 16 additions & 10 deletions Formula/recached.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
class Recached < Formula
desc "Blazing fast, multi-core drop-in replacement for Redis"
homepage "https://github.com/recached-dev/recached"
version "0.1.8"
license "MIT"
version "0.2.4"
license "Apache-2.0"

# The checksums below are placeholders until the v0.2.4 release artifacts
# exist. Fill them with `scripts/update-formula-checksums.sh v0.2.4`, which
# downloads the published binaries and rewrites this file.
#
# `scripts/bump-version.sh` resets them to placeholders on every bump, and
# that is deliberate: this formula sat at 0.1.8 with *valid* 0.1.8 URLs and
# checksums while the project shipped 0.2.x, so `brew install recached`
# silently succeeded and handed people the old binary — including the one
# whose replication port served the keyspace without authentication. A
# placeholder makes brew fail loudly, which is the far better failure.
on_macos do
on_intel do
url "https://github.com/recached-dev/recached/releases/download/v0.1.8/recached-macos-x86_64"
# shasum -a 256 of the binary in target/dist/recached-macos-x86_64;
# recompute if the release binary is rebuilt before uploading.
sha256 "227fca7d7ff5c9511f9482863024e222c0c66f93ad40288581ca1fb32a9f20bd"
url "https://github.com/recached-dev/recached/releases/download/v0.2.4/recached-macos-amd64"
sha256 "REPLACE_WITH_AMD64_SHA256"
end
on_arm do
url "https://github.com/recached-dev/recached/releases/download/v0.1.8/recached-macos-arm64"
# TODO: build on Apple Silicon (or cross-compile: cargo build --release
# --target aarch64-apple-darwin), upload, then: shasum -a 256 recached-macos-arm64
url "https://github.com/recached-dev/recached/releases/download/v0.2.4/recached-macos-arm64"
sha256 "REPLACE_WITH_ARM64_SHA256"
end
end

def install
# Rename the downloaded binary to 'recached-server' and install it into the Homebrew bin
binary = Hardware::CPU.arm? ? "recached-macos-arm64" : "recached-macos-x86_64"
binary = Hardware::CPU.arm? ? "recached-macos-arm64" : "recached-macos-amd64"
bin.install binary => "recached-server"
end

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ password, no TLS, and no restriction on which web pages may open the sync socket

## Benchmarks

Measured with `redis-benchmark` (100k requests, 50 connections, 64-byte values, randomized keys, persistence disabled on all servers) on a 4-core Intel i5-8259U laptop, July 2026 — Recached v0.1.8 vs Redis 7.2.5 vs Valkey 9.1.0, one server at a time.
Measured with `redis-benchmark` (100k requests, 50 connections, 64-byte values, randomized keys, persistence disabled on all servers) on a 4-core Intel i5-8259U laptop, July 2026 — Recached v0.1.8 vs Redis 7.2.5 vs Valkey 9.1.0, one server at a time. Current release is v0.2.4; these command paths were A/B tested across the v0.2.4 changes and moved within run-to-run noise, but the three-way suite has not been re-run since v0.1.8.

Pipelined (`-P 16`) — raw command throughput, requests/sec, **bold** = best per row:

Expand All @@ -117,6 +117,8 @@ Pipelined (`-P 16`) — raw command throughput, requests/sec, **bold** = best pe

Recached's multi-threaded runtime spreads connections across all cores, while Redis and Valkey execute commands on one — pipelined, Recached comes out ahead of Redis on 6 of 7 commands and ahead of Valkey on all 7, on the same hardware. Unpipelined (one command per round-trip — the traffic shape of typical request-scoped cache calls), the localhost round-trip dominates and Recached runs at 46–96% of Redis with sub-millisecond p50 latency on every common command (GET 58.1k vs 61.6k rps; HSET is the weakest at 46%).

**New in v0.2.4:** sorted sets gained a score-ordered index, so range reads no longer sort the whole set on every query. On a ~45k-member leaderboard, repeated `ZRANGE key 0 9` went from 244 to 133k rps (**546×**), and an alternating `ZADD` + `ZRANGE` loop from 65 s to 0.11 s (**597×**). `ZADD` gives up ~15% against a set that is actively being read; a write-only sorted set never builds the index and is unaffected. Measured as before/after ratios on a loaded machine — see the [benchmarks page](https://recached.dev/guide/benchmarks) for methodology.

Full tables with latency percentiles, pipelined results, methodology, and known hotspots: **[recached.dev/guide/benchmarks](https://recached.dev/guide/benchmarks)**. Reproduce with [`scripts/benchmark.sh`](scripts/benchmark.sh) — results from server-grade hardware welcome.

---
Expand Down
Loading
Loading