- Elasticsearch Guide: other versions:
- What is Elasticsearch?
- What’s new in 7.15
- Quick start
- Set up Elasticsearch
- Installing Elasticsearch
- Configuring Elasticsearch
- Important Elasticsearch configuration
- Secure settings
- Auditing settings
- Circuit breaker settings
- Cluster-level shard allocation and routing settings
- Cross-cluster replication settings
- Discovery and cluster formation settings
- Field data cache settings
- Index lifecycle management settings
- Index management settings
- Index recovery settings
- Indexing buffer settings
- License settings
- Local gateway settings
- Logging
- Machine learning settings
- Monitoring settings
- Node
- Networking
- Node query cache settings
- Search settings
- Security settings
- Shard request cache settings
- Snapshot lifecycle management settings
- Transforms settings
- Thread pools
- Watcher settings
- Advanced configuration
- Important system configuration
- Bootstrap Checks
- Heap size check
- File descriptor check
- Memory lock check
- Maximum number of threads check
- Max file size check
- Maximum size virtual memory check
- Maximum map count check
- Client JVM check
- Use serial collector check
- System call filter check
- OnError and OnOutOfMemoryError checks
- Early-access check
- G1GC check
- All permission check
- Discovery configuration check
- Bootstrap Checks for X-Pack
- Starting Elasticsearch
- Stopping Elasticsearch
- Discovery and cluster formation
- Add and remove nodes in your cluster
- Full-cluster restart and rolling restart
- Remote clusters
- Set up X-Pack
- Configuring X-Pack Java Clients
- Plugins
- Upgrade Elasticsearch
- Index modules
- Mapping
- Text analysis
- Overview
- Concepts
- Configure text analysis
- Built-in analyzer reference
- Tokenizer reference
- Token filter reference
- Apostrophe
- ASCII folding
- CJK bigram
- CJK width
- Classic
- Common grams
- Conditional
- Decimal digit
- Delimited payload
- Dictionary decompounder
- Edge n-gram
- Elision
- Fingerprint
- Flatten graph
- Hunspell
- Hyphenation decompounder
- Keep types
- Keep words
- Keyword marker
- Keyword repeat
- KStem
- Length
- Limit token count
- Lowercase
- MinHash
- Multiplexer
- N-gram
- Normalization
- Pattern capture
- Pattern replace
- Phonetic
- Porter stem
- Predicate script
- Remove duplicates
- Reverse
- Shingle
- Snowball
- Stemmer
- Stemmer override
- Stop
- Synonym
- Synonym graph
- Trim
- Truncate
- Unique
- Uppercase
- Word delimiter
- Word delimiter graph
- Character filters reference
- Normalizers
- Index templates
- Data streams
- Ingest pipelines
- Example: Parse logs
- Enrich your data
- Processor reference
- Append
- Bytes
- Circle
- Community ID
- Convert
- CSV
- Date
- Date index name
- Dissect
- Dot expander
- Drop
- Enrich
- Fail
- Fingerprint
- Foreach
- GeoIP
- Grok
- Gsub
- HTML strip
- Inference
- Join
- JSON
- KV
- Lowercase
- Network direction
- Pipeline
- Registered domain
- Remove
- Rename
- Script
- Set
- Set security user
- Sort
- Split
- Trim
- Uppercase
- URL decode
- URI parts
- User agent
- Aliases
- Search your data
- Query DSL
- Aggregations
- Bucket aggregations
- Adjacency matrix
- Auto-interval date histogram
- Children
- Composite
- Date histogram
- Date range
- Diversified sampler
- Filter
- Filters
- Geo-distance
- Geohash grid
- Geotile grid
- Global
- Histogram
- IP range
- Missing
- Multi Terms
- Nested
- Parent
- Range
- Rare terms
- Reverse nested
- Sampler
- Significant terms
- Significant text
- Terms
- Variable width histogram
- Subtleties of bucketing range fields
- Metrics aggregations
- Pipeline aggregations
- Average bucket
- Bucket script
- Bucket count K-S test
- Bucket correlation
- Bucket selector
- Bucket sort
- Cumulative cardinality
- Cumulative sum
- Derivative
- Extended stats bucket
- Inference bucket
- Max bucket
- Min bucket
- Moving average
- Moving function
- Moving percentiles
- Normalize
- Percentiles bucket
- Serial differencing
- Stats bucket
- Sum bucket
- Bucket aggregations
- EQL
- SQL
- Overview
- Getting Started with SQL
- Conventions and Terminology
- Security
- SQL REST API
- SQL Translate API
- SQL CLI
- SQL JDBC
- SQL ODBC
- SQL Client Applications
- SQL Language
- Functions and Operators
- Comparison Operators
- Logical Operators
- Math Operators
- Cast Operators
- LIKE and RLIKE Operators
- Aggregate Functions
- Grouping Functions
- Date/Time and Interval Functions and Operators
- Full-Text Search Functions
- Mathematical Functions
- String Functions
- Type Conversion Functions
- Geo Functions
- Conditional Functions And Expressions
- System Functions
- Reserved keywords
- SQL Limitations
- Scripting
- Data management
- ILM: Manage the index lifecycle
- Overview
- Concepts
- Automate rollover
- Customize built-in ILM policies
- Index lifecycle actions
- Configure a lifecycle policy
- Migrate index allocation filters to node roles
- Troubleshooting index lifecycle management errors
- Start and stop index lifecycle management
- Manage existing indices
- Skip rollover
- Restore a managed data stream or index
- Autoscaling
- Monitor a cluster
- Roll up or transform your data
- Set up a cluster for high availability
- Snapshot and restore
- Secure the Elastic Stack
- Elasticsearch security principles
- Configuring security
- Updating node security certificates
- User authentication
- Built-in users
- Service accounts
- Internal users
- Token-based authentication services
- Realms
- Realm chains
- Active Directory user authentication
- File-based user authentication
- LDAP user authentication
- Native user authentication
- OpenID Connect authentication
- PKI user authentication
- SAML authentication
- Kerberos authentication
- Integrating with other authentication systems
- Enabling anonymous access
- Controlling the user cache
- Configuring SAML single-sign-on on the Elastic Stack
- Configuring single sign-on to the Elastic Stack using OpenID Connect
- User authorization
- Built-in roles
- Defining roles
- Security privileges
- Document level security
- Field level security
- Granting privileges for data streams and aliases
- Mapping users and groups to roles
- Setting up field and document level security
- Submitting requests on behalf of other users
- Configuring authorization delegation
- Customizing roles and authorization
- Enable audit logging
- Restricting connections with IP filtering
- Securing clients and integrations
- Operator privileges
- Troubleshooting
- Some settings are not returned via the nodes settings API
- Authorization exceptions
- Users command fails due to extra arguments
- Users are frequently locked out of Active Directory
- Certificate verification fails for curl on Mac
- SSLHandshakeException causes connections to fail
- Common SSL/TLS exceptions
- Common Kerberos exceptions
- Common SAML issues
- Internal Server Error in Kibana
- Setup-passwords command fails due to connection failure
- Failures due to relocation of the configuration files
- Limitations
- Watcher
- Command line tools
- How to
- REST APIs
- API conventions
- Autoscaling APIs
- Compact and aligned text (CAT) APIs
- cat aliases
- cat allocation
- cat anomaly detectors
- cat count
- cat data frame analytics
- cat datafeeds
- cat fielddata
- cat health
- cat indices
- cat master
- cat nodeattrs
- cat nodes
- cat pending tasks
- cat plugins
- cat recovery
- cat repositories
- cat segments
- cat shards
- cat snapshots
- cat task management
- cat templates
- cat thread pool
- cat trained model
- cat transforms
- Cluster APIs
- Cluster allocation explain
- Cluster get settings
- Cluster health
- Cluster reroute
- Cluster state
- Cluster stats
- Cluster update settings
- Nodes feature usage
- Nodes hot threads
- Nodes info
- Nodes reload secure settings
- Nodes stats
- Pending cluster tasks
- Remote cluster info
- Task management
- Voting configuration exclusions
- Cross-cluster replication APIs
- Data stream APIs
- Document APIs
- Enrich APIs
- EQL APIs
- Features APIs
- Fleet APIs
- Find structure API
- Graph explore API
- Index APIs
- Alias exists
- Aliases
- Analyze
- Analyze index disk usage
- Clear cache
- Clone index
- Close index
- Create index
- Create or update alias
- Create or update component template
- Create or update index template
- Create or update index template (legacy)
- Delete component template
- Delete dangling index
- Delete alias
- Delete index
- Delete index template
- Delete index template (legacy)
- Exists
- Field usage stats
- Flush
- Force merge
- Freeze index
- Get alias
- Get component template
- Get field mapping
- Get index
- Get index settings
- Get index template
- Get index template (legacy)
- Get mapping
- Import dangling index
- Index recovery
- Index segments
- Index shard stores
- Index stats
- Index template exists (legacy)
- List dangling indices
- Open index
- Refresh
- Resolve index
- Rollover
- Shrink index
- Simulate index
- Simulate template
- Split index
- Synced flush
- Type exists
- Unfreeze index
- Update index settings
- Update mapping
- Index lifecycle management APIs
- Ingest APIs
- Info API
- Licensing APIs
- Logstash APIs
- Machine learning anomaly detection APIs
- Add events to calendar
- Add jobs to calendar
- Close jobs
- Create jobs
- Create calendars
- Create datafeeds
- Create filters
- Delete calendars
- Delete datafeeds
- Delete events from calendar
- Delete filters
- Delete forecasts
- Delete jobs
- Delete jobs from calendar
- Delete model snapshots
- Delete expired data
- Estimate model memory
- Find file structure
- Flush jobs
- Forecast jobs
- Get buckets
- Get calendars
- Get categories
- Get datafeeds
- Get datafeed statistics
- Get influencers
- Get jobs
- Get job statistics
- Get machine learning info
- Get model snapshots
- Get overall buckets
- Get scheduled events
- Get filters
- Get records
- Open jobs
- Post data to jobs
- Preview datafeeds
- Reset jobs
- Revert model snapshots
- Set upgrade mode
- Start datafeeds
- Stop datafeeds
- Update datafeeds
- Update filters
- Update jobs
- Update model snapshots
- Upgrade model snapshots
- Machine learning data frame analytics APIs
- Create data frame analytics jobs
- Create or update trained model aliases
- Create trained models
- Update data frame analytics jobs
- Delete data frame analytics jobs
- Delete trained models
- Delete trained model aliases
- Evaluate data frame analytics
- Explain data frame analytics
- Get data frame analytics jobs
- Get data frame analytics jobs stats
- Get trained models
- Get trained models stats
- Preview data frame analytics
- Start data frame analytics jobs
- Stop data frame analytics jobs
- Migration APIs
- Node lifecycle APIs
- Reload search analyzers API
- Repositories metering APIs
- Rollup APIs
- Script APIs
- Search APIs
- Searchable snapshots APIs
- Security APIs
- Authenticate
- Change passwords
- Clear cache
- Clear roles cache
- Clear privileges cache
- Clear API key cache
- Clear service account token caches
- Create API keys
- Create or update application privileges
- Create or update role mappings
- Create or update roles
- Create or update users
- Create service account tokens
- Delegate PKI authentication
- Delete application privileges
- Delete role mappings
- Delete roles
- Delete service account token
- Delete users
- Disable users
- Enable users
- Get API key information
- Query API key information
- Get application privileges
- Get builtin privileges
- Get role mappings
- Get roles
- Get service accounts
- Get service account credentials
- Get token
- Get user privileges
- Get users
- Grant API keys
- Has privileges
- Invalidate API key
- Invalidate token
- OpenID Connect prepare authentication
- OpenID Connect authenticate
- OpenID Connect logout
- SAML prepare authentication
- SAML authenticate
- SAML logout
- SAML invalidate
- SAML complete logout
- SAML service provider metadata
- SSL certificate
- Snapshot and restore APIs
- Snapshot lifecycle management APIs
- SQL APIs
- Transform APIs
- Usage API
- Watcher APIs
- Definitions
- Migration guide
- Release notes
- Elasticsearch version 7.15.2
- Elasticsearch version 7.15.1
- Elasticsearch version 7.15.0
- Elasticsearch version 7.14.2
- Elasticsearch version 7.14.1
- Elasticsearch version 7.14.0
- Elasticsearch version 7.13.4
- Elasticsearch version 7.13.3
- Elasticsearch version 7.13.2
- Elasticsearch version 7.13.1
- Elasticsearch version 7.13.0
- Elasticsearch version 7.12.1
- Elasticsearch version 7.12.0
- Elasticsearch version 7.11.2
- Elasticsearch version 7.11.1
- Elasticsearch version 7.11.0
- Elasticsearch version 7.10.2
- Elasticsearch version 7.10.1
- Elasticsearch version 7.10.0
- Elasticsearch version 7.9.3
- Elasticsearch version 7.9.2
- Elasticsearch version 7.9.1
- Elasticsearch version 7.9.0
- Elasticsearch version 7.8.1
- Elasticsearch version 7.8.0
- Elasticsearch version 7.7.1
- Elasticsearch version 7.7.0
- Elasticsearch version 7.6.2
- Elasticsearch version 7.6.1
- Elasticsearch version 7.6.0
- Elasticsearch version 7.5.2
- Elasticsearch version 7.5.1
- Elasticsearch version 7.5.0
- Elasticsearch version 7.4.2
- Elasticsearch version 7.4.1
- Elasticsearch version 7.4.0
- Elasticsearch version 7.3.2
- Elasticsearch version 7.3.1
- Elasticsearch version 7.3.0
- Elasticsearch version 7.2.1
- Elasticsearch version 7.2.0
- Elasticsearch version 7.1.1
- Elasticsearch version 7.1.0
- Elasticsearch version 7.0.0
- Elasticsearch version 7.0.0-rc2
- Elasticsearch version 7.0.0-rc1
- Elasticsearch version 7.0.0-beta1
- Elasticsearch version 7.0.0-alpha2
- Elasticsearch version 7.0.0-alpha1
- Dependencies and versions
Networking
editNetworking
editEach Elasticsearch node has two different network interfaces. Clients send requests to Elasticsearch’s REST APIs using its HTTP interface, but nodes communicate with other nodes using the transport interface. The transport interface is also used for communication with remote clusters.
You can configure both of these interfaces at the same time using the
network.*
settings. If you have a more complicated network, you might need to
configure the interfaces independently using the http.*
and transport.*
settings. Where possible, use the network.*
settings that apply to both
interfaces to simplify your configuration and reduce duplication.
By default Elasticsearch binds only to localhost
which means it cannot be accessed
remotely. This configuration is sufficient for a local development cluster made
of one or more nodes all running on the same host. To form a cluster across
multiple hosts, or which is accessible to remote clients, you must adjust some
network settings such as network.host
.
Be careful with the network configuration!
Never expose an unprotected node to the public internet. If you do, you are permitting anyone in the world to download, modify, or delete any of the data in your cluster.
Configuring Elasticsearch to bind to a non-local address will convert some warnings into fatal exceptions. If a node refuses to start after configuring its network settings then you must address the logged exceptions before proceeding.
Commonly used network settings
editMost users will need to configure only the following network settings.
-
network.host
-
(Static) Sets the address of this node for both HTTP and transport traffic. The node will bind to this address and will also use it as its publish address. Accepts an IP address, a hostname, or a special value.
Defaults to
_local_
. -
http.port
-
(Static) The port to bind for HTTP client communication. Accepts a single value or a range. If a range is specified, the node will bind to the first available port in the range.
Defaults to
9200-9300
. -
transport.port
-
(Static) The port to bind for communication between nodes. Accepts a single value or a range. If a range is specified, the node will bind to the first available port in the range. Set this setting to a single port, not a range, on every master-eligible node.
Defaults to
9300-9400
.
Special values for network addresses
editYou can configure Elasticsearch to automatically determine its addresses by using the
following special values. Use these values when configuring
network.host
, network.bind_host
, network.publish_host
, and the
corresponding settings for the HTTP and transport interfaces.
-
_local_
-
Any loopback addresses on the system, for example
127.0.0.1
. -
_site_
-
Any site-local addresses on the system, for example
192.168.0.1
. -
_global_
-
Any globally-scoped addresses on the system, for example
8.8.8.8
. -
_[networkInterface]_
-
Use the addresses of the network interface called
[networkInterface]
. For example if you wish to use the addresses of an interface calleden0
then setnetwork.host: _en0_
. -
0.0.0.0
- The addresses of all available network interfaces.
In some systems these special values resolve to multiple addresses. If so, Elasticsearch will select one of them as its publish address and may change its selection on each node restart. Ensure your node is accessible at every possible address.
Any values containing a :
(e.g. an IPv6 address or some of the
special values) must be quoted because :
is a
special character in YAML.
IPv4 vs IPv6
editThese special values yield both IPv4 and IPv6 addresses by default, but you can
also add an :ipv4
or :ipv6
suffix to limit them to just IPv4 or IPv6
addresses respectively. For example, network.host: _en0:ipv4_
would set this
node’s addresses to the IPv4 addresses of interface en0
.
Discovery in the Cloud
More special settings are available when running in the Cloud with either the EC2 discovery plugin or the Google Compute Engine discovery plugin installed.
Binding and publishing
editElasticsearch uses network addresses for two distinct purposes known as binding and publishing. Most nodes will use the same address for everything, but more complicated setups may need to configure different addresses for different purposes.
When an application such as Elasticsearch wishes to receive network communications, it must indicate to the operating system the address or addresses whose traffic it should receive. This is known as binding to those addresses. Elasticsearch can bind to more than one address if needed, but most nodes only bind to a single address. Elasticsearch can only bind to an address if it is running on a host that has a network interface with that address. If necessary, you can configure the transport and HTTP interfaces to bind to different addresses.
Each Elasticsearch node has an address at which clients and other nodes can contact it, known as its publish address. Each node has one publish address for its HTTP interface and one for its transport interface. These two addresses can be anything, and don’t need to be addresses of the network interfaces on the host. The only requirements are that each node must be:
- Accessible at its transport publish address by all other nodes in its cluster, and by any remote clusters that will discover it using Sniff mode.
- Accessible at its HTTP publish address by all clients that will discover it using sniffing.
Using a single address
editThe most common configuration is for Elasticsearch to bind to a single address at which
it is accessible to clients and other nodes. In this configuration you should
just set network.host
to that address. You should not separately set any bind
or publish addresses, nor should you separately configure the addresses for the
HTTP or transport interfaces.
Using multiple addresses
editUse the advanced network settings if you wish to
bind Elasticsearch to multiple addresses, or to publish a different address from the
addresses to which you are binding. Set network.bind_host
to the bind
addresses, and network.publish_host
to the address at which this node is
exposed. In complex configurations, you can configure these addresses
differently for the HTTP and transport interfaces.
Advanced network settings
editThese advanced settings let you bind to multiple addresses, or to use different addresses for binding and publishing. They are not required in most cases and you should not use them if you can use the commonly used settings instead.
-
network.bind_host
-
(Static)
The network address(es) to which the node should bind in order to listen for
incoming connections. Accepts a list of IP addresses, hostnames, and
special values. Defaults to the address given by
network.host
. Use this setting only if binding to multiple addresses or using different addresses for publishing and binding. -
network.publish_host
-
(Static)
The network address that clients and other nodes can use to contact this node.
Accepts an IP address, a hostname, or a special
value. Defaults to the address given by
network.host
. Use this setting only if binding to multiple addresses or using different addresses for publishing and binding.
You can specify a list of addresses for network.host
and
network.publish_host
. You can also specify one or more hostnames or
special values that resolve to multiple addresses.
If you do this then Elasticsearch chooses one of the addresses for its publish address.
This choice uses heuristics based on IPv4/IPv6 stack preference and
reachability and may change when the node restarts. Ensure
each node is accessible at all possible publish addresses.
Advanced TCP settings
editUse the following settings to control the low-level parameters of the TCP connections used by the HTTP and transport interfaces.
-
network.tcp.no_delay
-
(Static)
Enable or disable the TCP no delay
setting. Defaults to
true
. -
network.tcp.keep_alive
-
(Static)
Configures the
SO_KEEPALIVE
option for this socket, which determines whether it sends TCP keepalive probes. -
network.tcp.keep_idle
-
(Static)
Configures the
TCP_KEEPIDLE
option for this socket, which determines the time in seconds that a connection must be idle before starting to send TCP keepalive probes. Defaults to-1
, which uses the system default. This value cannot exceed300
seconds. Only applicable on Linux and macOS, and requires Java 11 or newer. -
network.tcp.keep_interval
-
(Static)
Configures the
TCP_KEEPINTVL
option for this socket, which determines the time in seconds between sending TCP keepalive probes. Defaults to-1
, which uses the system default. This value cannot exceed300
seconds. Only applicable on Linux and macOS, and requires Java 11 or newer. -
network.tcp.keep_count
-
(Static)
Configures the
TCP_KEEPCNT
option for this socket, which determines the number of unacknowledged TCP keepalive probes that may be sent on a connection before it is dropped. Defaults to-1
, which uses the system default. Only applicable on Linux and macOS, and requires Java 11 or newer. -
network.tcp.reuse_address
-
(Static)
Should an address be reused or not. Defaults to
true
on non-windows machines. -
network.tcp.send_buffer_size
- (Static) The size of the TCP send buffer (specified with size units). By default not explicitly set.
-
network.tcp.receive_buffer_size
- (Static) The size of the TCP receive buffer (specified with size units). By default not explicitly set.
Advanced HTTP settings
editUse the following advanced settings to configure the HTTP interface independently of the transport interface. You can also configure both interfaces together using the network settings.
-
http.host
-
(Static) Sets the address of this node for HTTP traffic. The node will bind to this address and will also use it as its HTTP publish address. Accepts an IP address, a hostname, or a special value. Use this setting only if you require different configurations for the transport and HTTP interfaces.
Defaults to the address given by
network.host
. -
http.bind_host
-
(Static)
The network address(es) to which the node should bind in order to listen for
incoming HTTP connections. Accepts a list of IP addresses, hostnames, and
special values. Defaults to the address given by
http.host
ornetwork.bind_host
. Use this setting only if you require to bind to multiple addresses or to use different addresses for publishing and binding, and you also require different binding configurations for the transport and HTTP interfaces. -
http.publish_host
-
(Static)
The network address for HTTP clients to contact the node using sniffing.
Accepts an IP address, a hostname, or a special
value. Defaults to the address given by
http.host
ornetwork.publish_host
. Use this setting only if you require to bind to multiple addresses or to use different addresses for publishing and binding, and you also require different binding configurations for the transport and HTTP interfaces. -
http.publish_port
-
(Static)
The port of the HTTP publish address.
Configure this setting only if you need the publish port to be different from
http.port
. Defaults to the port assigned viahttp.port
. -
http.max_content_length
-
(Static)
Maximum size of an HTTP request body. Defaults to
100mb
. -
http.max_initial_line_length
-
(Static)
Maximum size of an HTTP URL. Defaults to
4kb
. -
http.max_header_size
-
(Static)
Maximum size of allowed headers. Defaults to
8kb
.
-
http.compression
-
(Static) Support for compression when possible (with Accept-Encoding). If HTTPS is enabled, defaults to
false
. Otherwise, defaults totrue
.Disabling compression for HTTPS mitigates potential security risks, such as a BREACH attack. To compress HTTPS traffic, you must explicitly set
http.compression
totrue
. -
http.compression_level
-
(Static)
Defines the compression level to use for HTTP responses. Valid values are in the range of 1 (minimum compression) and 9 (maximum compression). Defaults to
3
.
-
http.cors.enabled
-
(Static) Enable or disable cross-origin resource sharing, which determines whether a browser on another origin can execute requests against Elasticsearch. Set to
true
to enable Elasticsearch to process pre-flight CORS requests. Elasticsearch will respond to those requests with theAccess-Control-Allow-Origin
header if theOrigin
sent in the request is permitted by thehttp.cors.allow-origin
list. Set tofalse
(the default) to make Elasticsearch ignore theOrigin
request header, effectively disabling CORS requests because Elasticsearch will never respond with theAccess-Control-Allow-Origin
response header.If the client does not send a pre-flight request with an
Origin
header or it does not check the response headers from the server to validate theAccess-Control-Allow-Origin
response header, then cross-origin security is compromised. If CORS is not enabled on Elasticsearch, the only way for the client to know is to send a pre-flight request and realize the required response headers are missing.
-
http.cors.allow-origin
-
(Static) Which origins to allow. If you prepend and append a forward slash (
/
) to the value, this will be treated as a regular expression, allowing you to support HTTP and HTTPs. For example, using/https?:\/\/localhost(:[0-9]+)?/
would return the request header appropriately in both cases. Defaults to no origins allowed.A wildcard (
*
) is a valid value but is considered a security risk, as your Elasticsearch instance is open to cross origin requests from anywhere.
-
http.cors.max-age
-
(Static)
Browsers send a "preflight" OPTIONS-request to determine CORS settings.
max-age
defines how long the result should be cached for. Defaults to1728000
(20 days).
-
http.cors.allow-methods
-
(Static)
Which methods to allow. Defaults to
OPTIONS, HEAD, GET, POST, PUT, DELETE
.
-
http.cors.allow-headers
-
(Static)
Which headers to allow. Defaults to
X-Requested-With, Content-Type, Content-Length
.
-
http.cors.allow-credentials
-
(Static) Whether the
Access-Control-Allow-Credentials
header should be returned. Defaults tofalse
.This header is only returned when the setting is set to
true
.
-
http.detailed_errors.enabled
-
(Static) If
true
, enables the output of detailed error messages and stack traces in the response output. Defaults totrue
.If
false
, use theerror_trace
parameter to enable stack traces and return detailed error messages. Otherwise, only a simple message will be returned. -
http.pipelining.max_events
-
(Static)
The maximum number of events to be queued up in memory before an HTTP connection is closed, defaults to
10000
. -
http.max_warning_header_count
-
(Static)
The maximum number of warning headers in client HTTP responses. Defaults to
unbounded
. -
http.max_warning_header_size
-
(Static)
The maximum total size of warning headers in client HTTP responses. Defaults to
unbounded
. -
http.tcp.no_delay
-
(Static)
Enable or disable the TCP no delay
setting. Defaults to
network.tcp.no_delay
. -
http.tcp.keep_alive
-
(Static)
Configures the
SO_KEEPALIVE
option for this socket, which determines whether it sends TCP keepalive probes. Defaults tonetwork.tcp.keep_alive
. -
http.tcp.keep_idle
-
(Static) Configures the
TCP_KEEPIDLE
option for this socket, which determines the time in seconds that a connection must be idle before starting to send TCP keepalive probes. Defaults tonetwork.tcp.keep_idle
, which uses the system default. This value cannot exceed300
seconds. Only applicable on Linux and macOS, and requires Java 11 or newer. -
http.tcp.keep_interval
-
(Static) Configures the
TCP_KEEPINTVL
option for this socket, which determines the time in seconds between sending TCP keepalive probes. Defaults tonetwork.tcp.keep_interval
, which uses the system default. This value cannot exceed300
seconds. Only applicable on Linux and macOS, and requires Java 11 or newer. -
http.tcp.keep_count
-
(Static) Configures the
TCP_KEEPCNT
option for this socket, which determines the number of unacknowledged TCP keepalive probes that may be sent on a connection before it is dropped. Defaults tonetwork.tcp.keep_count
, which uses the system default. Only applicable on Linux and macOS, and requires Java 11 or newer. -
http.tcp.reuse_address
-
(Static)
Should an address be reused or not. Defaults to
network.tcp.reuse_address
. -
http.tcp.send_buffer_size
-
(Static)
The size of the TCP send buffer (specified with size units).
Defaults to
network.tcp.send_buffer_size
. -
http.tcp.receive_buffer_size
-
(Static)
The size of the TCP receive buffer (specified with size units).
Defaults to
network.tcp.receive_buffer_size
. -
http.client_stats.enabled
-
(Dynamic)
Enable or disable collection of HTTP client stats. Defaults to
true
.
Advanced transport settings
editUse the following advanced settings to configure the transport interface independently of the HTTP interface. Use the network settings to configure both interfaces together.
-
transport.host
-
(Static) Sets the address of this node for transport traffic. The node will bind to this address and will also use it as its transport publish address. Accepts an IP address, a hostname, or a special value. Use this setting only if you require different configurations for the transport and HTTP interfaces.
Defaults to the address given by
network.host
. -
transport.bind_host
-
(Static)
The network address(es) to which the node should bind in order to listen for
incoming transport connections. Accepts a list of IP addresses, hostnames, and
special values. Defaults to the address given by
transport.host
ornetwork.bind_host
. Use this setting only if you require to bind to multiple addresses or to use different addresses for publishing and binding, and you also require different binding configurations for the transport and HTTP interfaces. -
transport.publish_host
-
(Static)
The network address at which the node can be contacted by other nodes. Accepts
an IP address, a hostname, or a special value.
Defaults to the address given by
transport.host
ornetwork.publish_host
. Use this setting only if you require to bind to multiple addresses or to use different addresses for publishing and binding, and you also require different binding configurations for the transport and HTTP interfaces. -
transport.publish_port
-
(Static)
The port of the transport publish
address. Set this parameter only if you need the publish port to be
different from
transport.port
. Defaults to the port assigned viatransport.port
. -
transport.connect_timeout
-
(Static)
The connect timeout for initiating a new connection (in
time setting format). Defaults to
30s
. -
transport.compress
-
(Static)
Set to
true
,indexing_data
, orfalse
to configure transport compression between nodes. The optiontrue
will compress all data. The optionindexing_data
will compress only the raw index data sent between nodes during ingest, ccr following (excluding bootstrap), and operations based shard recovery (excluding transferring lucene files). Defaults tofalse
. -
transport.compression_scheme
-
(Static)
Configures the compression scheme for
transport.compress
. The options aredeflate
orlz4
. Iflz4
is configured and the remote node has not been upgraded to a version supportinglz4
, the traffic will be sent uncompressed. Defaults todeflate
. -
transport.ping_schedule
-
(Static)
Schedule a regular application-level ping message
to ensure that transport connections between nodes are kept alive. Defaults to
5s
in the transport client and-1
(disabled) elsewhere. It is preferable to correctly configure TCP keep-alives instead of using this feature, because TCP keep-alives apply to all kinds of long-lived connections and not just to transport connections. -
transport.tcp.no_delay
-
(Static)
Enable or disable the TCP no delay
setting. Defaults to
network.tcp.no_delay
. -
transport.tcp.keep_alive
-
(Static)
Configures the
SO_KEEPALIVE
option for this socket, which determines whether it sends TCP keepalive probes. Defaults tonetwork.tcp.keep_alive
. -
transport.tcp.keep_idle
-
(Static)
Configures the
TCP_KEEPIDLE
option for this socket, which determines the time in seconds that a connection must be idle before starting to send TCP keepalive probes. Defaults tonetwork.tcp.keep_idle
if set, or the system default otherwise. This value cannot exceed300
seconds. In cases where the system default is higher than300
, the value is automatically lowered to300
. Only applicable on Linux and macOS, and requires Java 11 or newer. -
transport.tcp.keep_interval
-
(Static)
Configures the
TCP_KEEPINTVL
option for this socket, which determines the time in seconds between sending TCP keepalive probes. Defaults tonetwork.tcp.keep_interval
if set, or the system default otherwise. This value cannot exceed300
seconds. In cases where the system default is higher than300
, the value is automatically lowered to300
. Only applicable on Linux and macOS, and requires Java 11 or newer. -
transport.tcp.keep_count
-
(Static)
Configures the
TCP_KEEPCNT
option for this socket, which determines the number of unacknowledged TCP keepalive probes that may be sent on a connection before it is dropped. Defaults tonetwork.tcp.keep_count
if set, or the system default otherwise. Only applicable on Linux and macOS, and requires Java 11 or newer. -
transport.tcp.reuse_address
-
(Static)
Should an address be reused or not. Defaults to
network.tcp.reuse_address
. -
transport.tcp.send_buffer_size
-
(Static)
The size of the TCP send buffer (specified with size units).
Defaults to
network.tcp.send_buffer_size
. -
transport.tcp.receive_buffer_size
-
(Static)
The size of the TCP receive buffer (specified with size units).
Defaults to
network.tcp.receive_buffer_size
.
Transport profiles
editElasticsearch allows you to bind to multiple ports on different interfaces by the use of transport profiles. See this example configuration
transport.profiles.default.port: 9300-9400 transport.profiles.default.bind_host: 10.0.0.1 transport.profiles.client.port: 9500-9600 transport.profiles.client.bind_host: 192.168.0.1 transport.profiles.dmz.port: 9700-9800 transport.profiles.dmz.bind_host: 172.16.1.2
The default
profile is special. It is used as a fallback for any other
profiles, if those do not have a specific configuration setting set, and is how
this node connects to other nodes in the cluster.
Other profiles can have any name and can be used to set up specific endpoints
for incoming connections.
The following parameters can be configured on each transport profile, as in the example above:
-
port
: The port to which to bind. -
bind_host
: The host to which to bind. -
publish_host
: The host which is published in informational APIs.
Profiles also support all the other transport settings specified in the
transport settings section, and use these as defaults.
For example, transport.profiles.client.tcp.reuse_address
can be explicitly
configured, and defaults otherwise to transport.tcp.reuse_address
.
Long-lived idle connections
editA transport connection between two nodes is made up of a number of long-lived
TCP connections, some of which may be idle for an extended period of time.
Nonetheless, Elasticsearch requires these connections to remain open, and it
can disrupt the operation of your cluster if any inter-node connections are
closed by an external influence such as a firewall. It is important to
configure your network to preserve long-lived idle connections between
Elasticsearch nodes, for instance by leaving *.tcp.keep_alive
enabled and
ensuring that the keepalive interval is shorter than any timeout that might
cause idle connections to be closed, or by setting transport.ping_schedule
if
keepalives cannot be configured. Devices which drop connections when they reach
a certain age are a common source of problems to Elasticsearch clusters, and
must not be used.
Request compression
editBy default, the transport.compress
setting is false
and network-level
request compression is disabled between nodes in the cluster. This default
normally makes sense for local cluster communication as compression has a
noticeable CPU cost and local clusters tend to be set up with fast network
connections between nodes.
The transport.compress
configuration option indexing_data
will only
compress requests that relate to the transport of raw indexing source data
between nodes. This option primarily compresses data sent during ingest,
ccr, and shard recovery.
The transport.compress
setting always configures local cluster request
compression and is the fallback setting for remote cluster request compression.
If you want to configure remote request compression differently than local
request compression, you can set it on a per-remote cluster basis using the
cluster.remote.${cluster_alias}.transport.compress
setting.
Response compression
editThe compression settings do not configure compression for responses. Elasticsearch will compress a response if the inbound request was compressed—even when compression is not enabled. Similarly, Elasticsearch will not compress a response if the inbound request was uncompressed—even when compression is enabled. The compression scheme used to compress a response will be the same scheme the remote node used to compress the request.
Request tracing
editYou can trace individual requests made on the HTTP and transport layers.
Tracing can generate extremely high log volumes that can destabilize your cluster. Do not enable request tracing on busy or important clusters.
REST request tracer
editThe HTTP layer has a dedicated tracer that logs incoming requests and the
corresponding outgoing responses. Activate the tracer by setting the level of
the org.elasticsearch.http.HttpTracer
logger to TRACE
:
PUT _cluster/settings { "transient" : { "logger.org.elasticsearch.http.HttpTracer" : "TRACE" } }
You can also control which URIs will be traced, using a set of include and exclude wildcard patterns. By default every request will be traced.
PUT _cluster/settings { "transient" : { "http.tracer.include" : "*", "http.tracer.exclude" : "" } }
Transport tracer
editThe transport layer has a dedicated tracer that logs incoming and outgoing
requests and responses. Activate the tracer by setting the level of the
org.elasticsearch.transport.TransportService.tracer
logger to TRACE
:
PUT _cluster/settings { "transient" : { "logger.org.elasticsearch.transport.TransportService.tracer" : "TRACE" } }
You can also control which actions will be traced, using a set of include and exclude wildcard patterns. By default every request will be traced except for fault detection pings:
PUT _cluster/settings { "transient" : { "transport.tracer.include" : "*", "transport.tracer.exclude" : "internal:coordination/fault_detection/*" } }
On this page
- Commonly used network settings
- Special values for network addresses
- IPv4 vs IPv6
- Binding and publishing
- Using a single address
- Using multiple addresses
- Advanced network settings
- Advanced TCP settings
- Advanced HTTP settings
- Advanced transport settings
- Transport profiles
- Long-lived idle connections
- Request compression
- Response compression
- Request tracing
- REST request tracer
- Transport tracer