dotnet / dotNext

Next generation API for .NET
https://dotnet.github.io/dotNext/
MIT License
1.62k stars 122 forks source link

Document recommended pattern for cluster members configuration #146

Closed davhdavh closed 1 year ago

davhdavh commented 1 year ago

https://dotnet.github.io/dotNext/features/cluster/raft.html#network-transport mentions how it can be done for tcp/udp, but there doesn't seem to be anywhere it is documented what the recommended pattern is for aspnetcore. Only place I can find specifically says it is not recommended to do in production https://github.com/dotnet/dotNext/blob/master/src/examples/RaftNode/Startup.cs#L63

sakno commented 1 year ago

In case of ASP.NET Core, all capabilities available through DI. If you want to add/remove members dynamically, use API provided by IRaftHttpCluster interface. It exposes the same pair of AddMemberAsync/RemoveMemberAsync methods.