Skip to content
2. One gateway for all user traffic

2. One gateway for all user traffic

  • Status: Accepted
  • Date: 2026-04

Context

Users need three things: the dashboard, their IDE, and a preview of the application they run in the workspace. All three must be authenticated, and the IDE must only ever reach the user’s own workspace. code-server has no user management of its own in this setup, so a workspace that is reachable directly is a workspace anyone on the network can use.

Decision

A single gateway binary serves three hostnames (dashboard, dev, test) and is the only way into a workspace. Workspace Services are cluster-internal, and NetworkPolicies restrict which pods may reach them. The gateway keeps no local state: sessions live in encrypted cookies and everything else in the Kubernetes API, so it scales horizontally.

Consequences

  • Authentication, authorization, auditing and activity tracking happen in one place, for every request.
  • No per-workspace Ingress or DNS record is needed; a new workspace is reachable as soon as its pod is ready.
  • The gateway sits on the data path of every keystroke and must tunnel WebSockets; its availability is the platform’s availability.