Skip to content

Architecture Overview

Richard Kindler edited this page Nov 25, 2025 · 1 revision

📘 # Architecture Overview

The API Gateway architecture is composed of several key modules.

Core Components

API Layer

Handles requests, validation, rate limiting, and response shaping.

Transaction Queue

Ensures deduplication, ordering, and retry safety for outgoing transactions.

KMS Signer

Signs transactions using an AWS KMS asymmetric key. Private keys never touch memory.

Worker Layer

Watches the queue, signs transactions, broadcasts them, and handles backoff logic.

Metrics Layer

Exports metrics for:

Queue depth

Transaction success/failure rate

Endpoint latency

KMS signing duration

Worker throughput

Autoscaler

Uses Prometheus Adapter to scale based on:

Queue depth

Request per second

Worker lag

Storage

Used for idempotency tracking & metadata (Postgres or Dynamo, depending on setup).

Clone this wiki locally