"매 system 간 wire-level contract 의 versioned, versionable specification". 매 protocol standard 의 — message format + transport + semantics + evolution rules. 2026 의 modern stack 의 protobuf + gRPC + OpenAPI + AsyncAPI 의 dominant.
매 핵심
매 components of protocol spec
Syntax: 매 wire format (binary, JSON, XML).
Semantics: 매 message meaning + state machine.
Transport: TCP, UDP, HTTP/2, QUIC, WebSocket.
Versioning: 매 backward / forward compat rules.
Error model: 매 status codes, retry semantics.
매 design 원칙
Forward compat: 매 old client 의 new server 의 read.
Backward compat: 매 new client 의 old server 의 read (graceful).
Self-describing: 매 schema 의 embed (JSON-Schema, protobuf descriptor).
Idempotency: 매 retry 의 safe.
Explicit versioning: 매 URL /v1/, header, or schema apiVersion.
GET /v1/orders/123
Sunset: Wed, 01 Jan 2027 00:00:00 GMT
Deprecation: true
Link: </v2/orders/123>; rel="successor-version"
Schema evolution rules (protobuf)
ALLOWED:
- Add new optional field (new tag #)
- Rename field name (tag # is contract)
- Add new RPC
FORBIDDEN:
- Change tag #
- Change field type (int32 → string)
- Make optional → required
- Reuse reserved tag
// REST RFC 7807
{"type":"https://api.example.com/errors/insufficient-funds","title":"Insufficient funds","status":422,"detail":"Account balance is $5; tried to withdraw $100","instance":"/accounts/12345/withdraw"}
AsyncAPI — event protocol
asyncapi:3.0.0info:{title: Order Events, version:1.0.0}channels:order.created:address:order.v1.createdmessages:OrderCreated:payload:$ref:'#/components/schemas/Order'
매 결정 기준
상황
Approach
Internal microservice, polyglot
gRPC + protobuf
Public API
REST + OpenAPI 3.1
Browser real-time
WebSocket / WebTransport
Event-driven
AsyncAPI + Kafka/NATS
Embedded / IoT
MQTT + protobuf
기본값: 매 protobuf + gRPC (internal), 매 OpenAPI + JSON (external).