Fri, 24 Jul 2026 16:13:44 +0800

This commit is contained in:
lyc
2026-07-24 16:13:44 +08:00
commit 7381b59874
29 changed files with 3832 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# ADR 0001 — Static Backend Configuration
**Status**: Draft
**Date**: 2026-07-23
## Context
The gateway needs to know which upstream inference servers to route requests to. During initial development, the set of backends is known at deploy time.
## Decision
Backends are configured via a static TOML config file. The binary reads `config.toml` from the working directory by default, or accepts another path through `--config <PATH>`.
```toml
[[backend]]
name = "gpu-01"
address = "http://10.0.1.10:8000"
[[backend]]
name = "gpu-02"
address = "http://10.0.1.11:8000"
[cache]
block_size = 512
expiry_seconds = 300
```
`name` is a human-readable identifier for logging/metrics. `address` is the backend base URL. Cache block size and cache-location idle expiry are global startup settings.
## Consequences
- Simple, no external dependencies.
- Adding/removing backends requires a config change and restart.
- Dynamic registration can be added later.
## Alternatives Considered
- CLI flags per backend, environment variables, dynamic API.