~/talk

Scalable Multi-Tenant Frontend for an E-Commerce Platform

Talkat Conf42 JavaScript 2023 · on Thursday, 2023-11-16· [frontend-architecture, web-performance]
slides:none on file

Migrates a per-tenant AWS Fargate React stack to a single Next.js site on Vercel that identifies tenants by domain via a global tenant table and a middleware fetching mapping (or optional host-header lookup), applies URL rewrites so tenant IDs stay hidden, and uses tenant-aware caching with ISR TTL 60s to avoid cross-tenant cache leakage. Implementation details, demo repo and tradeoffs (edge compute, serverless, unlimited Vercel domains, routing vs next.config rewrites) are shown, with measurable latency and onboarding gains.

AI-written summary · about

  1. 0:00intro
  2. 0:22preamble
  3. 0:37about guilherme
  4. 1:01about mercloud
  5. 1:43what is a b2b e-commerce?
  6. 4:15who are the customers?
  7. 5:05where we started
  8. 5:23our mvp architecture
  9. 5:54constraints
  10. 7:11re-imagining our architecture
  11. 8:26the solution
  12. 9:02tenancy models
  13. 9:34isolation strategies
  14. 10:38benefits of a multi-tenant architecture
  15. 12:13technology choices
  16. 14:20compute at the edge
  17. 15:35serverless, in a nutshell
  18. 16:44the idea
  19. 17:19the challenges
  20. 19:46api limits?
  21. 20:18identyfying the tenant
  22. 23:51routing
  23. 24:39caching page outputs
  24. 25:12incremental static regeneration (isr)
  25. 27:08tenant-based routing
  26. 29:37solution: url rewrites
  27. 30:40demo time!!
  28. 34:55source code
  29. 35:54vercel platforms starter kit
  30. 37:42where we landed - mercloud's architecture overview
  31. 38:42outcomes
  32. 39:44lessons learned
  33. 43:12thanks!
~/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.