ElasticSearch名詞理解

cluster

node

index

type

Shards

An index can potentially store a large amount of data that can exceed the hardware limits of a single node. For example, a single index of a billion documents taking up 1TB of disk space may not fit on the disk of a single node or may be too slow to serve search requests from a single node alone.

To solve this problem, Elasticsearch provides the ability to subdivide your index into multiple pieces called shards

Sharding is important for two primary reasons:

It allows you to horizontally split/scale your content volume
It allows you to distribute and parallelize operations across shards (potentially on multiple nodes) thus increasing performance/throughput

Replicas

In a network/cloud environment where failures can be expected anytime, it is very useful and highly recommended to have a failover mechanism in case a shard/node somehow goes offline or disappears for whatever reason. To this end, Elasticsearch allows you to make one or more copies of your index’s shards into what are called replica shards, or replicas for short.

Replication is important for two primary reasons:

It provides high availability in case a shard/node fails. For this reason, it is important to note that a replica shard is never allocated on the same node as the original/primary shard that it was copied from.
It allows you to scale out your search volume/throughput since searches can be executed on all replicas in parallel.

After the index is created, you may change the number of replicas dynamically anytime but you cannot change the number of shards after-the-fact.

By default, each index in Elasticsearch is allocated 5 primary shards and 1 replica which means that if you have at least two nodes in your cluster, your index will have 5 primary shards and another 5 replica shards (1 complete replica) for a total of 10 shards per index.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末砾隅,一起剝皮案震驚了整個(gè)濱河市债蜜,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌寻定,老刑警劉巖,帶你破解...
    沈念sama閱讀 219,539評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件琅锻,死亡現(xiàn)場離奇詭異向胡,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)滚秩,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,594評論 3 396
  • 文/潘曉璐 我一進(jìn)店門郁油,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人桐腌,你說我怎么就攤上這事“刚荆” “怎么了?”我有些...
    開封第一講書人閱讀 165,871評論 0 356
  • 文/不壞的土叔 我叫張陵承边,是天一觀的道長石挂。 經(jīng)常有香客問我,道長富岳,這世上最難降的妖魔是什么拯腮? 我笑而不...
    開封第一講書人閱讀 58,963評論 1 295
  • 正文 為了忘掉前任,我火速辦了婚禮萝喘,結(jié)果婚禮上狼电,老公的妹妹穿的比我還像新娘弦蹂。我一直安慰自己,他們只是感情好凸椿,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,984評論 6 393
  • 文/花漫 我一把揭開白布脑漫。 她就那樣靜靜地躺著,像睡著了一般优幸。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上羹饰,一...
    開封第一講書人閱讀 51,763評論 1 307
  • 那天,我揣著相機(jī)與錄音笑旺,去河邊找鬼。 笑死馍资,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的鸟蟹。 我是一名探鬼主播,決...
    沈念sama閱讀 40,468評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼锦针!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起奈搜,我...
    開封第一講書人閱讀 39,357評論 0 276
  • 序言:老撾萬榮一對情侶失蹤馋吗,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后宏粤,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,850評論 1 317
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡来农,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,002評論 3 338
  • 正文 我和宋清朗相戀三年沃于,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片繁莹。...
    茶點(diǎn)故事閱讀 40,144評論 1 351
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡特幔,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出雪标,到底是詐尸還是另有隱情,我是刑警寧澤村刨,帶...
    沈念sama閱讀 35,823評論 5 346
  • 正文 年R本政府宣布嵌牺,位于F島的核電站,受9級特大地震影響逆粹,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜僻弹,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,483評論 3 331
  • 文/蒙蒙 一蹋绽、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧卸耘,春花似錦、人聲如沸侈百。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,026評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽锭魔。三九已至,卻和暖如春赂毯,著一層夾襖步出監(jiān)牢的瞬間拣宰,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,150評論 1 272
  • 我被黑心中介騙來泰國打工膛堤, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留晌该,地道東北人绿渣。 一個(gè)月前我還...
    沈念sama閱讀 48,415評論 3 373
  • 正文 我出身青樓中符,卻偏偏與公主長得像誉帅,于是被迫代替她去往敵國和親淀散。 傳聞我的和親對象是個(gè)殘疾皇子蚜锨,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,092評論 2 355

推薦閱讀更多精彩內(nèi)容