Run virtual servers
docker-compose up -d
Initialize shard cluster
.\init.ps1
dotnet tool restore
Build
dotnet build .\Examples\DisbalanceDemo.sln
Write many documents to collection disbalance.myjobs
dotnet run --project .\Examples\DisbalanceDemo\DisbalanceDemo.csproj myjobs 12 34 567
ProjectId will be in the range from 12 to 34
567 batches of 1000 elements will be recorded
sh.enableSharding("disbalance");
sh.shardCollection( "disbalance.myjobs", { "projectId": 1 } );
Initialize
dotnet ShardEqualizer config-init -hlocalhost
Update
dotnet ShardEqualizer config-update
dotnet ShardEqualizer balancer
dotnet ShardEqualizer deviation -sM --format=md --layouts="default,balance"
dotnet ShardEqualizer equalize