~/talk

Multitenant Web Applications with Phoenix

Talkat ElixirConf EU 2024 · 2024-04-18..04-19· [databases]
links:none on file
slides:none on file

Shows a concrete Phoenix + Ecto implementation that isolates each client in a separate Postgres schema using Triplex to create/rename/drop tenants, a Plug that assigns the tenant from URL, and Ecto calls using the Ecto prefix (Triplex.prefix) to query the right schema. Migrations live in a tenant directory and Triplex applies them to all tenants; this setup works for ~30 tenants in production but migrations become slow at scale and cross-schema joins are awkward, while single-instance replication and dump/restore per tenant are trivial.

AI-written summary · about

  1. 0:00Introduction
  2. 2:06Multi-tenancy overview
  3. 7:07Phoenix request lifecycle
  4. 11:21Multi-tenancy with Triplex
  5. 16:33Migrations and tenants
  6. 18:21Benefits and limits
  7. 21:44Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.