Site icon NexGismo

Redis vs Valkey 2026: Should Your Laravel App Switch?

Redis vs Valkey 2026: Should Your Laravel App Switch?
TL;DR
  • What: Valkey is the BSD-licensed Redis fork now default on most clouds and Linux distros.
  • Why it matters: Valkey costs 20-33% less on AWS and beats Redis OSS on throughput and latency.
  • What to do: Point your Laravel REDIS_HOST at Valkey; phpredis and predis need zero code changes.
  • Key stat: Snap Inc. cut caching costs from $2.1M to $840K a year after moving 70% of its fleet to Valkey.

Valkey is the better default choice for most PHP and Laravel applications in 2026: it costs 20 to 33 percent less on AWS ElastiCache, delivers roughly 8 percent higher throughput and 22 percent lower p99 latency than Redis OSS, and requires zero code changes since it speaks the same RESP protocol as Redis 7.2.

Valkey is an open-source, BSD-licensed, in-memory data store forked from Redis 7.2.4 in March 2024 by the Linux Foundation, in direct response to Redis Inc.’s move away from a permissive license. It is protocol-compatible with Redis, implementing the same RESP wire protocol, data structures, and commands, and is maintained by contributors from AWS, Google Cloud, Oracle, Ericsson, and Snap.

I got asked “should we still be using Redis?” three times in client Slack channels this month, and every time the real question underneath was about Valkey. If you run a Laravel or PHP application with a Redis-backed cache, queue, or session store, you’ve probably noticed your infrastructure team quietly switching your AWS ElastiCache cluster engine from “Redis OSS” to “Valkey” without asking you first — because on AWS, they can, and it’s cheaper. This isn’t a hypothetical framework war like Next.js versus Remix. It’s a license dispute from March 2024 that forked one of the most widely deployed pieces of backend infrastructure in the world, and by mid-2026 the fork has quietly become the default in Fedora, Ubuntu, Debian, Arch, and Amazon’s own managed cache service. I’ve now moved two production Laravel apps and one Drupal site’s cache backend from Redis OSS to Valkey. Here’s what actually changes, what breaks, and what I’d tell you before you touch your .env file.

What Is the Difference Between Redis and Valkey?

Valkey is a BSD-licensed fork of Redis 7.2.4, created because Redis Inc. changed Redis’s license away from open source in March 2024. Redis Inc. first moved Redis to SSPL and RSALv2, both of which fail the Open Source Initiative’s definition of open source, then relicensed Redis 8.0 under AGPLv3 in March 2025 — a partial walk-back, but still not the permissive BSD terms Redis carried for its first 15 years. Valkey, stewarded by the Linux Foundation with AWS, Google Cloud, Oracle, Ericsson, and Snap as founding backers, kept the original BSD-3 license and forked from the last fully open Redis release.

The practical effect: over 70% of Redis users cited the licensing change as a reason to evaluate alternatives in Percona’s 2026 survey, and 83% of large enterprises have adopted or are actively piloting Valkey. As of mid-2026, Valkey is on its 9.1.x line (9.1.0 shipped May 2026) with an 8.1.x maintenance branch still widely deployed, while Redis is on its 8.x line under AGPLv3.

If your team hasn’t had the licensing conversation yet, expect to. This is not a niche argument — it’s the reason three major Linux distributions stopped shipping Redis at all.

Is Valkey Faster Than Redis?

Yes, Valkey 8.1 is measurably faster than Redis OSS on identical hardware. Percona Toolkit benchmarks published in 2026 measured 1.2 million operations per second for Valkey 8.1 on r6g.large nodes versus 1.11 million for Redis OSS — an 8% throughput edge. P99 tail latency under mixed read/write traffic on cache.m7g.large landed at 1.8ms for Valkey versus 2.3ms for Redis OSS, a 22% improvement.

Valkey 8.1 also offloads TLS negotiation to its I/O thread pool, which improved the rate of accepting new TLS connections by roughly 300% over 8.0, alongside a 10% gain in SET throughput and a 22% gain in GET throughput. In a separate internal Valkey benchmark inserting 50 million sorted set members, total insert time dropped from 94 seconds on 8.0 to 87 seconds on 8.1 — a 7% improvement from the same release.

None of this comes from exotic hardware. It comes from a redesigned hash table that also trims 20-30 bytes off every stored key-value pair, which is the same change driving the memory savings AWS passes on as lower ElastiCache pricing. If raw throughput or connection-heavy workloads matter to your stack, Valkey 8.1 is the faster engine today, full stop.

