/gateway

api gateway

Primary LanguageGoMIT LicenseMIT

Gateway

HTTP -> Proxy -> Router -> Middleware -> Client -> Selector -> Node

Protocol

  • HTTP -> HTTP
  • HTTP -> gRPC
  • gRPC -> gRPC

Encoding

  • Protobuf Schemas

Service

Service -> Endpoint -> Backend

Endpoint

  • prefix: /api/echo/*
  • path: /api/echo/hello
  • regex: /api/echo/[a-z]+
  • restful: /api/echo/{name}

Middleware

  • cors
  • auth
  • datacenter
  • dyeing
  • logging
  • tracing
  • metrics
  • ratelimit
  • retry