Architecture Q: we use per-customer schema. Can supabase scale to 100s of schemas?
For separating customer data we use a per-customer schema approach. So far we have 20 schemas and our system has no issues so far. Are there any limits or scaling concerns if we were to scale to 100s of schemas?
2 Replies
That is a postgres question. I've not seen any limits but you might check the web.
BUT if you are using the REST API it can get tricky to enable API access to lots of schemas.
Also consider maintenance as I assume then you have lots of similar tables that you have to deal with future changes to across multiple schemas.
Postres is more efficient if you use a column/RLS to share tables though as the caching of table indexes and the like works out better than 100's of the same table structure in the different schemas.
Thank you, thanks for the pointers. Will research some more as we've to scale to many more schemas in the coming weeks.