Files
goma-gateway/docs/quickstart/healthcheck.md
2024-11-19 19:34:26 +01:00

1.2 KiB

title, layout, parent, nav_order
title layout parent nav_order
Healthcheck default Quickstart 5

Healthcheck

The proxy includes built-in health check routes, which can be easily enabled or disabled based on your requirements.

These routes allow you to monitor the health and availability of your services.

version: 1.0
gateway:
    routes:
        - path: /cart
          name: example route
          rewrite: /
          methods: []
          healthCheck:
            path: "/health/live"
            interval: 30s 
            timeout: 10s
            healthyStatuses: [200,404] # Healthy statuses
  • Goma Gateway healthcheck: /health/live
  • Routes health check: health/routes

Gateway healthcheck response:

{
  "name": "Service Gateway",
  "status": "healthy",
  "error": ""
}

Routes healthcheck response:

{
  "status": "healthy",
  "routes": [
    {
      "name": "order-service",
      "status": "healthy",
      "error": ""
    },
    {
      "name": "notification-service",
      "status": "healthy",
      "error": ""
    },
    {
      "name": "store-service",
      "status": "healthy",
      "error": ""
    },
    {
      "name": "account-service",
      "status": "healthy",
      "error": ""
    }
  ]
}