2014-10-19 57 views
0

典型的分片配置的动态量看起来是这样的:RavenDb分片与服务器

  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"}}, 
      }; 

因此,我们必须要知道我们的服务器是事前。但是如果我想使用Azure缩放,并且在需要时自动创建新的虚拟机,该怎么办?有没有办法让一台新机器被自动发现?

回答