Architecture

Understand how Odyssey isolates data, handles multi-region edge routing, and secures tenant boundaries.

System Overview

Edge Routing

Every incoming request is intercepted by Odyssey's globally distributed Edge Middleware. It performs instant DNS lookups, resolves the target tenant based on subdomain or custom domain, and injects the `X-Tenant-ID` header before passing the request to your application layer.

Database Isolation (RLS)

We enforce multi-tenancy at the database level using PostgreSQL Row-Level Security (RLS). Your application assumes a temporary database role scoped exclusively to the `X-Tenant-ID`. It is physically impossible for queries to leak data between tenants, even if application logic fails.

Authentication

Sessions are tied to both the user and the specific tenant. A user can belong to multiple workspaces, but authentication tokens are explicitly minted for the active tenant context.