Microsoft.Orleans.Clustering.Redis 9.2.0-preview3

Prefix Reserved
This is a prerelease version of Microsoft.Orleans.Clustering.Redis.
dotnet add package Microsoft.Orleans.Clustering.Redis --version 9.2.0-preview3
                    
NuGet\Install-Package Microsoft.Orleans.Clustering.Redis -Version 9.2.0-preview3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Orleans.Clustering.Redis" Version="9.2.0-preview3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Orleans.Clustering.Redis" Version="9.2.0-preview3" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Orleans.Clustering.Redis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Orleans.Clustering.Redis --version 9.2.0-preview3
                    
#r "nuget: Microsoft.Orleans.Clustering.Redis, 9.2.0-preview3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Microsoft.Orleans.Clustering.Redis&version=9.2.0-preview3&prerelease
                    
Install Microsoft.Orleans.Clustering.Redis as a Cake Addin
#tool nuget:?package=Microsoft.Orleans.Clustering.Redis&version=9.2.0-preview3&prerelease
                    
Install Microsoft.Orleans.Clustering.Redis as a Cake Tool

Microsoft Orleans Clustering for Redis

Introduction

Microsoft Orleans Clustering for Redis provides cluster membership functionality for Microsoft Orleans using Redis. This allows Orleans silos to coordinate and form a cluster using Redis as the backing store.

Getting Started

To use this package, install it via NuGet:

dotnet add package Microsoft.Orleans.Clustering.Redis

Example - Configuring Redis Membership

using Microsoft.Extensions.Hosting;
using Orleans.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;

var builder = Host.CreateApplicationBuilder(args)
    .UseOrleans(siloBuilder =>
    {
        siloBuilder
            // Configure Redis as the membership provider
            .UseRedisClustering(options =>
            {
                options.ConnectionString = "localhost:6379";
                options.Database = 0;
            });
    });

var host = builder.Build();
await host.StartAsync();

// Get a reference to a grain and call it
var client = host.Services.GetRequiredService<IClusterClient>();
var grain = client.GetGrain<IHelloGrain>("user123");
var response = await grain.SayHello("Redis");

// Print the result
Console.WriteLine($"Grain response: {response}");

// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();

Example - Client Configuration

using Microsoft.Extensions.Hosting;
using Orleans.Hosting;
using Orleans;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;

var clientBuilder = Host.CreateApplicationBuilder(args)
    .UseOrleansClient(builder =>
    {
        builder
            // Configure Redis as the gateway provider
            .UseRedisGatewayListProvider(options =>
            {
                options.ConnectionString = "localhost:6379";
                options.Database = 0;
            });
    });

var host = clientBuilder.Build();
await host.StartAsync();
var client = host.Services.GetRequiredService<IClusterClient>();

// Get a reference to a grain and call it
var grain = client.GetGrain<IHelloGrain>("user123");
var response = await grain.SayHello("Redis Client");

// Print the result
Console.WriteLine($"Grain response: {response}");

// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();

Documentation

For more comprehensive documentation, please refer to:

Feedback & Contributing

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Microsoft.Orleans.Clustering.Redis:

Package Downloads
Cszy.Orleans

Package Description

SiloX.Orleans.Clustering.Redis

Redis clustering module that for Microsoft Orleans.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Microsoft.Orleans.Clustering.Redis:

Repository Stars
dotnet/aspire-samples
Version Downloads Last updated
9.2.0-preview3 320 6/10/2025
9.2.0-preview2 169 6/4/2025
9.2.0-preview1 1,488 4/4/2025
9.1.2 58,433 2/13/2025
9.0.1 53,432 11/23/2024
9.0.0 3,383 11/14/2024
8.2.0 95,238 7/12/2024
8.2.0-preview1 365 5/22/2024
8.1.0 107,676 4/17/2024
8.1.0-preview3 960 3/11/2024
8.1.0-preview2 236 2/23/2024
8.1.0-preview1 343 2/13/2024
8.0.0 18,092 1/5/2024
8.0.0-rc2 458 12/20/2023
8.0.0-rc1 271 12/4/2023
7.2.7 947 10/15/2024
7.2.6 1,764 3/9/2024
7.2.5 3,829 2/22/2024
7.2.4 34,537 12/2/2023
7.2.3 1,608 11/3/2023
7.2.2 35,143 10/16/2023
7.2.1 45,974 7/11/2023
7.2.0 924 7/7/2023
7.1.2-beta1 1,050 4/19/2023
7.1.1-beta1 643 3/23/2023
7.1.0-beta1 1,758 2/1/2023