github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/docs/metrics/healthcheck/README.md (about)

     1  # MinIO Healthcheck
     2  
     3  MinIO server exposes three un-authenticated, healthcheck endpoints liveness probe and a cluster probe at `/minio/health/live` and `/minio/health/cluster` respectively.
     4  
     5  ## Liveness probe
     6  
     7  This probe always responds with '200 OK'. Only fails if 'etcd' is configured and unreachable. When liveness probe fails, Kubernetes like platforms restart the container.
     8  
     9  ```
    10  livenessProbe:
    11    httpGet:
    12      path: /minio/health/live
    13      port: 9000
    14      scheme: HTTP
    15    initialDelaySeconds: 120
    16    periodSeconds: 30
    17    timeoutSeconds: 10
    18    successThreshold: 1
    19    failureThreshold: 3
    20  ```
    21  
    22  ## Readiness probe
    23  
    24  This probe always responds with '200 OK'. Only fails if 'etcd' is configured and unreachable. When readiness probe fails, Kubernetes like platforms turn-off routing to the container.
    25  
    26  ```
    27  readinessProbe:
    28    httpGet:
    29      path: /minio/health/ready
    30      port: 9000
    31      scheme: HTTP
    32    initialDelaySeconds: 120
    33    periodSeconds: 15
    34    timeoutSeconds: 10
    35    successThreshold: 1
    36    failureThreshold: 3
    37  ```
    38  
    39  ## Cluster probe
    40  
    41  ### Cluster-writeable probe
    42  
    43  The reply is '200 OK' if cluster has write quorum if not it returns '503 Service Unavailable'.
    44  
    45  ```
    46  curl http://minio1:9001/minio/health/cluster
    47  HTTP/1.1 503 Service Unavailable
    48  Accept-Ranges: bytes
    49  Content-Length: 0
    50  Server: MinIO
    51  Vary: Origin
    52  X-Amz-Bucket-Region: us-east-1
    53  X-Minio-Write-Quorum: 3
    54  X-Amz-Request-Id: 16239D6AB80EBECF
    55  X-Xss-Protection: 1; mode=block
    56  Date: Tue, 21 Jul 2020 00:36:14 GMT
    57  ```
    58  
    59  ### Cluster-readable probe
    60  
    61  The reply is '200 OK' if cluster has read quorum if not it returns '503 Service Unavailable'.
    62  
    63  ```
    64  curl http://minio1:9001/minio/health/cluster/read
    65  HTTP/1.1 503 Service Unavailable
    66  Accept-Ranges: bytes
    67  Content-Length: 0
    68  Server: MinIO
    69  Vary: Origin
    70  X-Amz-Bucket-Region: us-east-1
    71  X-Minio-Write-Quorum: 3
    72  X-Amz-Request-Id: 16239D6AB80EBECF
    73  X-Xss-Protection: 1; mode=block
    74  Date: Tue, 21 Jul 2020 00:36:14 GMT
    75  ```
    76  
    77  ### Checking cluster health for maintenance
    78  
    79  You may query the cluster probe endpoint to check if the node which received the request can be taken down for maintenance, if the server replies back '412 Precondition Failed' this means you will lose HA. '200 OK' means you are okay to proceed.
    80  
    81  ```
    82  curl http://minio1:9001/minio/health/cluster?maintenance=true
    83  HTTP/1.1 412 Precondition Failed
    84  Accept-Ranges: bytes
    85  Content-Length: 0
    86  Server: MinIO
    87  Vary: Origin
    88  X-Amz-Bucket-Region: us-east-1
    89  X-Amz-Request-Id: 16239D63820C6E76
    90  X-Xss-Protection: 1; mode=block
    91  X-Minio-Write-Quorum: 3
    92  Date: Tue, 21 Jul 2020 00:35:43 GMT
    93  ```