Last active
August 29, 2015 14:14
-
-
Save up1/4920d0dd56e9a3088736 to your computer and use it in GitHub Desktop.
Scaling Elasticsearch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# As it is a name used to identify clusters, use a name with uniqueness and a meaning. | |
cluster.name: ElasticSearch-cluster | |
# A node name is automatically created but it is recommended to use a name that is discernible in a cluster like a host name. | |
node.name: "Elasticsearch.my01" | |
# The default value of the following two is all true. node.master sets whether the node can be the master, while node.data is a configuration for whether it is a node to store data. Usually you need to set the two values as true, and if the size of a cluster is big, you should adjust this value by node to configure three types of node. More details will be explained in the account of topologies configuration later. | |
node.master: true | |
node.data: true | |
# You can change the number of shards and replicas. The following value is a default value: | |
index.number_of_shards: 10 | |
index.number_of_replicas: 1 | |
#To prevent jvm swapping, you should set the following value as true: | |
bootstrap.mlockall: true | |
# It is a timeout value for checking the status of each node in a cluster. You should set an appropriate value; if the value is too small, nodes may frequently get out of a cluster. The default value is 3 seconds. | |
discovery.zen.ping.timeout: 10s | |
# The default value is multicast, but in an actual environment, unicast should be employed due to the possibility of overlapping with other clusters. It is recommended to list servers that can be a master in the second setting. | |
discovery.zen.ping.multicast.enabled: false | |
discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT /log-2015-02-05 | |
{ | |
"settings": { | |
"number_of_shards": 10, | |
"number_of_replicas": 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment