# Configuration Management

**This chapter lists the static configuration items that can be modified in the console and the configuration items that can be dynamically updated through API.**

The console supports modifying common **static configuration** parameters to the elasticsearch.yml configuration file. These configurations do not support dynamic updates and need to restart the cluster after modification.

| Configuration item | Default value | Configuration description |
| ----- | ----- | ----- |
| cluster.name | instance_id | Cluster name |
| discovery.zen.ping.unicast.hosts | \[\] | Unicast address, default master node IP or the first three node IPs, example [127.0.0.1,127.0.0.2,127.0.0.3] |
| gateway.recover_after_nodes | N - 2 | Recovery can be performed when the expected number of nodes is reached |
| gateway.expected_nodes | N | Expected number of cluster nodes. When the expected number of nodes join the cluster, shard recovery will begin |
| gateway.recover_after_time | 5m | If the expected number of nodes is not reached, no attempt to recovery, and the recovery process will wait the configured time |
| http.cors.enabled | true | Allow cross-domain access |
| http.cors.allow-origin | \* | Domains that allow cross-domain access by default support all domains |
| rest.action.multi.allow_explicit_index | true | Allow the index parameter in the body to override the index parameter in the URL |
| node.attr.tag |   | Node tag, not set by default |
| gateway.expected_master_nodes | 0 | Expected number of master nodes in the cluster. When the expected number of masters join the cluster, shard recovery will begin |
| gateway.expected_data_nodes | 0 | Expected number of data nodes in the cluster. When the expected number of data nodes join the cluster, shard recovery will begin |
| gateway.recover_after_master_nodes | 0 | Recovery can be performed when the expected number of master nodes is reached |
| gateway.recover_after_data_nodes | 0 | Recovery can be performed when the expected number of data nodes is reached |
| http.max_content_length | 100mb | Maximum content of the HTTP request, default 100mb. If set to greater than Integer.MAX_VALUE, it will be reset to 100mb |
| http.max_initial_line_length | 4kb | Maximum length of the HTTP URL, default 4kb |
| http.max_header_size | 8kb | Maximum value of the allowed headers, default 8kb |
| http.compression | true | Supports compression as much as possible (using Accept-Encoding) |
| http.compression_level | 3 | Defines the compression level of the HTTP response. Valid values range between 1 (minimum compression) and 9 (maximum compression) |
| http.cors.max-age | 1728000 | Browser sends "preflight" requests to determine CORS settings. Max-age defines how long the result should be cached. Default is 20 days |
| http.cors.allow-methods | OPTIONS, HEAD, GET, POST, PUT, DELETE | Allowed methods |
| http.cors.allow-headers | X-Requested-With, Content-Type, Content-Length | Allowed headers |
| http.cors.allow-credentials | false | Whether the Access-Control-Allow-Credentials header should be returned. Note: This header will only be returned when set to true |
| http.detailed_errors.enabled | true | Enable or disable the output of detailed error messages and stack traces in response output. Note: If set to false, and the error_trace request parameter is specified, an error will be returned; when error_trace is not specified, a simple message will be returned |
| http.pipelining | true | Enable or disable HTTP pipelining |
| http.pipelining.max_events | 10000 | Maximum number of events queued in memory before an HTTP connection closes |
| indices.fielddata.cache.size | unlimited | Maximum value of field data cache, for example, 30% of node heap space, or absolute value, like 12GB |
| indices.queries.cache.size | 10% | Controls the memory size of the filter cache, default 10%. Accepts percentage values (such as 5%) or precise values (such as 512mb) |
| index.queries.cache.enabled | true | Controls whether to enable the query cache, the setting can be on the basis of each configurable index setting |
| indices.memory.index_buffer_size | 10% | Accepts percentage or byte size value. Default 10%, meaning that 10% of the total heap allocated to the node will be used as the shared index buffer across all shards |
| indices.memory.min_index_buffer_size | 48mb | If specifying index_buffer_size as a percentage, you can use this setting to specify the absolute minimum |
| indices.memory.max_index_buffer_size | unlimited | If you specify index_buffer_size as a percentage, you can use this setting to specify the absolute maximum |
| indices.requests.cache.size | 1% | Cache is managed at the node level, default maximum is 1% of heap |
| node.ingest | true | Ingest qualifications |
| search.remote.connect | true | Cross-cluster search |
| index.number_of_shards | 5 | Number of primary shards an index should have, this setting can be dynamically set when creating the index |
| index.shard.check_on_startup | false | Whether to check for damage before opening the shard; when damage is detected, it will prevent the shard from being opened |
| index.routing_partition_size | 1 | Number of shards a custom routing value can go to, default 1, can only be set when creating the index. This value must be less than index.number_of_shards unless the value of index.number\_of\_shards is also 1 |

  - **Note:** N is the number of nodes

Most of the configuration items not listed above can be dynamically modified through [cluster-update-settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html). For a detailed description of the dynamic configuration items, please refer to [Modules](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules.html)

Below are common **dynamically updatable** configuration parameters.

| Configuration item | Default value | Configuration description |
| ----- | ----- | ----- |
| cluster.routing.allocation.enable | all | Enable or disable allocation of specific kinds of shards |
| cluster.routing.allocation.node_concurrent_incoming_recoveries | 2 | How many concurrent incoming shard recoveries are allowed to occur on a node |
| cluster.routing.allocation.node_concurrent_outgoing_recoveries | 2 | How many concurrent outgoing shard recoveries are allowed to occur on a node |
| cluster.routing.allocation.node_concurrent_recoveries | 2 | Shortcut setting for node_concurrent_incoming_recoveries and node_concurrent_outgoing_recoveries |
| cluster.routing.allocation.node_initial_primaries_recoveries | 4 | After the node starts, recovery of unassigned master nodes will use data on the local disk |
| cluster.routing.allocation.same_shard.host | false | Allows to check for allocating multiple instances of the same shard on a single host |
| cluster.routing.rebalance.enable | all | Enable or disable rebalancing of specific kinds of shards |
| cluster.routing.allocation.allow_rebalance | indices_all_active | Specifies when shard rebalancing is allowed |
| cluster.routing.allocation.cluster_concurrent_rebalance | 2 | Allows control of how many concurrent shard rebalances are allowed for the cluster-wide |
| cluster.routing.allocation.balance.shard | 0.45f | Defines the weight factor for the total number of shards allocated on the node (floating point number) |
| cluster.routing.allocation.balance.index | 0.55f | Defines the weight factor for the number of shards of each index allocated on a specific node (floating point number) |
| cluster.routing.allocation.balance.threshold | 1.0f | The minimum optimization value (non-negative floating point number) for the action should be performed |
| cluster.routing.allocation.disk.threshold_enabled | true | Set to false to disable the disk allocation decider |
| cluster.routing.allocation.disk.watermark.low | 85％ | Controls the low watermark of disk usage, default 85％. Beyond that, ES will not allocate new shards to the node |
| cluster.routing.allocation.disk.watermark.high | 90% | Controls the high watermark, default 90％. Beyond that, ES will try to relocate shards to another node |
| cluster.routing.allocation.disk.watermark.flood_stage | 95% | Controls flood stage, default 95％, beyond which ES forces a read-only index block on each index of one or multiple shards allocated on a node where at least one disk is exceeded. Once there is enough disk space available for index operations to continue, the index block must be manually released |
| cluster.info.update.interval | 30s | ES should check the disk usage of each node in the cluster |
| cluster.routing.allocation.disk.include_relocations | true | ES will consider the shards currently being relocated to the target node when calculating the disk usage of the node |
| cluster.routing.allocation.awareness.attributes.\* |   | Shard allocation awareness settings allow you to tell ES about your hardware configuration |
| cluster.routing.allocation.include.{attribute} |   | Allocate shards to nodes with at least one comma-separated value for {attribute}, attribute could be _name, _ip, _host |
| cluster.routing.allocation.require.{attribute} |   | Only assign shards to nodes that have all comma-separated values for {attribute}, attribute might be _name, _ip, _host |
| cluster.routing.allocation.exclude.{attribute} |   | Don't assign shards to nodes without the comma-separated values for {attribute}, attribute might be _name, _ip, _host |
| cluster.blocks.read_only | false | Makes the entire cluster read-only (index does not accept write operations), data is not allowed to be modified (create or delete the index) |
| cluster.blocks.read_only_allow_delete | false | The same as cluster.blocks.read_only, but allows index deletion to free up resources |
| cluster.indices.tombstones.size | 500 | The cluster status maintains index tombstones to explicitly represent deleted indexes |
| logger.org.elasticsearch.indices.recovery | INFO | Log recording level |
| discovery.zen.ping.unicast.hosts.resolve_timeout | 5s | Wait time for DNS lookup before each round of ping |
| discovery.zen.ping_timeout | 3s | Ping timeout time |
| discovery.zen.join_timeout | 60s | Default timeout is 20 times the ping timeout |
| discovery.zen.minimum_master_nodes | N/2 + 1 | Minimum number of master node qualifications, N is the number of master nodes |
| discovery.zen.no_master_block | write | A setting that controls which operations should be rejected when there is no active master node, default is write |
| indices.breaker.total.limit | 70% | Starting limit of the overall parent breaker, default is 70% of JVM heap |
| indices.breaker.fielddata.limit | 60% | Limit of the fielddata breaker, default is 60% of JVM heap |
| indices.breaker.fielddata.overhead | 1.03 | A constant, all fielddata estimates are multiplied to decide the final estimate |
| indices.breaker.request.limit | 60% | Limit of the request breaker, default is 60% of JVM heap |
| indices.breaker.request.overhead | 1 | A constant, all request estimates are multiplied to decide the final estimate |
| network.breaker.inflight_requests.limit | 100% | Limit of the inflight_requests breaker, default is 100% of JVM heap |
| network.breaker.inflight_requests.overhead | 1 | A constant, all inflight requests estimates are multiplied to decide the final |
| script.max_compilations_rate | 75/5m | Limit of the number of unique dynamic scripts allowed to be compiled within a certain interval |
| index.requests.cache.enable | true | Enable or disable index cache |
| indices.recovery.max_bytes_per_sec | 40mb | Maximum bandwidth for data transmission between nodes |
| indices.store.throttle.max_bytes_per_sec | 20mb | Maximum bandwidth for writing to disk |
| index.merge.scheduler.max_thread_count |   | Maximum number of threads for index merge, default is max(1, min(4, availableProcessors / 2)) |
| index.number_of_replicas | 1 | Number of replicas each primary shard has |
| index.auto_expand_replicas | default is false (i.e, disabled) | Automatically expands the number of replicas according to the number of available nodes. Set to a range delimited by a hyphen for the lower and upper limit (e.g., 0-5) |
| index.refresh_interval | 1s | How often to perform a refresh operation, which makes the recent changes to the index visible for search. Can be set to -1 to disable refresh |
| index.max_result_window | 10000 | The maximum value of from + size for searching the index |
| index.max_inner_result_window | 100 | The maximum value of from + size for internal hits defined and top aggregated to this index |
| index.max_rescore_window | 10000 | Maximum window_size for rescore requests used for searching this index. Default is index.max_result_window |
| index.max_docvalue_fields_search | 100 | Maximum number of docvalue_fields_allowed in a query |
| index.max_script_fields | 32 | Maximum number of script_fields allowed in a query |
| index.max_ngram_diff | 1 | Maximum allowed difference between min_gram and max_gram for NGramTokenizer and NGramTokenFilter |
| index.max_shingle_diff | 3 | Maximum allowed difference between max_shingle_size and min_shingle_size |
| index.blocks.read_only | false | Set to true to make the index and index data read-only, otherwise allow write and data changes |
| index.blocks.read_only_allow_delete | false | The same as index.blocks.read_only, but allows index deletion to free up resources |
| index.blocks.read | false | Set to true to disallow read operations on the index |
| index.blocks.write | false | Set to true to disallow write operations on the index |
| index.blocks.metadata | false | Set to true to disable reading and writing of index data |
| index.max_refresh_listeners |   | The maximum number of refresh listeners available on each shard of the index. These listeners are used to implement refresh = wait\_for |
