Skip to content

Instantly share code, notes, and snippets.

@bsao
Forked from reyjrar/elasticsearch.yml
Last active January 26, 2016 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsao/01f5ceaa98390f8a8cf3 to your computer and use it in GitHub Desktop.
Save bsao/01f5ceaa98390f8a8cf3 to your computer and use it in GitHub Desktop.
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# wget https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.1.1/elasticsearch-2.1.1.zip
# sudo unzip elasticsearch-2.1.1.zip -d /usr/local/elasticsearch
# cd /usr/local/elasticsearch/elasticsearch-2.1.1
# sudo bin/plugin install cloud-aws
# sudo chmod -R ugo+rw /usr/local/elasticsearch/elasticsearch-2.1.1
# vi config/elasticsearch.yml
# past content of this gist
# sudo vi /etc/security/limits.conf
# ec2-user soft memlock unlimited
# ec2-user hard memlock unlimited
# sudo file -s /dev/xvdb
# sudo mkdir /es
# sudo mkfs -t ext4 /dev/xvdb
# sudo mount /dev/xvdb /es
# cd /es
# sudo mkdir logs
# sudo mkdir data
# sudo chmod -R ugo+rw /es/logs
# sudo chmod -R ugo+rw /es/data
cluster.name: analytics
# Node can have abritrary attributes we can use for routing
node.master: true
node.data: true
node.datacenter: big-brother
# network config
network.bind_host: 0.0.0.0
network.publish_host: 0.0.0.0
network.public_host: 0.0.0.0
# plugin config
plugin.mandatory: cloud-aws
# Force all memory to be locked, forcing the JVM to never swap
bootstrap.mlockall: true
## Threadpool Settings ##
# Search pool
threadpool.search.type: fixed
threadpool.search.size: 20
threadpool.search.queue_size: 100
# Bulk pool
threadpool.bulk.type: fixed
threadpool.bulk.size: 60
threadpool.bulk.queue_size: 300
# Index pool
threadpool.index.type: fixed
threadpool.index.size: 20
threadpool.index.queue_size: 100
# Indices settings
indices.memory.index_buffer_size: 30%
indices.memory.min_shard_index_buffer_size: 12mb
indices.memory.min_index_buffer_size: 96mb
# Cache Sizes
indices.fielddata.cache.size: 15%
indices.fielddata.cache.expire: 6h
indices.cache.filter.size: 15%
indices.cache.filter.expire: 6h
# Indexing Settings for Writes
index.refresh_interval: 30s
index.translog.flush_threshold_ops: 50000
# aws config
cloud.aws.access_key: <key>
cloud.aws.secret_key: <key>
cloud.aws.region: us-east-1
# discovery settings
discovery.type: ec2
discovery.ec2.groups: vr-data-es
discovery.ec2.host_type: private_ip
discovery.zen.ping.multicast.enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment