Client settings

edit

The client that you use to connect to Azure has a number of settings available. The settings have the form azure.client.CLIENT_NAME.SETTING_NAME. By default, azure repositories use a client named default, but this can be modified using the repository setting client. For example:

PUT _snapshot/my_backup
{
    "type": "azure",
    "settings": {
        "client": "secondary"
    }
}

Most client settings can be added to the elasticsearch.yml configuration file. For example:

azure.client.default.timeout: 10s
azure.client.default.max_retries: 7
azure.client.default.endpoint_suffix: core.chinacloudapi.cn
azure.client.secondary.timeout: 30s

In this example, the client side timeout is 10s per try for the default account with 7 retries before failing. The endpoint suffix is core.chinacloudapi.cn and 30s per try for the secondary account with 3 retries.

The account, key, and sas_token storage settings are reloadable secure settings, which you add to the Elasticsearch keystore. For more information about creating and updating the Elasticsearch keystore, see Secure settings. After you reload the settings, the internal Azure clients, which are used to transfer the snapshot, utilize the latest settings from the keystore.

In progress snapshot or restore jobs will not be preempted by a reload of the storage secure settings. They will complete using the client as it was built when the operation started.

The following list contains the available client settings. Those that must be stored in the keystore are marked as "secure"; the other settings belong in the elasticsearch.yml file.

account (Secure, reloadable)
The Azure account name, which is used by the repository’s internal Azure client.
endpoint_suffix
The Azure endpoint suffix to connect to. The default value is core.windows.net.
key (Secure, reloadable)
The Azure secret key, which is used by the repository’s internal Azure client. Alternatively, use sas_token.
max_retries
The number of retries to use when an Azure request fails. This setting helps control the exponential backoff policy. It specifies the number of retries that must occur before the snapshot fails. The default value is 3. The initial backoff period is defined by Azure SDK as 30s. Thus there is 30s of wait time before retrying after a first timeout or failure. The maximum backoff period is defined by Azure SDK as 90s.
proxy.host
The host name of a proxy to connect to Azure through. For example: azure.client.default.proxy.host: proxy.host.
proxy.port
The port of a proxy to connect to Azure through. For example, azure.client.default.proxy.port: 8888.
proxy.type
Register a proxy type for the client. Supported values are direct, http, and socks. For example: azure.client.default.proxy.type: http. When proxy.type is set to http or socks, proxy.host and proxy.port must also be provided. The default value is direct.
sas_token (Secure, reloadable)
A shared access signatures (SAS) token, which the repository’s internal Azure client uses for authentication. The SAS token must have read (r), write (w), list (l), and delete (d) permissions for the repository base path and all its contents. These permissions must be granted for the blob service (b) and apply to resource types service (s), container (c), and object (o). Alternatively, use key.
timeout
The client side timeout for any single request to Azure. The value should specify the time unit. For example, a value of 5s specifies a 5 second timeout. There is no default value, which means that Elasticsearch uses the default value set by the Azure client (known as 5 minutes). This setting can be defined globally, per account, or both.