0Pricing
gRPC & High Performance APIs · 강의

상태 확인 및 준비 상태 프로브

표준 gRPC 상태 확인 프로토콜을 사용해 로드 밸런서와 오케스트레이터가 서비스가 트래픽을 처리할 준비가 되었는지 알 수 있도록 합니다.

상태 확인 및 준비 상태 프로브은(는) CoddyKit의 무료 gRPC & High Performance APIs 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 gRPC & High Performance APIs 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. gRPC & High Performance APIs 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Health Checks Matter

An orchestrator must know whether a service instance can handle requests. Sending traffic to a starting, overloaded, or broken instance causes errors.

The gRPC health checking protocol answers: is this service healthy?

The Standard Health Service

gRPC defines grpc.health.v1.Health with two methods:

  • Check — a one-shot status query
  • Watch — a stream of status updates

Status is SERVING, NOT_SERVING, or UNKNOWN.

Per-Service Status

A health request names a service. An empty name asks about the whole server; a specific name asks about one service, so you can report each independently.

Registering the Health Server (Go)

The health package provides a ready implementation you register on your server.

import 'google.golang.org/grpc/health'
import hpb 'google.golang.org/grpc/health/grpc_health_v1'

hs := health.NewServer()
hpb.RegisterHealthServer(s, hs)

Setting Status

Update status as your service transitions. Mark NOT_SERVING during startup or shutdown, then SERVING when ready.

hs.SetServingStatus('', hpb.HealthCheckResponse_SERVING)
hs.SetServingStatus('my.pkg.Orders', hpb.HealthCheckResponse_SERVING)

Readiness vs Liveness

Two distinct ideas:

  • Liveness: is the process alive? Restart if not.
  • Readiness: can it serve now? Remove from rotation if not, but do not restart.

Health status maps cleanly to readiness.

Kubernetes gRPC Probes

Kubernetes supports native gRPC probes. Point them at your health service.

readinessProbe:
  grpc:
    port: 9090
    service: my.pkg.Orders

Probing with grpc_health_probe

The grpc_health_probe binary lets you check health from a shell or older Kubernetes versions.

grpc_health_probe -addr=localhost:9090 -service=my.pkg.Orders

Watch for Live Updates

Smart load balancers use Watch to receive a stream of status changes, reacting instantly when an instance flips to NOT_SERVING instead of polling.

Graceful Shutdown

Before stopping, set status to NOT_SERVING and wait. Load balancers drain you out, in-flight requests finish, and clients avoid hitting a dying instance.

Tying Health to Dependencies

Report NOT_SERVING when a critical dependency (database, cache) is unreachable, so traffic routes only to instances that can actually do work.

Quick Check

Test your health-check knowledge.

Recap

You learned gRPC health checking:

  • The standard Health service offers Check and Watch
  • Status is per-service: SERVING, NOT_SERVING, UNKNOWN
  • Map health to readiness; pair with liveness probes
  • Kubernetes and grpc_health_probe consume it
  • Flip to NOT_SERVING for graceful drain and failed dependencies

자주 묻는 질문

“상태 확인 및 준비 상태 프로브” 강의는 무료인가요?

네 — “상태 확인 및 준비 상태 프로브” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 gRPC & High Performance APIs 강의 전체를 잠금 해제할 수 있습니다. gRPC & High Performance APIs 강의에는 총 4개의 강의가 포함되어 있습니다.

“상태 확인 및 준비 상태 프로브”에서 뭘 배우나요?

표준 gRPC 상태 확인 프로토콜을 사용해 로드 밸런서와 오케스트레이터가 서비스가 트래픽을 처리할 준비가 되었는지 알 수 있도록 합니다. 브라우저에서 직접 실행하는 실습 코드로 gRPC & High Performance APIs을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

gRPC & High Performance APIs을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 gRPC & High Performance APIs은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“상태 확인 및 준비 상태 프로브” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 gRPC & High Performance APIs 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 gRPC & High Performance APIs 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. gRPC 상호작용 로깅
  2. OpenTelemetry를 활용한 추적
  3. gRPC 메트릭 모니터링
  4. 상태 확인 및 준비 상태 프로브
← gRPC & High Performance APIs(으)로 돌아가기