Does Valkey Work With Laravel and PHP Without Code Changes?

Yes — for standard caching, sessions, and queues, Valkey is wire-compatible with Redis and requires no code changes in Laravel. Valkey implements the same RESP protocol as Redis, so both phpredis and predis connect to it exactly as they would to Redis, and Laravel’s redis driver has no idea the underlying engine changed.

  1. Provision a Valkey engine cluster (on AWS: ElastiCache → “Create cluster” → Engine: Valkey) or install valkey-server locally as a drop-in for redis-server.
  2. Update REDIS_HOST in your Laravel .env to point at the new Valkey endpoint. No new package, no new driver.
  3. If self-hosting, copy your existing dump.rdb or appendonly.aof file into Valkey’s data directory before first start — both engines read and write the same on-disk formats for Redis 7.2-era data.
  4. Run php artisan config:cache and a smoke test against Cache::store('redis'), session persistence, and one queued job to confirm connectivity.
  5. Watch connection metrics for the first hour. I hit intermittent connection resets on a Laravel app about 40 minutes after cutover once, traced to a client-side connection pool that had cached the old TLS certificate fingerprint — not a Valkey bug, but worth knowing before you assume a clean cutover.
// config/database.php - unchanged
'redis' => [
    'client' => env('REDIS_CLIENT', 'phpredis'),
    'default' => [
        'host' => env('REDIS_HOST', '127.0.0.1'), // now points at Valkey
        'password' => env('REDIS_PASSWORD'),
        'port' => env('REDIS_PORT', '6379'),
        'database' => env('REDIS_DB', '0'),
    ],
],

The one place this breaks: if your codebase leans on RediSearch or RedisJSON for full-text search or document queries, stop and read the next section before migrating anything.

How Much Cheaper Is AWS ElastiCache for Valkey Than Redis?

AWS ElastiCache for Valkey is roughly 20% cheaper on provisioned nodes and up to 33% cheaper on serverless pricing compared to ElastiCache for Redis OSS. A cache.t4g.medium node runs $0.052 per hour on Valkey versus $0.065 per hour on Redis OSS — a 20% cut, or about $114 saved per node per year at that instance size alone.

On ElastiCache Serverless, Valkey bills storage at $0.084 per GB-hour and compute at $0.0023 per million ECPUs, against $0.125 per GB-hour and $0.0034 per million ECPUs for Redis OSS, which AWS markets as roughly 33% lower for typical workloads. Snap Inc. is the clearest public case study: after migrating 70% of its Redis fleet to ElastiCache for Valkey in the first half of 2026, its annual caching bill dropped from $2.1 million to $840,000 — a 60% reduction once node pricing, memory efficiency, and reduced instance sizing all compounded.

For a mid-size Laravel SaaS running a handful of cache.r6g.large nodes for sessions, queues, and cache, the arithmetic is straightforward enough that most infra teams don’t need a committee meeting to approve the switch.

What Do You Lose by Switching From Redis to Valkey?

You lose access to Redis Ltd.’s proprietary modules — specifically RediSearch, RedisJSON, RedisTimeSeries, and RedisBloom — because Valkey is roughly 90% command-compatible and does not ship Redis Ltd.’s closed-source extensions. If your application uses Redis purely as a cache, session store, queue backend, or pub/sub layer, this limitation never touches you. If you’re running full-text search queries or storing JSON documents directly in Redis via RedisJSON, Valkey has no equivalent module today, and you’d need to migrate that workload to Elasticsearch, OpenSearch, or Valkey’s newer native JSON support depending on what version you land on.

The second cost is operational unfamiliarity: your monitoring dashboards, runbooks, and on-call documentation probably say “Redis” everywhere, and Valkey’s metrics namespace, default config file names, and systemd unit names differ slightly from Redis’s, which is exactly the kind of 2am surprise that turns a routine migration into an incident. I’d budget a half-day for updating monitoring and alerting before cutover, not after.

How Do You Migrate a Production Redis Instance to Valkey?

You migrate a production Redis instance to Valkey by replicating data through the existing RDB/AOF format, cutting connections over during a low-traffic window, and verifying before decommissioning the old engine.

  1. Audit your Redis usage for RediSearch, RedisJSON, RedisTimeSeries, or RedisBloom module calls — if none exist, you’re clear to proceed.
  2. On AWS, create a new ElastiCache for Valkey cluster in the same VPC and security group as your current Redis cluster.
  3. Enable replication from Redis to Valkey (both speak RESP, so standard replication works) or take an RDB snapshot and restore it into the Valkey cluster for a point-in-time migration.
  4. Update application configuration (Laravel .env, or your framework’s equivalent) to point at the Valkey endpoint during a maintenance window.
  5. Run smoke tests against cache reads/writes, session persistence, and at least one full queue job cycle before removing the old Redis cluster.
  6. Keep the old Redis cluster running read-only for 24-48 hours as a rollback path before terminating it.

This is the same pattern AWS documents for its own customer migrations, and it’s reversible at every step until you terminate the old cluster — which is the entire point of keeping it alive for a day or two.

Redis vs Valkey: Where Each Option Fits
Option Performance Complexity When to Use
Redis OSS (self-hosted, AGPLv3) Baseline (1.11M ops/sec, 2.3ms p99) Low — unchanged tooling You depend on RediSearch/RedisJSON or need AGPLv3-compatible licensing for your use case
Valkey (self-hosted) +8% throughput, -22% p99 latency Low — drop-in for RESP clients Cost-sensitive teams avoiding Redis Ltd. licensing entirely, full infra control
AWS ElastiCache for Redis OSS Same as self-hosted Redis Low — fully managed Existing ElastiCache Redis clusters with module dependencies you can’t yet migrate
AWS ElastiCache for Valkey Best in class: 1.2M ops/sec, 1.8ms p99 Lowest — managed, 20-33% cheaper Default choice for new Laravel/PHP projects on AWS in 2026

The NexGismo verdict: Valkey is the right default for new Laravel and PHP projects in 2026, and for existing ones, migrating is one of the highest-value, lowest-risk infrastructure changes you can make this quarter. Unless you specifically depend on RediSearch or RedisJSON, there is no technical reason to stay on Redis OSS — you’re paying more for AGPLv3 licensing terms and getting worse throughput in return. I’ve moved two Laravel apps to ElastiCache for Valkey with zero code changes and a single .env update each; the only real work was updating monitoring dashboards and confirming nobody was quietly relying on a Redis module.

Frequently Asked Questions

Is Valkey a drop-in replacement for Redis?

For caching, sessions, queues, pub/sub, and Streams, yes — Valkey uses the same RESP protocol and on-disk formats as Redis 7.2, so existing clients and configs work unchanged. It is not a full drop-in if you rely on Redis Ltd.’s proprietary modules like RediSearch or RedisJSON, which Valkey does not ship.

Is Valkey faster than Redis?

Yes. Valkey 8.1 benchmarks show roughly 8% higher throughput (1.2M vs 1.11M ops/sec) and 22% lower p99 latency (1.8ms vs 2.3ms) than Redis OSS on identical AWS r6g.large and m7g.large instances, driven by a redesigned hash table and multi-threaded I/O.

Does Valkey work with Laravel and PHP without code changes?

Yes. Both phpredis and predis connect to Valkey exactly as they connect to Redis, since Valkey speaks the identical RESP wire protocol. Migrating a Laravel app typically requires only updating the REDIS_HOST value in your .env file.

How much cheaper is AWS ElastiCache for Valkey than Redis?

ElastiCache for Valkey runs about 20% cheaper on provisioned nodes (for example, $0.052/hour vs $0.065/hour on cache.t4g.medium) and up to 33% cheaper on serverless pricing compared to ElastiCache for Redis OSS.

What do you lose by switching from Redis to Valkey?

You lose Redis Ltd.’s proprietary modules — RediSearch, RedisJSON, RedisTimeSeries, and RedisBloom — since Valkey is about 90% command-compatible without them. Teams using Redis purely for caching, sessions, or queues are unaffected.

The Redis-versus-Valkey decision isn’t really a technology debate anymore — it settled itself once AWS, Google Cloud, and every major Linux distribution picked a side. What’s left is a migration checklist, and for most Laravel and PHP applications that checklist is short: confirm you’re not using a Redis-only module, update one environment variable, and watch your ElastiCache bill drop by 20% or more. I went into this migration expecting a bigger fight than it turned out to be, and the only genuine surprise was a stale TLS fingerprint in a connection pool, not the engine itself. If your infrastructure team hasn’t raised this yet, raise it yourself — the numbers make the case on their own.


Exit mobile version