When you make a configuration change on Amazon’s Elasticsearch, it does a blue/green deployment. So new nodes will be allocated to the cluster (which you will notice from CloudWatch when looking at the nodes metrics). Once these nodes are deployed, data gets copied accross to the new nodes, and traffic gets directed to the new nodes, and once its done, the old nodes gets terminated.
Note: While there will be more nodes in the cluster, you will not get billed for the extra nodes.
While this process is going, you can monitor your cluster to see the progress:
The Shards API:
Using the /_cat/shards
API, you will find that the shards are in a RELOCATING state (keeping in mind, this is when the change is still busy)
1 2 3 4 5 6 7 8 9 10 11 12 |
|
The Recovery API:
We can then use the /_cat/recovery
API, which will show the progress of the shards transferring to the other nodes, you will find the following:
index, shard, time, type, stage, source_host, target_host, files, files_percent, bytes, bytes_percent
As Amazon masks their node ip addresses, we will find that the ips are not available. To make it more human readable, we will only pass the columns that we are interested in and not to show the shards that has been set to done
:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
We can also see the human readable output, which is displayed in json format, with much more detail:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
The Cluster Health API:
Amazon restricts most of the /_cluster
API actions, but we can however see the health endpoint, where we can see the number of nodes
, active_shards
, relocating_shards
, number_of_pending_tasks
etc:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
The Pending Tasks API:
We also have some insights into the /_cat/pending_tasks
API:
1 2 3 |
|