ES 学习笔记

1 基本概念:

cluster – An Elasticsearch cluster consists of one or more nodes and is identifiable by its cluster name.

node – A single Elasticsearch instance. In most environments, each node runs on a separate box or virtual machine.

index – In Elasticsearch, an index is a collection of documents.

shard – Because Elasticsearch is a distributed search engine, an index is usually split into elements known as shards that are distributed across multiple nodes. Elasticsearch automatically manages the arrangement of these shards. It also rebalances the shards as necessary, so users need not worry about the details.

replica – By default, Elasticsearch creates five primary shards and one replica for each index. This means that each index will consist of five primary shards, and each shard will have one copy.

 

ES的基本架构:

ElasticSearch架构图

1.Gateway

  1. gateway是ES数据存储的格式
  2. 可以使用hdfs,本地,亚马逊的s3等多种存储方式
  3. 存储索引信息,集群信息,mapping, 索引碎片信息,以及transaction logs

2.Distributed Lucene Directory

  1. Lucene框架 es就是基于Lucene框架开发的
  2. Lucene框架服发现等

3.Index Module

  1. 创建索引的模块

4.Search Module

  1. 搜索模块

5.Mapping

  1. 相当于mysql里的schema

6.river

  1. 从外部获取异构数据 来创建索引

7.Discovery

  1. 节点启动后会互相ping 根据在es.yml配置文件里找到对应的端口
  2. 进行开始选举,从各个节点任务的master中选,进行id字典排序,选择第一个
  3. 如果各个节点上都没有认为的master, 那么就从所有节点中选择
  4. 如果就一个节点 那么master就是她自己
  5. ES支持任意数目的集群,通过一个规则,只要所有的节点都遵循同样的规则,得到的信息都是对等的,选出来的主节点肯定是一致的. 但分布式系统的问题就出在信息不对等的情况,这时候很容易出现脑裂(Split-Brain)的问题,大多数解决方案就是设置一个quorum值,要求可用节点必须大于quorum(一般是超过半数节点),才能对外提供服务。而 Elasticsearch 中,这个quorum的配置就是 discovery.zen.minimum_master_nodes

8.Scriptsing

  1. 脚本执行功能 对查询出来的数据进行处理
  2. 支持多种语言

9.3rdplugins

  1. 支持安装第三方插件

10. transport

  1. 是支持的协议类型 默认使用http进行交互
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

惹不起的程咬金

来都来了,不赏点银子么

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值