ES Configurations 发表于 2019-08-29 | 分类于 ELK , ES ShardsModify the default number of shards1234567891011121314151617181920PUT http://localhost:9200/_template/index_defaults { "index_patterns": "*", "settings": { "number_of_shards": 3, "number_of_replicas": 0, "index.refresh_interval":"15s", "index.translog": { "sync_interval": "120s", "durability": "async", "flush_threshold_size":"1g" } }}# curl -XPOST -H "Content-Type:application/json" -d '{"template":"*","settings":{"number_of_shards":1}}' http://elasticsearch-client-service:9200/_template/default# curl -XPOST -H "Content-Type:application/json" -d '{"template":"*","settings":{"number_of_shards":3,"number_of_replicas":0,"index.refresh_interval":"60s","index.translog":{"sync_interval":"120s","durability":"async","flush_threshold_size":"1g"}}}' http://elasticsearch-client-service:9200/_template/default# https://www.jianshu.com/p/f0e9ab2a47fe# https://www.objectrocket.com/blog/elasticsearch/clustered-elasticsearch-best-practices/# https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html