This project demonstrates Microsoft Orleans localhost clustering.
You can run up to 3 servers / silos.
Since every silo needs different ports, there is a launchSettings profile for each silo.
Silo 1 is considered the primary silo the others connect to in order to form a cluster.
Therefore, silo 1 needs to be started at all times.
dotnet run --project ./OrleansDemo.Server/OrleansDemo.Server.csproj --launch-profile silo1
dotnet run --project ./OrleansDemo.Server/OrleansDemo.Server.csproj --launch-profile silo2
dotnet run --project ./OrleansDemo.Server/OrleansDemo.Server.csproj --launch-profile silo3
A dashboard will be provided for each server instance.
You can visit the dashboard of server / silo 1 at the following address:
http://localhost:10103/
The client must connect to a specific silo.
Thus, there are predefined profiles in the client launchSettings as well.
Start the client using one of the profiles.
dotnet run --project ./OrleansDemo.Client/OrleansDemo.Client.csproj --launch-profile silo1
The client provides a /greet
endpoint which can be called to request a GreeterGrain
.
curl http://localhost:9500/greet