Zum Inhalt springen
use-cases / one-sandbox-per-customer / hero
CONTAINER · MULTI-TENANT-SAAS

Ein Sandbox pro Customer, automatisch

Hör auf, tenant_id in jede Tabelle zu streuen. Wenn sich ein Kunde anmeldet, kopiert ein Exec-Skript einen Fresh-Customer-Container und übergibt ihnen ihre eigene URL, ihr eigenes Dateisystem, ihre eigene SQLite. Isolation ist das Betriebssystem zwischen ihnen, nicht eine WHERE-Klausel.

use-cases / one-sandbox-per-customer / trigger

What that single API call provisions

Each POST to /api/v1/projects/{id}/containers spins up an isolated environment. One call, one tenant, one URL handed back to your app.

01 · WEBHOOK

Signup triggers the container POST

Your Stripe (or any billing) webhook hits a Hoody Exec script. No Express, no server config — just a file in scripts/.

02 · ISOLATION

Linux namespaces, not a WHERE clause

The new container has its own filesystem, its own SQLite, its own ramdisk. Tenant A literally cannot see tenant B's data.

03 · URL

A unique URL back to your app

The response includes a container URL. Your app redirects the user into their own sandbox in the same deploy window.

04 · FIREWALL

Per-tenant network rules cloned

Container network and firewall rules are copied from your template. Every new tenant starts from the same security baseline.

05 · IDLE

Zero cost when idle

Stop the container and it costs nothing. BTRFS keeps only the delta from your template — disk stays cheap even at scale.

06 · OFFBOARD

DELETE container = forget tenant

One DELETE call removes the container and all their data. GDPR offboarding is not a script, it is a single HTTP call.

The whole flow is one webhook handler. No Kubernetes operator, no namespace YAML, no cluster admin. Three HTTP calls: webhook in, container out, URL to user.

use-cases / one-sandbox-per-customer / compare

Geteilte Multi-Tenancy vs. Container pro Kunde

Die traditionellen Optionen waren entweder eine Spalte auf jeder Tabelle oder eine Flotte aus VMs, die du dir nicht leisten konntest. Hoody ist eine dritte Form: Container, billig genug, um jedem Kunden einen zu geben.

DIMENSION
GETEILTE DB · TENANT_ID
HOODY · CONTAINER PRO KUNDE
  • ISOLATIONWHERE tenant_id = $1 — und du hoffst, dass jede Query daran denktLinux-Namespaces. Tenant A kann das Filesystem von Tenant B buchstäblich nicht sehen.
  • DATA-LEAK-OBERFLÄCHEjeder JOIN, jeder ORM-Hook, jedes Reporting-Skriptdie Container-Grenze. Ein Artefakt zu auditen, nicht 200 Query-Stellen.
  • PER-TENANT-CONFIGFeature-Flags-Tabelle, brüchig, halb getestet in DevEdit der Environment eines Containers. Die anderen 399 bleiben unverändert.
  • NOISY NEIGHBORein heavy Customer kann die geteilte DB blockenContainer-CPU- und Disk-Quotas; die Last eines Tenants bleibt in seiner Box.
  • OFFBOARDINGDELETE … WHERE tenant_id … plus 12 weitere Tabellen, die du vergessen hastDELETE den Container. Ihre Daten gehen mit. GDPR ist ein HTTP-Call.
  • KOSTEN IM IDLEjede Zeile kostet Storage, auch wenn der Kunde schläftstoppe den Container — null CPU, null RAM. BTRFS behält nur das Delta.
  • keine tenant_id-Spalten
  • keine Row-Level-Security-Audits
  • kein Namespace-YAML
  • delete = vergessen
use-cases / one-sandbox-per-customer / punchline

Multi-Tenancy ist kein Architekturproblem mehr. Es wird zu einem `cp`-Befehl.

ONBOARDPOST /containers/$TEMPLATE/copy
OFFBOARDDELETE /containers/$CID
PER-TENANT-TWEAKPATCH /containers/$CID [ env_vars ]
  • Namespace-Grade-Isolation
  • GDPR-Delete in einem Call
  • ein Container pro Account
use-cases / one-sandbox-per-customer / replaces

Was das ersetzt

Per-Tenant-Isolation hat historisch entweder eine clevere WHERE-Klausel oder ein teures Cluster bedeutet. Container pro Kunde verdrängt die üblichen Workarounds:

  • Geteilte Multi-Tenancy (tenant_id-Spalte)Eine schlechte Query legt alle offen
  • Eigene Tenant-Isolation-MiddlewareSelbstgebaute Guard, die du für immer pflegst
  • Postgres-Row-Level-Security-PoliciesRichtige Antwort, teuer pro Tabelle zu auditen
  • Kubernetes-Namespace pro TenantCluster-Level-Overhead, Ops-Team nötig
  • Per-Customer-Schemas / DatenbankenMigrations-Multiplikator, Connection-Pool-Schmerz
  • Stripe-Metering-Zeilen in einer geteilten TabelleUsage-Tracking auf dieselbe geteilte Box geklebt
use-cases / one-sandbox-per-customer / cta

Idle Customers kosten nichts. Aktive skalieren on demand. Das Ganze läuft auf $49 Bare Metal, bis du Hunderte zahlende User hast.

use-cases / one-sandbox-per-customer / related

Lies die anderen