# How I Scaled My NextJS + Supabase App To Handle 10,000 Users

Source: https://www.youtube.com/watch?v=B-8kYeNB_6M
Recap page: https://rapidrecap.app/video/B-8kYeNB_6M
Generated: 2026-02-17T17:10:40.499+00:00

---
## Quick Overview

The developer scaled their Next.js + Supabase app from zero to over 10,000 users and $4,000 in monthly revenue within 30 days by implementing significant performance optimizations, primarily by upgrading the Supabase compute instance to the XL tier and aggressively caching read-heavy queries using Redis and React's server components.

**Key Points:**
- The app scaled from zero to 2,706 users initially, quickly reaching over 10,000 users in 30 days.
- Monthly revenue grew from $0 to $4,000 within the same 30-day period.
- The primary performance bottleneck was identified in slow PostgreSQL queries related to reading team data, with mean query times reaching 8 seconds on the initial small compute instance.
- The developer upgraded the Supabase compute instance from the starter $20/month package to the XL tier ($98/month) to handle read traffic.
- Key optimization involved implementing Redis caching for read operations on team data, effectively bypassing PostgreSQL for cached reads.
- Further performance improvements were achieved by migrating heavy read operations away from PostgreSQL and onto a dedicated read-only replica instance.
- The developer also improved application performance by setting up automated background jobs (via Warp Agents) for tasks like updating localizations and fetching error states.

![Screenshot at 0:04: The creator highlights the initial scaling achievement: the app grew from zero users to over 10,000 users and $4,000 in revenue in the past 30 days, setting up the context for discussing performance fixes.](https://ss.rapidrecap.app/screens/B-8kYeNB_6M/00-00-04.jpg)

**Context:** The video details the technical journey of scaling a startup application named Yorby, which functions as a social media marketing platform, from a very small user base to over 10,000 users and $4,000 in monthly revenue in just 30 days. The creator focuses heavily on the performance bottlenecks encountered, primarily relating to database latency with Supabase's PostgreSQL instance, and the specific optimization strategies implemented to handle the rapid growth.

## Detailed Analysis

The creator achieved massive growth, scaling their Next.js/Supabase app, Yorby, to over 10,000 users and $4,000 in monthly revenue in 30 days. Initially, the app was running on the smallest Supabase plan ($20/month), which proved incapable of handling the load, leading to slow query times (up to 8 seconds mean time for certain queries accessing the 'teams' table). The first major step was upgrading the Supabase compute instance to the XL tier ($98/month) to provide more resources, which helped alleviate immediate pressure but didn't solve the core issue of inefficient queries. The creator then used Supabase's Query Performance monitoring tab to identify the most expensive queries, realizing that slow reads from the 'teams' table were the main problem. The key optimization involved implementing Redis caching via a custom `getCachedTeamBySlug` function. This function checks Redis first, returning data immediately if cached (a Redis hit), thus eliminating unnecessary PostgreSQL queries for cached team data. This strategy was crucial because the application is heavily read-based, especially for team information. Furthermore, the creator notes that they are actively moving read operations off the main PostgreSQL instance and onto a read-only replica to further improve performance and reduce load on the primary database. Finally, the creator mentions using Warp Agents for automation, such as running scheduled jobs for localization updates and PR checks in the background, to keep the main application running smoothly.

### Growth Metrics

- Reached over 10,000 users and $4,000 in monthly revenue in 30 days
- Initial performance issues stemmed from slow PostgreSQL queries on the 'teams' table (mean time up to 8 seconds).

### Database Scaling

- Upgraded Supabase compute instance from starter ($20/month) to XL tier ($98/month) to handle increased load.

### Caching Strategy

- Implemented Redis caching using a custom function (`getCachedTeamBySlug`) to serve read requests for team data directly from Redis, avoiding slow PostgreSQL reads.

### Further Optimization

- Moved heavy read operations away from the primary PostgreSQL instance onto a dedicated read-only replica instance.

### Automation with AI/Agents

- Utilized Warp Agents for background tasks like running scheduled jobs to update localizations and check PR status, ensuring core application responsiveness.

### Developer Takeaway

- Caching read-heavy data (like team info) is critical for performance when scaling applications built with Next.js and Supabase.

![Screenshot at 0:04: The creator highlights the initial scaling achievement: the app grew from zero users to over 10,000 users and $4,000 in revenue in the past 30 days, setting up the context for discussing performance fixes.](https://ss.rapidrecap.app/screens/B-8kYeNB_6M/00-00-04.jpg)
![Screenshot at 0:49: The creator navigates to the Yorby.ai homepage, introducing the app as a social media marketing platform that helps users create high-performing content.](https://ss.rapidrecap.app/screens/B-8kYeNB_6M/00-00-49.jpg)
![Screenshot at 1:06: The application's 'Viral Content Database' interface is shown, displaying various high-performing video content examples.](https://ss.rapidrecap.app/screens/B-8kYeNB_6M/00-01-06.jpg)
![Screenshot at 2:38: The creator displays the Supabase dashboard, specifically the Observability tab, to show the CPU usage metrics before optimizations.](https://ss.rapidrecap.app/screens/B-8kYeNB_6M/00-02-38.jpg)
![Screenshot at 3:41: The Query Performance tab in Supabase is displayed, highlighting several slow queries \(up to 76 seconds time consumed\) against the 'teams' table.](https://ss.rapidrecap.app/screens/B-8kYeNB_6M/00-03-41.jpg)
