Skip to main content
← All Case Studies

Scaling Supabase PostgreSQL to 150K+ Users: Architecture Decisions

Technical deep dive into how Blossend scales Supabase PostgreSQL to serve 150K+ users across 6 platforms with sub-100ms query performance.

Find your perfect provider in 33 seconds. 150K+ patients already have.

No insurance needed. No waiting weeks. Book today.

150K+ users · Ex-Amazon Engineer · Healthcare Innovation

No card charged today · 33-second booking · HIPAA compliant

Key Metrics

150K+

Total Users

<50ms

Avg Query Time

<200ms

P99 Query Time

$25/month

Database Cost

200+

Concurrent Connections

99.97%

Uptime

The Problem

When Pablo chose Supabase as Blossend's database platform, skeptics questioned whether an open-source Firebase alternative could handle the demands of a healthcare marketplace serving tens of thousands of users. The concerns were legitimate: Supabase was relatively new (launched 2020), healthcare data has strict HIPAA compliance requirements, the multi-platform architecture would create complex query patterns that could overwhelm a single database instance, and the real-time features needed for instant booking confirmations required sub-100ms response times. Traditional scaling wisdom says that at 150K+ users you need dedicated database infrastructure — potentially a managed PostgreSQL cluster with read replicas, connection pooling, query caching layers, and a dedicated database administrator to monitor and tune performance. Healthcare data adds additional complexity: row-level security policies (required for HIPAA multi-tenant isolation) add overhead to every query, encrypted columns for sensitive health information reduce index effectiveness, and audit logging requirements increase write volumes. The multi-platform architecture — six applications querying the same database with different access patterns — created additional challenges. OpenMyPro's booking queries are read-heavy with real-time requirements, while analytics queries from the admin dashboard are write-heavy with batch processing patterns. These conflicting workload profiles typically require separate database instances or at minimum read replicas.

The Solution

Pablo applied the database optimization principles he learned at Amazon to the Supabase PostgreSQL instance, implementing a multi-layered performance architecture. Layer one was schema design: tables were designed with denormalization where appropriate (storing frequently-accessed provider summary data directly on the booking table rather than requiring joins), composite indexes aligned with the most common query patterns, and partitioning of the analytics events table by month to keep query performance stable as data grows. Layer two was connection management: PgBouncer (Supabase's built-in connection pooler) was configured with transaction-mode pooling, allowing up to 200 concurrent application connections to be served by 20 actual database connections — essential for the serverless architecture where each Vercel function opens a new connection. Layer three was query optimization: the top 20 most-executed queries were analyzed and optimized using EXPLAIN ANALYZE, with the most impactful optimization being the provider matching query (rewritten from a complex multi-join to use a materialized view that is refreshed every 60 seconds, reducing query time from 800ms to 12ms). Layer four was caching: Supabase's built-in caching layer was supplemented with application-level caching using Vercel's Edge Config for data that changes infrequently (provider profiles, specialty categories, geographic boundaries), reducing database load by approximately 40%.

Results

The optimized Supabase PostgreSQL instance consistently serves 150K+ users across six platforms with average query response times under 50 milliseconds and P99 (99th percentile) under 200 milliseconds — well within the performance requirements for real-time healthcare booking. The database handles over 200 concurrent connections through PgBouncer's transaction-mode pooling, with zero connection errors in the past 12 months. The materialized view optimization for provider matching was the single highest-impact change, reducing the most critical query from 800ms to 12ms — a 67x improvement that directly enabled the 33-second booking experience. Total database cost remains at $25/month on Supabase Pro, serving workloads that would cost $500-2,000/month on AWS RDS or Google Cloud SQL at equivalent performance levels. The HIPAA compliance implementation through PostgreSQL row-level security proved robust: every query automatically filters data by the requesting application's schema permissions, and audit logs capture all data access events for compliance reporting. The 99.97% uptime over 18 months (approximately 2.6 hours of total downtime) exceeded the 99.9% SLA that Supabase provides, with the downtime events being Supabase's own planned maintenance windows rather than any issue with Blossend's architecture. The scaling journey validated that Supabase PostgreSQL, properly optimized, can serve as the sole database for a multi-platform startup well into the hundreds of thousands of users — likely into the millions before requiring more sophisticated infrastructure.

Skip the wait. Book a therapist in 33 seconds.

Compare 1,000+ brands instantly. Trusted by founders worldwide.

150K+ users · Ex-Amazon Engineer · Healthcare Innovation

No card charged today · AI-powered matching · 33-second booking

Frequently Asked Questions

Can Supabase handle 150K+ users for a healthcare platform?

Yes. Blossend's optimized Supabase PostgreSQL serves 150K+ users across 6 platforms with <50ms average query time, 99.97% uptime, and HIPAA-compliant row-level security, all on a $25/month Supabase Pro plan.

How was Supabase PostgreSQL optimized for scale?

Four layers: schema denormalization with composite indexes, PgBouncer transaction-mode pooling (200 connections from 20 actual), materialized views for heavy queries (800ms to 12ms), and edge caching reducing database load 40%.

Is Supabase HIPAA compliant for healthcare data?

Blossend implements HIPAA compliance through PostgreSQL row-level security policies, encrypted columns for sensitive data, and comprehensive audit logging. Supabase's infrastructure meets healthcare data requirements when properly configured.

Get Founder Insights Weekly

Startup lessons, technical deep dives, and behind-the-scenes of building a 14-platform ecosystem. No spam.

Join 150K+ people who found their provider. Start free today.

150K+ users who find therapists, trainers, and nutritionists on OpenMyPro.

150K+ users · Ex-Amazon Engineer · Healthcare Innovation

No card charged today · Cancel anytime · HIPAA compliant

Blossend builds healthcare technology that connects patients with providers. Try it free →

Build your professional portfolio

Free to get started. No card charged today.

Get Started

Tools We Recommend

Find healthcare providers

AI-powered matching. Book a provider in 33 seconds.

Try OpenMyPro

Discover trending brands

Product Hunt-style brand discovery with AI insights.

Explore Brands

AI-Powered Healthcare Tech

The parent company behind OpenMyPro and the Blossend ecosystem.

Learn More

Ready to work together? Get in touch or explore our platforms.

More tools by the same team

Find Healthcare Providers Instantly

AI-powered matching. Book a therapist, trainer, or nutritionist in 33 seconds.

Try OpenMyPro Free

Work With Me

Get updates on new projects, tools, and tech insights.

No spam. Unsubscribe anytime.

Visit Blossend.com →

Explore the full portfolio of independent AI tools and editorial properties at blossend.com.