DB endpoints
DB endpoints are stable service entry points for database connectivity. They let systems evolve (move databases, change hosts, swap managed backends) without rewriting connection strings everywhere.
Responsibilities
Section titled “Responsibilities”- Provide stable database entry points (
*.db.lef) so environments can evolve without rewriting connection strings everywhere. - Separate “what endpoint to use” from “which backend host/port currently serves it”.
Mental model (pattern)
Section titled “Mental model (pattern)”This is the TCP equivalent of the “front door” concept you get with HTTP ingress:
- Reverse proxy: stable hostname → routes HTTP(S) to a backend.
- DB endpoints: stable hostname (
*.db.lef) → routes TCP (SQL/Postgres) to a backend.
Entry points (pattern)
Section titled “Entry points (pattern)”- SQL Server:
tcp://<database>.db.lef:1433 - PostgreSQL (if applicable):
tcp://<database>.db.lef:5432
Not in scope (where the facts live)
Section titled “Not in scope (where the facts live)”- TCP proxy capability (service view): see TCP proxy (DB endpoints).
- Endpoint → backend mapping (authoritative): see TCP proxy.
- Database definitions: see Databases.
- Procedures (backup/restore, troubleshooting): see SQL operations and Proxy & routing.
Related models
Section titled “Related models”- Lane model (deployment-by-lane): Delivery aspect
- DNS and reachability model: DNS
- TLS trust model: TLS & certificates
Common failure modes (conceptual)
Section titled “Common failure modes (conceptual)”- Not on VPN/LAN →
db.lefnames may not resolve or route as expected. - TCP proxy down → multiple DB endpoints appear down at once.
- DNS drift/stale cache → you hit the wrong backend or can’t reach any backend.