【问题标题】:RavenDb sharding with dynamic amount of servers具有动态服务器数量的 RavenDb 分片
【发布时间】:2014-10-19 12:18:29
【问题描述】:

典型的分片配置如下所示:

            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 扩展并在需要时自动创建一个新的虚拟机,该怎么办。有什么方法可以自动发现新机器?

【问题讨论】:

    标签: azure ravendb


    【解决方案1】:

    首先,看看这个: http://ayende.com/blog/4719/data-roles-dont-scale-up-down-dynamically

    其次,只需创建一个新的 ShardedDocumentStore 并使用它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-23
      • 2016-08-13
      • 1970-01-01
      • 2015-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多