docs: add docs folder (architecture, developer, usage); update README; wire probe TTL cache + concurrency notes into docs
This commit is contained in:
23
docs/architecture/transport.md
Normal file
23
docs/architecture/transport.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Transport Contracts
|
||||
|
||||
## Context
|
||||
- Tenant: HTTP x-tenant-id; NATS tenant-id
|
||||
- Correlation: HTTP x-correlation-id; NATS x-correlation-id + correlation-id
|
||||
- Trace: HTTP traceparent; NATS traceparent + trace-id
|
||||
|
||||
## Internal RPC (gRPC)
|
||||
- Aggregate: CommandService (submit commands)
|
||||
- Projection: QueryService (execute queries)
|
||||
- Runner: RunnerAdmin (drain, status, reload)
|
||||
- All calls set deadlines and propagate context metadata
|
||||
|
||||
## NATS JetStream
|
||||
- Streams:
|
||||
- AGGREGATE_EVENTS: tenant.*.aggregate.*.*
|
||||
- WORKFLOW_COMMANDS, WORKFLOW_EVENTS
|
||||
- Producers set headers: tenant-id, Nats-Msg-Id, correlation, traceparent/trace-id
|
||||
- Consumers use AckPolicy::Explicit, bounded ack_wait, max_deliver, max_ack_pending
|
||||
|
||||
## Routing
|
||||
- Gateway routes per-tenant to shards for Aggregate/Projection/Runner
|
||||
- Routing tables hot-reload atomically
|
||||
Reference in New Issue
Block a user