Microsoft.Orleans.Clustering.Redis 9.2.0-preview2
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
- If you have any issues or would like to provide feedback, please open an issue on GitHub
- Join our community on Discord
- Follow the @msftorleans Twitter account for Orleans announcements
- Contributions are welcome! Please review our contribution guidelines
- This project is licensed under the MIT license
No packages depend on Microsoft.Orleans.Clustering.Redis.
.NET 8.0
- Microsoft.Orleans.Analyzers (>= 9.2.0-preview2)
- System.Memory.Data (>= 8.0.1)
- System.IO.Pipelines (>= 8.0.0)
- System.IO.Hashing (>= 8.0.0)
- System.Collections.Immutable (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.ObjectPool (>= 8.0.11)
- Microsoft.Extensions.Logging.Debug (>= 8.0.1)
- Microsoft.Extensions.Logging.Console (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging (>= 8.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Hosting (>= 8.0.1)
- Microsoft.Extensions.DependencyModel (>= 8.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.1)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.CodeAnalysis.Workspaces.Common (>= 4.5.0)
- Microsoft.CodeAnalysis.Common (>= 4.5.0)
- Microsoft.CodeAnalysis.Analyzers (>= 3.11.0)
- Microsoft.AspNetCore.Connections.Abstractions (>= 8.0.11)
- StackExchange.Redis (>= 2.8.16)
- Newtonsoft.Json (>= 13.0.3)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Microsoft.Orleans.Runtime (>= 9.2.0-preview2)
- Microsoft.Orleans.CodeGenerator (>= 9.2.0-preview2)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
| Version | Downloads | Last updated |
|---|---|---|
| 10.4.2 | 0 | 10/30/2026 |
| 10.4.1 | 0 | 10/28/2026 |
| 10.4.0 | 3 | 10/27/2026 |
| 10.3.1 | 2 | 09/26/2026 |
| 10.3.0 | 3 | 09/26/2026 |
| 10.3.0-rc.1 | 2 | 09/26/2026 |
| 10.2.2 | 2 | 09/26/2026 |
| 10.2.2-rc.2 | 1 | 09/26/2026 |
| 10.2.2-rc.1 | 2 | 09/26/2026 |
| 10.2.1 | 1 | 09/26/2026 |
| 10.2.1-preview.1 | 4 | 09/26/2026 |
| 10.2.0 | 1 | 09/26/2026 |
| 10.1.1-preview.1 | 2 | 09/26/2026 |
| 10.1.0 | 1 | 09/26/2026 |
| 10.0.1 | 3 | 09/26/2026 |
| 10.0.0 | 1 | 09/26/2026 |
| 10.0.0-rc.2 | 3 | 09/26/2026 |
| 9.2.1 | 1 | 09/26/2026 |
| 9.2.0 | 1 | 10/27/2026 |
| 9.2.0-preview3 | 1 | 09/26/2026 |
| 9.2.0-preview2 | 1 | 09/26/2026 |
| 9.2.0-preview1 | 2 | 09/26/2026 |
| 9.1.2 | 1 | 09/26/2026 |
| 9.0.1 | 3 | 09/26/2026 |
| 9.0.0 | 1 | 09/26/2026 |
| 8.2.0 | 2 | 06/16/2026 |
| 8.2.0-preview1 | 2 | 09/26/2026 |
| 8.1.0 | 3 | 09/26/2026 |
| 8.1.0-preview3 | 3 | 09/26/2026 |
| 8.1.0-preview2 | 2 | 09/26/2026 |
| 8.1.0-preview1 | 2 | 09/26/2026 |
| 8.0.0 | 1 | 09/26/2026 |
| 8.0.0-rc2 | 1 | 09/26/2026 |
| 8.0.0-rc1 | 2 | 09/26/2026 |
| 7.2.7 | 0 | 10/15/2024 |
| 7.2.6 | 3 | 09/26/2026 |
| 7.2.5 | 0 | 02/22/2024 |
| 7.2.4 | 1 | 09/26/2026 |
| 7.2.3 | 2 | 09/26/2026 |
| 7.2.2 | 2 | 09/26/2026 |
| 7.2.1 | 0 | 07/11/2023 |
| 7.2.0 | 1 | 09/26/2026 |
| 7.1.2-beta1 | 2 | 09/26/2026 |
| 7.1.1-beta1 | 3 | 09/26/2026 |
| 7.1.0-beta1 | 2 | 09/26/2026 |