Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract http stats from nodes stats into separate API #95391

Closed
dakrone opened this issue Apr 19, 2023 · 4 comments · Fixed by #96198
Closed

Extract http stats from nodes stats into separate API #95391

dakrone opened this issue Apr 19, 2023 · 4 comments · Fixed by #96198
Assignees
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >enhancement Team:Data Management Meta label for data/management team

Comments

@dakrone
Copy link
Member

dakrone commented Apr 19, 2023

Description

From the nodes stats API, we should extract the http stats into their own endpoint. This endpoint can then be non-node-centric, and present a global view of the number of connections, recent clients, etc.

@dakrone dakrone added >enhancement :Data Management/Stats Statistics tracking and retrieval APIs labels Apr 19, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Apr 19, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@HiDAl HiDAl self-assigned this May 10, 2023
@HiDAl
Copy link
Contributor

HiDAl commented May 15, 2023

@dakrone Some questions:

  1. How the endpoint URL would look like? Since I'll be moving a couple of different APIs, I thought about a generic _stats/(http|ingest|...) endpoint, but not sure whether it's recommended according to the internal ES rules. Also, a _(http|ingest|..)/stats would work, but again not sure.
  2. If I correctly understood the description of the ticket, the final response would be an union of the general status of the cluster, so basically, the response would look like:
{
  "_http": {
    "total": 1, // all the node called
    "successful": 1,
    "failed": 0
  },
  "cluster_name": "<cluster name?>",
  "http": {
    "current_open": 1,  // <- summing up all the nodes 
    "total_opened": 12, // <- summing up all the nodes 
    "clients": [ // an array merge of each node
      {
        "id": 896729347,
        "local_address": "127.0.0.1:9200",
        "remote_address": "127.0.0.1:62755",
        "last_uri": "/",
        "opened_time_millis": 1684139167185,
        "closed_time_millis": 1684139167185,
        "last_request_time_millis": 1684139167185,
        "request_count": 1,
        "request_size_bytes": 0
      },
      ...
    ]
  }
}
  1. This has to be available only in the case the cluster is in serverless mode, right?

@dakrone
Copy link
Member Author

dakrone commented May 15, 2023

I think those comments about the response body match what I was thinking. For the URL, the problem with /_stats/<anything> is that it's already reserved for index stats, so in this case perhaps just introducing a /_http_stats would be worthwhile. It's at least worth discussing as a team for the URL part (especially since we may have multiple of these, having a pattern could be useful).

This has to be available only in the case the cluster is in serverless mode, right?

I think this would be fine for any running case, i.e., both Serverless and Serverful.

@HiDAl
Copy link
Contributor

HiDAl commented May 16, 2023

thanks @dakrone !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >enhancement Team:Data Management Meta label for data/management team
Projects
None yet
3 participants