Elasticsearch 权威指南
  • Elasticsearch 权威指南
  • 入门
    • 初识
    • 安装
    • API
    • 文档
    • 索引
    • 搜索
    • 汇总
    • 小结
    • 分布式
    • 本章总结
  • 分布式集群
    • 空集群
    • 集群健康
    • 添加索引
    • 容错移转
    • 横向扩展
    • 扩展
    • 故障恢复
  • 数据
    • 文档
    • 索引
    • Get
    • 存在
    • 更新
    • 创建
    • 删除
    • 版本控制
    • 局部更新
    • Mget
    • Bulk
    • 总结
  • 分布式文档存储
    • 路由
    • 主从互通
    • 创建索引删除
    • 获取
    • 局部更新
    • 批量请求
    • 批量格式
  • 搜索
    • 空白搜索
    • 多索引多类型
    • 分页
    • 查询语句
  • 映射与统计
    • Exact_vs_full_text
    • Inverted_index
    • Analysis
    • Mapping
    • Complex_datatypes
Powered by GitBook
On this page

Was this helpful?

  1. 分布式文档存储

主从互通

For explanation purposes, let's imagine that we have a cluster consisting of 3 nodes. It contains one index called blogs which has two primary shards. Each primary shard has two replicas. Copies of the same shard are never allocated to the same node, so our cluster looks something like <>.

[[img-distrib]] .A cluster with three nodes and one index image::images/04-01_index.png["A cluster with three nodes and one index"]

We can send our requests to any node in the cluster. Every node is fully capable of serving any request. Every node knows the location of every document in the cluster and so can forward requests directly to the required node. In the examples below, we will send all of our requests to Node 1, which we will refer to as the requesting node.

TIP: When sending requests, it is good practice to round-robin through all the nodes in the cluster, in order to spread the load.

Previous路由Next创建索引删除

Last updated 5 years ago

Was this helpful?