리전 수준 / Apigee 인스턴스 상태 점검: 한 리전의 전체 Apigee 인스턴스 상태를 반환합니다.
환경 수준 상태 점검: Apigee 인스턴스에서 특정 환경의 상태를 반환합니다.
API 프록시를 통한 커스텀 상태 점검: 복잡한 사용 사례의 경우 전용 API 프록시를 커스텀 상태 점검 엔드포인트로 구성할 수 있습니다.
리전 수준 상태 확인 수행
Apigee는 리전 수준 / Apigee 인스턴스 상태 점검을 제공하여 특정 리전에 있는 Apigee 인스턴스의 전반적인 상태를 평가합니다. 부하 분산기에서 널리 사용하는 상태 점검 패턴은 Apigee 인스턴스의 상태를 확인하고 리전 장애 조치를 수행합니다.
다음과 같이 요청을 작성하여 리전 수준의 상태 점검을 수행할 수 있습니다.
여기서 $HOST는 부하 분산기에서 제공하는 Apigee 환경 그룹에 정의된 호스트 이름을 나타냅니다.
환경 수준 상태 확인 수행
Apigee는 Apigee 인스턴스에서 제공하는 특정 환경의 상태를 평가하는 환경 수준의 상태 점검을 제공합니다. 이 상태 점검 패턴은 특정 중요/선택 환경의 상태에 따라 리전 장애 조치를 수행하려는 경우에 선호됩니다.
다음과 같이 요청을 작성하면 환경에서 유효한 API 프록시를 호출하여 환경 수준의 상태 점검을 수행할 수 있습니다.
프록시 기본 경로 앞에 /healthz/를 추가합니다.
요청 헤더 추가: User-Agent: GoogleHC.
예를 들어 /catalog가 환경에 배포된 유효한 프록시 기본 경로라고 가정해 보세요. 상태 점검을 수행하려면 다음과 같이 프록시를 호출합니다.
여기서 $HOST는 부하 분산기에서 제공하는 Apigee 환경 그룹에 정의된 호스트 이름을 나타냅니다.
API 프록시를 통해 커스텀 상태 확인 수행
추가 검증을 수행하려면 환경에 배포된 API 프록시에서 커스텀 상태 점검 로직을 정의할 수 있습니다.
예를 들어 여러 환경이 작동 중지되면 상태 점검이 실패할 수 있습니다. 또는 대상 상태 또는 지연 시간에 따라 상태 점검이 실패할 수 있습니다.
이 경우에는 해당 프록시에 대한 일반 API를 호출하여 상태 점검을 수행할 수 있습니다.
예를 들어 prod라는 환경의 상태를 확인하려 한다고 가정해 보세요.
기본 경로 /healthcheck-prod를 사용하여 해당 환경에 API 프록시를 배포합니다.
Apigee 인스턴스에서 제공하는 prod 환경의 상태를 확인하려면 다음과 같이 프록시를 호출합니다.
$curlhttps://$HOST/healthcheck-prod
여기서 $HOST는 부하 분산기에서 제공하는 Apigee 환경 그룹에 정의된 호스트 이름을 나타냅니다.
사용 참고사항
리전 수준 및 환경 수준 상태 점검의 경우:Google Cloud 부하 분산기에서 이를 수행하는 경우 부하 분산기가 올바른 .User-Agent 헤더를 설정합니다. 클라이언트가 이 상태 점검 API 호출을 사용하는 경우에는 올바른 User-Agent가 설정되었는지 확인해야 합니다.
Apigee Hybrid의 경우: 상태 점검 기능은 버전 1.4 이상에서만 사용할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-18(UTC)"],[[["\u003cp\u003eThis content outlines health check methods for Apigee and Apigee hybrid, covering regional-level, environment-level, and custom proxy-based checks.\u003c/p\u003e\n"],["\u003cp\u003eRegional-level health checks assess the overall Apigee instance health within a region using the \u003ccode\u003e/healthz/ingress\u003c/code\u003e path and the \u003ccode\u003eUser-Agent: GoogleHC\u003c/code\u003e header, returning \u003ccode\u003e"Apigee Ingress is healthy"\u003c/code\u003e if successful.\u003c/p\u003e\n"],["\u003cp\u003eEnvironment-level health checks verify the status of a specific environment by prepending \u003ccode\u003e/healthz/\u003c/code\u003e to a valid proxy basepath (e.g., \u003ccode\u003e/catalog\u003c/code\u003e) and using the \u003ccode\u003eUser-Agent: GoogleHC\u003c/code\u003e header, with a \u003ccode\u003e"Server Ready"\u003c/code\u003e response indicating a healthy environment.\u003c/p\u003e\n"],["\u003cp\u003eCustom health checks allow for advanced validations through a dedicated API proxy, enabling checks based on factors like multiple environment status or target latency, but do not require the \u003ccode\u003eUser-Agent\u003c/code\u003e header.\u003c/p\u003e\n"],["\u003cp\u003eThe health check feature is available for Apigee hybrid versions 1.4 and higher, and if the health checks are made by Google Cloud load balancers then the correct user-agent header is set for you.\u003c/p\u003e\n"]]],[],null,["# Performing health checks\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n\nApigee exposes health checks at different levels, which you can leverage depending upon the use case.\n\n1. **Regional-level / Apigee instance health check:** Returns the health of overall Apigee instance in a region.\n2. **Environment-level health checks:** Returns the health of a particular environment in the Apigee instance.\n3. **Custom health check through an API proxy:** For complex use cases, you can configure a dedicated API proxy as a custom health check endpoint.\n\n\u003cbr /\u003e\n\n### Performing a regional-level health check\n\nApigee offers a regional-level / Apigee instance health check to assess the overall health\nstatus of the Apigee instance in a specific region. This health check pattern, widely used by\nload balancers, determines the health status of Apigee instances and performs regional failovers.\n\nYou can perform a regional-level health check by constructing the request as follows:\n\n- Health check path: `/healthz/ingress`\n- Add request header: `User-Agent: GoogleHC`.\n\n```bash\n$ curl -H 'User-Agent: GoogleHC' https://$HOST/healthz/ingress\nApigee Ingress is healthy\n```\nwhere, `$HOST` represents the host name defined in the [Apigee environment group](https://cloud.google.com/apigee/docs/api-platform/fundamentals/environmentgroups-working-with) that is served by the load balancer. Note: This API call to determine the regional-level health check will not be counted against your overall Apigee usage. If the Apigee instance is healthy, the response `\"HTTP/2 200\"` with `\"Apigee Ingress is healthy\"` is returned.\n\n### Performing an environment-level health check\n\nApigee offers an environment-level health check to assess the health of a particular environment\nserved by the Apigee instance. This health check pattern is preferred when you want to perform\nregional failovers based on the health of certain critical/selective environments.\n\nYou can perform an environment-level health check by calling any valid API proxy in an environment\nby constructing the request as follows:\n\n- Prepend `/healthz/` to the proxy basepath.\n- Add request header: `User-Agent: GoogleHC`.\n\n\nFor example, assume that `/catalog` is a valid proxy basepath that is deployed in an\nenvironment. To do a health check, call the proxy like this: \n\n```bash\n$ curl -H 'User-Agent: GoogleHC' https://$HOST/healthz/catalog\nServer Ready\n```\nwhere, `$HOST` represents the host name defined in the [Apigee environment group](https://cloud.google.com/apigee/docs/api-platform/fundamentals/environmentgroups-working-with) that is served by the load balancer. Note: This proxy API call to determine the environment-level health check will not execute the proxy, and will not be counted against your overall Apigee usage. The basepath `/catalog` is used only for routing the API to the correct environment. If the environment is healthy, the response `\"HTTP/2 200\"` with `\"Server Ready\"` is returned.\n\n### Performing a custom health check through an API proxy\n\nIf you want to perform any additional validations, you can define custom health check logic\nin an API proxy deployed to an environment.\nFor example, you might fail the healthcheck when multiple environments are down. Or, you could\nfail the healthcheck based on target health or latency.\n\n\nIn this case, you can perform the health check by making a regular API call to that proxy.\n\n\nFor example, assume that you want to check the health of an environment called `prod`.\nDeploy an API proxy to that environment with the basepath `/healthcheck-prod`.\nTo check the health of the `prod` environment served by Apigee instance,\ncall the proxy like this: \n\n```bash\n$ curl https://$HOST/healthcheck-prod\n```\nwhere, `$HOST` represents the host name defined in the [Apigee environment group](https://cloud.google.com/apigee/docs/api-platform/fundamentals/environmentgroups-working-with) that is served by the load balancer. Note: The API calls with custom health checks will be counted against your overall Apigee usage. And, you don't need to provide the `\"User-Agent\"` header.\n\n### Usage notes\n\n**For regional-level and environment-level healthchecks:** If they are performed by the\n[Google Cloud load balancers](https://cloud.google.com/load-balancing/docs/choosing-load-balancer#summary-of-google-cloud-load-balancers),\nthe load balancer sets the correct `User-Agent` header. If your own client consumes\nthese health check API calls, you need to make sure the correct `User-Agent` is set.\n\n\n**For Apigee hybrid**: The health check feature is only available for version 1.4 and higher."]]