logo

Multi-tenant application

Single-tenant vs Multi-tenant

visas-au

Application

visas-au.tlscontanct.com

ip: 10.10.10.10

Gateway

gateway.tlscontanct.com

ip: 11.11.11.11

Service A

visas-au.servicea.tlscontanct.com

ip: 12.12.12.12

Service B

visas-au.serviceb.tlscontanct.com

ip: 13.13.13.13

Database A

ip: 14.14.14.14

Database B

ip: 15.15.15.15

vcas

Application

visas-au.tlscontanct.com

ip: 20.20.20.20

Gateway

gateway.tlscontanct.com

ip: 21.21.21.21

Service A

vcas.servicea.tlscontanct.com

ip: 22.22.22.22

Service B

vcas.serviceb.tlscontanct.com

ip: 23.23.23.23

Database A

ip: 24.24.24.24

Database B

ip: 25.25.25.25

visas-fr

Application

visas-au.tlscontanct.com

ip: 30.30.30.30

Gateway

gateway.tlscontanct.com

ip: 31.31.31.31

Service A

visas-fr.servicea.tlscontanct.com

ip: 32.32.32.32

Service B

visas-fr.serviceb.tlscontanct.com

ip: 33.33.33.33

Database A

ip: 34.34.34.34

Database B

ip: 35.35.35.35

Multi-tenant app Approachs

URL Path | Subdomain

URL path approach

slack

https://app.slack.com/client/tenant/page

Pros

Easy to implement

Cons

Tenants shares the same localStorage and cookies

Check example

Subdomain approach

slack

https://tenant.ign.com/page

Pros

Distinct localStorage and cookies per tenant

Cons

Needs proxy middleware configuration

Check example

Real world example

Multitenant applications with Next.js