API for Collecting Dynamic Status v1

Function

Collects dynamic status.

Format

Operation type: GET

URL: https://{ip}:{port}/v1/status

  • The {ip} field prioritizes reading the environment variable MIES_CONTAINER_MANAGEMENT_IP. If the environment variable does not exist, managementIpAddress in the configuration file is used. If managementIpAddress does not exist in the configuration file, ipAddress in the configuration file is used.
  • The {port} field prioritizes reading the managementPort parameter in the configuration file. If the configuration file does not contain the managementPort parameter, the port parameter in the configuration file is used.

Request Parameters

None

Usage Example

Request example:

GET https://{ip}:{port}/v1/status
Response example:
{
    "service": {
        "roleStatus": "RoleUnknown",
        "currentRole": "prefill"
    },
    "resource": {
        "availSlotsNum": 200,
        "availBlockNum": 1024
    },
    "peers": ["1.2.3.4", "5.6.7.8"]
}

Output Description

Field

Mandatory/Optional

Type

Description

service

Mandatory

Structure

Service attributes.

service.roleStatus

Mandatory

String

Role status of the current service. Possible values:

  • RoleUnknown
  • RoleSwitching
  • RoleReady

In the prefill-decode hybrid deployment scenario, the value is always RoleReady.

service.currentRole

Mandatory

String

Role of the current instance. Possible values:

  • prefill
  • decode
  • none

In the prefill-decode hybrid deployment scenario, the value is always none.

In the prefill-decode disaggregation scenario, if roleStatus is RoleReady, the value is prefill or decode. Otherwise, the value is none.

resource

Mandatory

Structure

Remaining resources.

resource.availSlotsNum

Mandatory

Integer

Number of available slots.

resource.availBlockNum

Mandatory

Integer

Number of available blocks.

peers

Optional

String array

The array member is the IP address, indicating the prefill instance that has been successfully connected.

  • This field does not need to be returned in the prefill-decode hybrid deployment scenario or for prefill instances in the prefill-decode disaggregation scenario.
  • This field needs to be returned for decode instances in the prefill-decode disaggregation scenario.
  • Each time a decode instance successfully connects to a prefill instance, a member is added. If the target prefill instance remains unchanged and the pull kv operation on a prefill instance fails and cannot be recovered, the prefill instance will be deleted.