Using Valkey on Azure and in .NET Aspire

.NET Aspire’s existing Redis client will work with Valkey; all you need to do is ensure that you’re using the correct connectionName. Microsoft provides Aspire implementation details for three different Valkey scenarios: standard cache, distributed cache, and output cache. The documentation isn’t quite complete, as it often refers to Redis rather than Valkey, but Aspire treats the two interchangeably so it’s not too difficult to understand what to do and when.

Another advantage to using Valkey with Aspire: You can take advantage of Aspire’s observability tools, health checks, logging, and its built-in developer dashboard to monitor operations—including your cache. Having tools that manage application health is important, especially when building the distributed, cloud-native applications that rely on services like Valkey.

As Valkey continues to diverge from Redis, it’s worth keeping an eye on both projects, as each will address different use cases and support different application architectures. For now, however, thanks to RESP, they can be used relatively interchangeably, allowing you to choose one or the other and switch to whichever works best for you and your project. With basic support in both AKS and .NET Aspire, and a major new release of Valkey around the corner, it’s a suitable time to give it a try.

Donner Music, make your music with gear
Multi-Function Air Blower: Blowing, suction, extraction, and even inflation

Leave a reply

Please enter your comment!
Please enter your name here