Reputation: 25312
The typical sharding configuration looks like this:
var shards = new Dictionary<string, IDocumentStore>
{
{"Asia", new DocumentStore {Url = "http://localhost:8080"}},
{"Middle East", new DocumentStore {Url = "http://localhost:8081"}},
{"America", new DocumentStore {Url = "http://localhost:8082"}},
};
So we have to know what our servers are beforehand. But what if I want to use Azure scaling and so have a new Virtual Machine created automatically when it is needed. Is there any way to make a new machine be autodiscovered?
Upvotes: 0
Views: 53
Reputation: 22956
First, see this: http://ayende.com/blog/4719/data-roles-dont-scale-up-down-dynamically
Second, just create a new ShardedDocumentStore and use that.
Upvotes: 1