Amazon ES replication and refresh interval

0

A customer wants to build Amazon ES cluster for internal usage with No Replication and Refresh interval as -1. Are these configurations possible with Amazon ES?

AWS
gefragt vor 4 Jahren222 Aufrufe
1 Antwort
0
Akzeptierte Antwort

Yes, This can be done by setting Replica to 0 for indices manually or by defining template (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html) The default Index configuration for Amazon ES (+2 node) has 5 shards and 1 replica. The Refresh interval can also be set to -1 by APIs. With this, even with multiple nodes, your ES cluster will stay in yellow state.

Amazon ES supports open source ES rest APIs. This can be done by running simple API as shown below.

 curl  -XPUT 'https://vpc-domain01-aaaaaaaaaa.us-west-2.es.amazonaws.com/index-name/_settings' -H 'Content-Type: application/json' -d '
{
 "index" : {
       "refresh_interval" : -1
    }
}'

Similarly you can create template to to disable replicas :

  curl –XPUT https://vpc-domain01-aaaaaaaaaa.us-west-2.es.amazonaws.com/_template/template1 -d 
'{
"template": "logs*",
"settings": 
  {
"index" : 
    {
"number_of_shards": 1,
"number_of_replicas": 0,

    }
  }
}'

This cannot be done directly throught CloudFormation, You have to build init type with EC2 instance to run APIs . https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-init.html

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen