AWS elasticSearch master config - suguanyu/WechatTinyProgram GitHub Wiki

About Dedicated Master Nodes

Amazon Elasticsearch Service (Amazon ES) uses dedicated master nodes to increase cluster stability. A dedicated master node is a cluster node that performs cluster management tasks, but does not hold data or respond to data upload requests. This offloading of cluster management tasks increases the stability of your Elasticsearch clusters.

Note We recommend that you allocate three dedicated master nodes for each Amazon ES domain in production. A dedicated master node performs the following cluster management tasks:

Tracks all nodes in the cluster Tracks the number of indices in the cluster Tracks the number of shards belonging to each index Maintains routing information for nodes in the cluster Updates the cluster state after state changes, such as creating an index and adding or removing nodes in the cluster Replicates changes to the cluster state across all nodes in the cluster Monitors the health of all cluster nodes by sending heartbeat signals, periodic signals that monitor the availability of the data nodes in the cluster

AWS elasticSearch Service setting

For Dedicated master instance count, choose the number of instances for the dedicated master node. We recommend choosing an odd number of instances to avoid potential Amazon ES issues, such as the split brain issue. The default and recommended number is three.

http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomains-configure-cluster

Master instance type chosen

http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html#es-managedomains-dedicatedmasternodes

Enabling Zone Awareness (Console)

Each AWS Region is a separate geographic area with multiple, isolated locations known as Availability Zones. To prevent data loss and minimize downtime in the event of node and data center failure, you can use the Amazon ES console to allocate nodes and replica index shards that belong to an Elasticsearch cluster across two Availability Zones in the same region. This allocation is known as zone awareness. If you enable zone awareness, you also must use the native Elasticsearch API to create replica shards for your cluster. Amazon ES distributes the replicas across the nodes in the Availability Zones, which increases the availability of your cluster. Enabling zone awareness for a cluster slightly increases network latencies.

Important Zone awareness requires an even number of instances in the instance count. The default configuration for any index is a replica count of 1. If you specify a replica count of 0 for an index, zone awareness doesn't replicate the shards to the second Availability Zone. Without replica shards, there are no replicas to distribute to a second Availability Zone, and enabling the feature doesn't provide protection from data loss. The following illustration shows a four-node cluster with zone awareness enabled. The service places all the primary index shards in one Availability Zone and all the replica shards in the second Availability Zone.

To enable zone awareness (console)

Go to https://aws.amazon.com, and then choose Sign In to the Console.

Under Analytics, choose Elasticsearch Service.

In the navigation pane, under My domains, choose your Amazon ES domain.

Choose Configure cluster.

In the Node configuration pane, choose Enable zone awareness.

Choose Submit.

For more information, see Regions and Availability Zones in the EC2 documentation.