Why is my single node AWS-AMI Graylog 2.0 server generating replicas without assigning them?
Elasticsearch indexes default to have a single replica. However, you cannot allocate a shard replica with only a single node.
If you could, then the replica would be on the same machine and doubling down to use the same memory, twice. That's not at all what you want, so it simply does not allocate.
how do I best respond that doesn't require regular replica clearing?
The general approach is to either:
- Modify an application setting wherever the index is created to change the number of replicas that it uses. Not all applications provide a setting to do this and it's completely dependent on their setup.
- Change any existing template to not expect a replica.
- This implies that the template won't be replaced by the system that put it there (again, depends on the system).
- Create a global template that defaults the number of replicas to
0
.
In the case of the template, the difference between the second and third option is how global the template
is:
{
"template" : "*",
"settings" : {
"number_of_replicas" : 0
}
}
Note: you should not set global mappings, but global settings are perfectly fine.