BotWire.Redis
0.4.0
dotnet add package BotWire.Redis --version 0.4.0
NuGet\Install-Package BotWire.Redis -Version 0.4.0
<PackageReference Include="BotWire.Redis" Version="0.4.0" />
<PackageVersion Include="BotWire.Redis" Version="0.4.0" />
<PackageReference Include="BotWire.Redis" />
paket add BotWire.Redis --version 0.4.0
#r "nuget: BotWire.Redis, 0.4.0"
#:package BotWire.Redis@0.4.0
#addin nuget:?package=BotWire.Redis&version=0.4.0
#tool nuget:?package=BotWire.Redis&version=0.4.0
BotWire.Redis
Redis-backed session store and distributed rate-limit counters for BotWire — multi-container support in one line.
By default BotWire keeps conversation sessions and rate-limit counters in process memory, which breaks behind a load balancer: a request routed to a different instance loses the session, and every limit is multiplied by the replica count. This package moves both into Redis so they are shared across all instances and survive restarts.
One line to enable it
builder.Services.AddBotWire(opts =>
{
opts.TopicDescription = "Online store customer support";
opts.Documents = ["docs/faq.md"];
opts.ChatProvider = new OpenAIProviderOptions { ApiKey = "sk-...", Model = "gpt-4o-mini" };
})
.AddBotWireRedis("localhost:6379"); // registers a shared multiplexer + both Redis stores
app.MapBotWire();
Call it after AddBotWire(...). Without it, BotWire behaves exactly as before (in-memory stores, per-process counters) — adding the package changes nothing until you call AddBotWireRedis.
What you get
- Shared conversation sessions. Stored as JSON with a sliding TTL equal to
SessionTtl; history survives an instance restart or load-balancer bounce. - Distributed rate limiting.
MaxMessagesPerMinute,MaxSessionsPerIpPerHour, andDailyTokenBudgetuse atomic Redis counters, so N instances enforce one shared limit instead of N×. The daily-budget key resets at UTC midnight. - No Core coupling. Implemented behind
IRateLimitStore/IConversationStore;BotWire.Coretakes no Redis dependency.
MaxConcurrentSessions stays per-container by design (a distributed semaphore leaks permits on container crashes).
Requirements
- A reachable Redis instance (any standard
StackExchange.Redisconnection string). BotWire.AspNetCore(orBotWire.Core) — this package extends an existing BotWire setup.
License
AGPL-3.0-or-later. Commercial licenses available for proprietary use.
📖 Full docs and a multi-instance sample: https://github.com/adamy/BotWire
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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. |
-
net10.0
- BotWire.Core (>= 0.4.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- StackExchange.Redis (>= 3.0.7)
-
net6.0
- BotWire.Core (>= 0.4.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- StackExchange.Redis (>= 3.0.7)
-
net8.0
- BotWire.Core (>= 0.4.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- StackExchange.Redis (>= 3.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.