gRPC Edge Gateway & Native Health Probing
Overview
Toron functions as a high-performance gRPC Edge Gateway, routing, load balancing, authenticating, and monitoring backend gRPC microservices over HTTP/2 (h2 and h2c). It features native gRPC Health Checking Protocol (grpc.health.v1.Health) support and strict HTTP/2 Trailers preservation (grpc-status, grpc-message, grpc-status-details-bin).
Key Features
- Native
grpc.health.v1.Health/CheckProbing:- Active background health worker sends binary Protobuf framed health check RPCs to upstream gRPC servers over HTTP/2.
- Evaluates
ServingStatus == SERVING (1)andgrpc-status == 0to maintain healthy node pools and trigger circuit breakers.
- HTTP/2 Trailers Preservation:
- Forwarding pipeline guarantees that upstream trailing headers (
grpc-status,grpc-message,grpc-status-details-bin) are delivered to gRPC client applications.
- Forwarding pipeline guarantees that upstream trailing headers (
- Service & Method Prefix Routing:
- Route traffic by gRPC package, service name, or individual RPC method (e.g.
prefix: "/order.OrderService/").
- Route traffic by gRPC package, service name, or individual RPC method (e.g.
- Traffic Management:
- Apply Round-Robin, Random, or IP Hash load balancing, token bucket rate limiting, and JWT/API key authentication to gRPC endpoints.
Configuration in routes.yaml
routes:
# Upstream gRPC Microservice Route with Native gRPC Health Probing
- type: "upstream"
prefix: "/order.OrderService"
algorithm: "round_robin"
targets:
- "http://127.0.0.1:50051"
- "http://127.0.0.1:50052"
health_check_type: "grpc" # Enable native gRPC health check
health_check_service: "OrderService" # Target service name (or empty for server check)
health_check_interval: 5s
consecutive_failures: 3
cooldown_period: 15s
rate_limit: "1000/sec"