Skip to content

Patterns

Architecture patterns.
For APIs, events and AI.

Reference designs I use to frame conversations about API and AI connectivity: the problem each one solves, when it fits, when it does not, and what it costs you.

  • Centralised AI gateway

    One governed entry point for every model call, so teams can use several LLM providers without each one rebuilding keys, quotas, routing and logging.

    • Consumers
    • Gateway layer
    • Model providers
  • Hybrid API gateway

    Manage every gateway from one cloud control plane while the data planes that carry traffic run next to your services, in the cloud or on premises.

    • Clients
    • Gateway layer
    • Your services
  • Multi-region gateway with failover

    Run the gateway and its services in more than one region, route clients to the nearest healthy one, and fail over when a region goes down.

    • Clients
    • Global routing
    • Regional gateways
    • Regional services
  • Zero-trust API security

    Authenticate and authorise every call, at the edge with OAuth and OIDC tokens and between services with mutual TLS, instead of trusting anything inside the network.

    • Callers
    • Edge and identity
    • Service zone
  • Event-driven integration behind an API front door

    Let partners and apps publish and receive events through familiar, governed HTTP APIs, while an event broker does the fan-out behind the gateway.

    • Outside parties
    • API front door
    • Event platform
    • Internal consumers
  • Service mesh with an edge gateway

    Use a gateway for north-south traffic entering your platform and a service mesh for east-west traffic between services, each doing the job it is built for.

    • External clients
    • North-south
    • East-west (mesh)
    • Mesh control
  • Retrieval-augmented generation with governed retrieval

    Ground model answers in your own documents without leaking them, by enforcing each user's permissions at retrieval time and sending prompts through a governed AI gateway.

    • Users
    • Application
    • Governed access
    • Data and models
  • MCP tool access through a gateway

    Give AI agents access to tools through Model Context Protocol servers behind one gateway that authenticates them, limits which tools they may call and records every call.

    • Agents
    • Gateway layer
    • MCP servers
    • Systems of record

These are simplified starting points, not a design for any particular environment. Real architectures depend on your constraints, teams and existing platforms.