"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE = exports.INDEX_NUMBER_OF_SHARDS = exports.INDEX_AUTO_EXPAND_REPLICAS = exports.DEFAULT_TIMEOUT = void 0; /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ /** * When a request takes a long time to complete and hits the timeout or the * client aborts that request due to the requestTimeout, our only course of * action is to retry that request. This places our request at the end of the * queue and adds more load to Elasticsearch just making things worse. * * So we want to choose as long a timeout as possible. Some load balancers / * reverse proxies like ELB ignore TCP keep-alive packets so unless there's a * request or response sent over the socket it will be dropped after 60s. */ const DEFAULT_TIMEOUT = '60s'; /** Allocate 1 replica if there are enough data nodes, otherwise continue with 0 */ exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; const INDEX_AUTO_EXPAND_REPLICAS = '0-1'; /** ES rule of thumb: shards should be several GB to 10's of GB, so Kibana is unlikely to cross that limit */ exports.INDEX_AUTO_EXPAND_REPLICAS = INDEX_AUTO_EXPAND_REPLICAS; const INDEX_NUMBER_OF_SHARDS = 1; /** Wait for all shards to be active before starting an operation */ exports.INDEX_NUMBER_OF_SHARDS = INDEX_NUMBER_OF_SHARDS; const WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE = 'all'; exports.WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE = WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE;