首页  

elasticsearch aerospike kafka副本数设置     所属分类 elasticsearch 浏览量 1308
elasticsearch

创建一个 0个副本的索引 (总共一份数据)
curl -X PUT http://127.0.0.1:9200/myindex01?pretty -d '{"settings":{"number_of_shards":1,"number_of_replicas":0}}'
number_of_replicas 0


http://127.0.0.1:9200/_cat/indices?v

health status index     uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   bank      k0hpKiOGQFWeKwnuTQy-2w   5   1       1000            0    648.8kb        648.8kb
yellow open   test      YGsusI2yRd6TO2kmWxWlJQ   5   1          4            0     13.6kb         13.6kb
yellow open   customer  mM1NFtikQbm9WxOgVAzbag   5   1          1            0      3.9kb          3.9kb
green  open   myindex01 TAaTzqT2SYKkx1hR2FXWBg   1   0          0            0       130b           130b
yellow open   twitter   bcEq0dp3TuiWPZTkLn65Kw   5   1          4            0     17.1kb         17.1kb

myindex01 状态为绿色

http://127.0.0.1:9200/myindex01

{
    "myindex01": {
        "aliases": {},
        "mappings": {},
        "settings": {
            "index": {
                "creation_date": "1547627465305",
                "number_of_shards": "1",
                "number_of_replicas": "0",
                "uuid": "TAaTzqT2SYKkx1hR2FXWBg",
                "version": {
                    "created": "5000299"
                },
                "provided_name": "myindex01"
            }
        }
    }
}


aerospike

namespace ns1 {
  replication-factor 1
  memory-size 16G
  default-ttl 30d # 30 days, use 0 to never expire/evict.
  #storage-engine memory
  transaction-pending-limit 0
  storage-engine device {         
          file /opt/aerospike/data1.dat   
          filesize 128G               
          data-in-memory true            
  }
}

replication-factor 1 
总共1份数据


kafka

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 3 --topic test    

replication-factor 3   (总共3分数据)

replication-factor 0 会报错
kafka.admin.AdminOperationException: replication factor must be larger than 0

上一篇     下一篇
elasticsearch5.0索引监控

elasticsearch5.0索引状态管理

线上故障处理

kafka副本机制

网络杠精定律

ELKstack中文指南之elasticsearch架构原理