Project

General

Profile

Actions

Architecture

Atlas is four services behind one gateway.

The gateway terminates TLS, authenticates the request, applies the tenant's rate limit and routes
to the service that owns the path. It holds no state beyond a short-lived token cache. The
identity service owns tenants, users, service accounts and API keys, and is the only thing that
writes to the identity database. The event bus carries every domain event; consumers are grouped
so that a slow consumer cannot hold up a fast one. The job runner executes anything that must not
happen inside a request: invoice generation, exports, webhook delivery.

Request path

  1. The gateway resolves the tenant from the host or the API key.
  2. It introspects the token against the identity service, with a cache keyed on the token hash.
  3. It applies the rate limit, which is a token bucket per tenant per route class.
  4. It forwards the request with a correlation id that every downstream log line carries.

Invariants

  • Every write emits exactly one event, in the same transaction as the write.
  • Every consumer is idempotent on the event id: replaying a day must change nothing.
  • No service reads another service's database. Ever. The event bus exists so that it does not have to.

Updated by Mara Oyelaran 4 months ago · 1 revisions

Also available in: PDF HTML TXT