Skip to content

Add the Ability to Disable certain REST APIs via a Cluster Setting #84876

Open
@original-brownbear

Description

@original-brownbear

Description

Elasticsearch contains a number of APIs that can produce very large responses when called in clusters containing a huge number of indices/shards. Examples include:

/_cluster/_state
/_mappings
/_shards
/_shard_stores

(particularly when called with the ?pretty option). These large responses can consume resources on the coordinating node(s) that respond to these APIs in ways that are unacceptable in a production cluster. So far when dealing with these issues we had to resort to tracking down the offending caller making the API calls to a cluster or adjusting the authorization setup to disable an API for a caller in order to stabilize a cluster. The first option is very time consuming and might involve making adjustments to a large number of processes calling an API. The second option is complicated and comes with a number of limitations depending on the exact role setup of a deployment.

-> we discussed this in the many-shards sync and decided we'd like to add a cluster setting that allows turning off REST APIs by path so that a cluster can be stabilized right away once the offending API has been identified.

I would suggest the cluster setting:

http.route.disable: ["/_mapping/", "..."]

that takes a list of paths exactly like we already have it in the REST request tracer.

relates #77466

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions