The next-generation caching layer for PHP.

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

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 replica 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.

Even with caching disabled Relay is up to twice as fast as PhpRedis.

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.

Advanced integrations for Laravel, WordPress, Magento, Drupal and many other platforms are ready to go.

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.


Relay is free to use — forever. Upgrade for more memory.


Free Forever

  • Unlimited vCPUs
  • Community support
  • Limited to 64 MB
  • Fastest Redis client for PHP


$147 /month

Request an invite
  • 8 vCPUs included
  • Email support
  • No memory limits
  • $2/mo per extra vCPU


Ask for Quote

Request a quote
  • Reduced vCPU pricing
  • Slack & Phone support
  • Advanced feature set
  • Engineer led onboarding
  • Payment via invoice/PO
How many vCPUs are you running?

$147 per month for 8 active vCPUs

Relay has a Fair Billing Policy and only bills for actively used production vCPUs. No need to worry about idle machines, bursts, short-lived CLI processes or staging environments.

Questions? Just curious?

Follow us on Twitter, join our Discord or send us an email.

Sign up to follow Relay’s development and receive special offers.