The next-generation caching layer for PHP.

Relay is a Redis™ client like PhpRedis and Predis, except two orders of magnitude faster.

Sign up to follow the development or request early access.

Cutting-edge app or legacy codebase, supercharge anything.


Active invalidation

There’s one hard problem in computer science.

Relay is a PHP extension that is both a Redis™ client and a shared in-memory cache. Think APCu and PhpRedis having a child — but with magic powers.

It uses server-assisted client side caching to actively invalidate its in-memory cache and informs you about invalidations, so your app can update its runtime cache mid-request.


$relay = new Relay(host: '', port: 6379);

// Fetch the user count from Relay’s memory,
// or from Redis if the key has not been cached, yet.
$users = $relay->get('users:count');

// Listen to all invalidation events.
$relay->onInvalidated(function (Relay\Event $event) use ($users) {
    if ($event->key === 'users:count') {
        $users = null;

Resource efficient

Outrageously fast, easy on gas.

Relay maintains a highly-efficient, partial copy of Redis’ data in the PHP master process’ memory.

It handles millions of requests per second without breaking a sweat, while also reducing network communication with Redis™ to a bare minimum — saving you resources, bandwidth and money.

Seamless integration

A drop-in replacement for PhpRedis.

Relay can easily be integrated with most existing apps, websites and e-commerce stores — no code changes necessary.

No blocking calls

Asynchronous, multi-threaded & lock-free.

Redis’ biggest breaking point is its single-threaded nature. Replication and clustering can mitigate this, but they add serious complexity and costs.

Relay removes that bottleneck and provides a concurrent and lock-free API.


$relay = new Relay(host: '', port: 6379);

// By default all calls are synchronous.
$users = $relay->mget('post:1', 'post:2', 'post:3');

// Asynchronous, non-blocking calls are as easy as:
        'post:1', 'post:2', 'post:3'
    )->then(function ($posts) {
    })->catch(function (Throwable $exception) {

Designed for scale

Built with shared environments in mind.

Relay was designed considering the needs of hosting companies and infrastructure providers alike. By allowing you to set memory limits per prefix, database or user, Relay automatically evicts keys using LRU and LFU policies.


Start building for free. Predictable pricing. No hidden fees.



  • Unlimited workers
  • Community support
  • Limited to 32 MB memory


$97 /month

Coming soon
  • 32 workers included
  • Email support
  • No memory limits
  • $3/mo per extra worker


Ask for Quote

Request a quote
  • Reduced per-worker pricing
  • Slack & Phone support
  • Advanced feature set
  • Engineer led onboarding
  • Payment via invoice/PO
How many PHP workers are you running?

$97 per month for 32 active workers

Relay has a Fair Billing Policy and only bills for actively used production installations. No need to worry about bursts, CLI processes or staging environments.


Grab the code on GitHub, follow us on Twitter, join our Discord or send us an email.