Site Search for Web Apps: Postgres vs Elasticsearch vs Algolia
Choosing search for your web app? Compare Postgres full-text search, Elasticsearch and Algolia on cost, relevance, effort and when to outsource the build.
Compare shared, schema-per-tenant and database-per-tenant SaaS multi-tenancy models, with trade-offs in cost, isolation and scale for product teams.
Almost every SaaS product eventually faces the same question: how do we serve many customers from one platform without their data, performance or configuration getting tangled? The answer is your multi-tenancy model, and it is one of the hardest decisions to reverse once real customers are onboarded.
This guide explains the common models in plain language so that a CTO, founder or product manager can make the decision deliberately, and challenge an outsourced engineering team when needed.
A tenant is a customer organisation using your product. It has its own users, data, settings and often its own branding and billing. Multi-tenancy means many tenants share the same running application and infrastructure, while the system guarantees that one tenant can never see or affect another.
The opposite is single-tenant hosting, where each customer gets a dedicated deployment. It is simple to reason about but expensive to run and slow to update across dozens of customers.
| Model | How it works | Strengths | Weaknesses |
|---|---|---|---|
| Shared database, shared schema | All tenants in the same tables, separated by a tenant_id column |
Lowest cost, simplest operations, easy cross-tenant analytics | Isolation relies on code and policies; noisy neighbours; harder per-tenant restore |
| Shared database, schema per tenant | One database, a separate schema (set of tables) for each tenant | Better logical isolation, easier per-tenant export | Migrations must run once per schema; tooling gets heavier as tenants grow |
| Database per tenant | Each tenant has its own database | Strongest isolation, per-tenant backup, restore and data residency | Highest cost and operational overhead; connection management is complex |
There is no universally correct choice. Early-stage products with many small customers usually start with a shared schema. Products selling to regulated or enterprise buyers often need stronger isolation.
Before choosing, answer these with your sales and compliance people, not only your engineers:
The scariest SaaS incident is one customer seeing another’s data. In a shared-schema design this usually comes from a single query that forgot the tenant filter. Good teams reduce that risk by design rather than by memory:
In a shared setup, one heavy tenant running a large export can slow everyone down. Plan for it early:
That last point is why many teams adopt a hybrid approach. Most tenants share infrastructure, while a premium tier gets dedicated resources.
Multi-tenancy affects how you ship. Schema changes in a schema-per-tenant or database-per-tenant model must be automated and repeatable across every tenant, with a clear plan for partial failures. Feature flags let you release gradually to selected tenants instead of everyone at once. Tenant-level configuration, such as branding, limits and enabled modules, should live in data, not in code branches.
Ask any vendor proposing a SaaS build to explain their tenancy model in writing, including how they will prove isolation through testing. A team that answers with diagrams, trade-offs and test plans is far more reliable than one that simply says “we use best practices”. If you are still shaping scope, an MVP development approach helps you choose the simplest model that fits today while leaving room to grow. Hosting and cost implications are also worth reviewing alongside our AWS cost optimisation checklist.
AkMo Technologies designs and builds multi-tenant platforms for international clients through our web development services. To discuss your architecture, contact us.
Choosing search for your web app? Compare Postgres full-text search, Elasticsearch and Algolia on cost, relevance, effort and when to outsource the build.
WebSockets vs SSE vs polling: how to choose the right approach for live dashboards, chat and notifications, with cost, scaling and testing trade-offs.
How to integrate a payment gateway into a web or mobile app: choosing a provider, hosted vs custom checkout, webhooks, security and testing before launch.
Tell us about your platform, your product idea or the systems you want to modernise. Someone from our Chennai engineering team will get back to you personally.