# Separate connection for each tenant?

**URL:** <https://community.auth0.com/t/separate-connection-for-each-tenant/44525>\
**Category:** Get Help\
**Created:** [June 11, 2020, 4:40pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525 "2020-06-11T16:40:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joemckie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joemckie/32/21879_2.png) [@joemckie](https://community.auth0.com/u/joemckie)\
**Post date:** [June 11, 2020, 4:40pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525/1 "2020-06-11T16:40:39Z")

</div>

Hi

I’m currently trying to determine the architecture of my service. It’s a multi-tenant SaaS platform – overall we have two types of user: ones that sign up to us directly (let’s call them owners), and customers that sign up to each platform (customers).

I’ve begun the implementation by using two connections (External-Customers and Internal-Users), but I can see an issue arising where the same customer may conflict if they are registered on another platform using our system.

I was wondering whether it might make sense to create a connection for each tenant? That way there won’t be any chance of collisions happening. I found some articles that suggest only 50 connections can be used per client however we are using an API gateway to manage external auth – will the same limits apply here?

To give a very general overview of how things should work:

Internal users should register/login via Universal Login  
Any other connection will register and authenticate via our API gateway.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 12, 2020, 11:02pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525/3 "2020-06-12T23:02:55Z")

</div>

Hi @joemckie,

Welcome to the Community!

Our docs describe setting up multi-tenant platform with seperate connections.

> **[Multi-Tenant Applications Best Practices](https://auth0.com/docs/get-started/auth0-overview/create-tenants/multi-tenant-apps-best-practices)**
>
> Describes best practices for how to use Auth0 to secure your multi-tenant applications.

The connection limit is described as follows:

> If you use [Lock](https://auth0.com/docs/libraries/lock) in your applications, Lock supports a maximum of **50 Database Connections** per [application](https://auth0.com/docs/applications). Enterprise Connections are not affected by this limit. If you use the New Universal Login Experience, Lock is not involved and this limitation therefore does not affect you.

Are you planning on using lock? If not, it looks like you should be okay. If you are, then you may want to consider an enterprise plan.

---

<div class="post-metadata">

**Author:** ![joemckie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joemckie/32/21879_2.png) [@joemckie](https://community.auth0.com/u/joemckie)\
**Post date:** [June 12, 2020, 11:50pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525/4 "2020-06-12T23:50:57Z")

</div>

Hi Dan, thanks for the response!

I actually followed that guide initially and currently I’m assigning each user a platform ID in app\_metadata, with the two connections I mentioned earlier. We’re currently using Universal Login, so the limit should be ok! But I’ll bear that in mind, just in case we use Lock at some point.

So just to clarify, there wouldn’t be any drawbacks of having a connection for each platform?

Another question I had was if there is a way to have separate social accounts for each tenant? It looks like social logins exist outside of the database scope, and we can’t find a way to split these for each platform. Would that require a completely new auth0 tenant?

Are there any price guides for Enterprise plans anywhere by any chance?

Thanks!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 15, 2020, 4:48pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525/5 "2020-06-15T16:48:40Z")

</div>

Hi @joemckie,

I spoke to soon. We are rolling out entity limits for self-service accounts tomorrow ☹

This includes connection limits for dev pro, dev, and free plans. Limits are stated [here](https://auth0.com/docs/policies/entity-limits).

My guidance for enterprise plan pricing questions would be to submit your questions to our sales team. You can do that via the ‘talk to sales’ button in the nav bar.

---

<div class="post-metadata">

**Author:** ![joemckie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joemckie/32/21879_2.png) [@joemckie](https://community.auth0.com/u/joemckie)\
**Post date:** [June 16, 2020, 9:36pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525/6 "2020-06-16T21:36:05Z")

</div>

Oh that’s a shame… will have a word with the sales team when I’m ready for a live account 🙂

Thanks for letting me know!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 17, 2020, 8:20pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525/7 "2020-06-17T20:20:49Z")

</div>

No problem. Let us know if you have any questions.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 2, 2020, 8:20pm UTC](https://community.auth0.com/t/separate-connection-for-each-tenant/44525/8 "2020-07-02T20:20:50Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
