Load testing a Bubble app involves simulating concurrent users to identify performance bottlenecks before they affect real users. This tutorial covers choosing load testing tools like k6 or LoadRunner, targeting your Bubble app's API endpoints, interpreting results to find slow workflows and database queries, and using Bubble's capacity planning metrics to determine when to upgrade your plan.
Overview: Load Testing a Bubble Application
This tutorial guides you through testing your Bubble app's performance under simulated heavy usage. You will learn how to generate realistic traffic, measure response times, identify weak points, and plan for growth.
Prerequisites
- A Bubble app deployed to the development or live environment
- Basic understanding of API endpoints and HTTP requests
- A load testing tool installed (k6 recommended for free option)
- Access to your Bubble app's Logs tab and Settings → App Metrics
Step-by-step guide
Identify your critical user flows
Identify your critical user flows
Before testing, map out the most common and important actions users take in your app. These typically include: page loads for your busiest pages, search operations, form submissions that create database records, and API calls to external services. For each flow, note the specific Bubble page URL or API endpoint URL. If your app has backend workflows exposed as API endpoints, include those too. Focus on flows that will experience the most traffic during peak usage.
Expected result: A list of 5-10 critical user flows with their corresponding URLs and expected request patterns.
Set up a load testing tool
Set up a load testing tool
Download and install k6, a free open-source load testing tool, from k6.io. Create a test script file that defines your test scenarios. For page load testing, use HTTP GET requests to your Bubble page URLs. For form submissions, use POST requests to your backend workflow endpoints. Define the number of virtual users (start with 10-20) and the test duration (2-5 minutes). k6 scripts are written in JavaScript and define scenarios that ramp up virtual users over time to simulate realistic traffic patterns.
Pro tip: Start with a small number of virtual users (10) and gradually increase to find the breaking point rather than immediately testing with hundreds of users.
Expected result: A k6 test script is ready targeting your Bubble app's key pages and endpoints.
Run the load test and collect results
Run the load test and collect results
Execute your k6 test script against your Bubble app. While the test runs, monitor two things simultaneously: the k6 output showing response times, error rates, and throughput, and your Bubble Logs tab showing server-side execution times and WU consumption. After the test completes, k6 provides summary metrics including median response time, 95th percentile response time, requests per second, and error percentage. Record these as your baseline.
Expected result: You have baseline performance metrics showing how your app handles concurrent users.
Interpret results and identify bottlenecks
Interpret results and identify bottlenecks
Look for these warning signs in your results: response times above 3 seconds indicate slow pages or workflows, error rates above 1 percent suggest capacity limits, and response times that increase linearly with more users indicate a bottleneck that will worsen under load. In Bubble's Logs tab, check which workflows consumed the most WUs during the test. The highest-WU operations are your optimization targets. Common Bubble bottlenecks include: database searches with :filtered, searches inside repeating groups, complex conditional evaluations, and external API calls that add latency.
Expected result: You have identified the specific pages, workflows, or queries that degrade under load.
Plan capacity based on results
Plan capacity based on results
Use your test results to estimate capacity needs. If 20 virtual users cause acceptable response times but 50 users cause degradation, your current setup handles roughly 20-30 concurrent users. Multiply by your expected peak-to-average ratio (typically 3-5x) to determine the concurrent user capacity needed. Review Settings → App Metrics to see your WU consumption rate during the test. Calculate monthly WU needs by extrapolating: test WUs times expected daily active users divided by test users times 30. Compare against your plan's WU allocation to determine if you need to upgrade or add WU packages.
Expected result: You have a capacity plan showing how many concurrent users your app supports and when you need to upgrade.
Complete working example
1LOAD TESTING PROCESS SUMMARY2=====================================34STEP 1: IDENTIFY FLOWS5 Map top 5-10 user actions:6 - Homepage load7 - Search with filters8 - Form submission9 - Dashboard page load10 - API endpoint calls1112STEP 2: TEST TOOL SETUP (k6)13 Install: brew install k6 (Mac) or download14 Script structure:15 Define scenarios (user flows)16 Set virtual users: start 10, ramp to 5017 Set duration: 2-5 minutes18 Target: your Bubble app URLs1920STEP 3: RUN AND MONITOR21 Execute test script22 Monitor simultaneously:23 k6 output: response times, errors, RPS24 Bubble Logs: WUs, workflow durations25 Record baseline metrics2627STEP 4: ANALYZE RESULTS28 Warning signs:29 Response time > 3 sec30 Error rate > 1%31 Linear time increase with users32 Check Bubble Logs:33 Highest WU workflows34 Slowest page loads35 Failed API calls3637STEP 5: CAPACITY PLANNING38 Concurrent users supported = N39 Peak capacity needed = N × 3-5x40 Monthly WU estimate:41 Test WUs × (DAU / test users) × 3042 Compare vs plan WU allocation43 Upgrade decision:44 If WU estimate > plan limit → upgrade45 If response times unacceptable → optimize4647BUBBLE PLAN WU LIMITS:48 Free: 50,000 WUs/month49 Starter: 175,000 WUs/month50 Growth: 250,000 WUs/month51 Team: 500,000 WUs/monthCommon mistakes when loading Test and Scale a Bubble Application
Why it's a problem: Running load tests against the live production app during peak hours
How to avoid: Run load tests against the development environment or during low-traffic hours and notify your team beforehand
Why it's a problem: Testing with unrealistic user patterns
How to avoid: Create realistic test scenarios that simulate complete user flows with think times between actions
Why it's a problem: Not monitoring Bubble's server-side metrics during the test
How to avoid: Monitor the Bubble Logs tab and App Metrics simultaneously during load tests to correlate client-side and server-side performance
Best practices
- Start with low user counts and gradually increase to find the breaking point
- Test realistic user flows, not just individual pages
- Run tests against development environment first
- Monitor both client-side and server-side metrics simultaneously
- Test during off-peak hours to avoid affecting real users
- Record results as benchmarks for future comparison
- Optimize the worst-performing workflows before scaling up plans
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to load test my Bubble.io app to see how it performs with 100 concurrent users. What tool should I use and how do I set up a realistic test that covers page loads and form submissions?
Help me prepare my app for a product launch. I expect 500 daily active users. How should I test my app's performance and what Bubble plan WU allocation will I need?
Frequently asked questions
Can I load test Bubble for free?
Yes. k6 is a free open-source load testing tool that works well for testing Bubble apps. You can also use the free tier of services like Loader.io for basic tests.
How many concurrent users can Bubble handle?
This depends on your app's complexity and plan. Simple apps may handle 100+ concurrent users on a Growth plan. Complex apps with many searches may slow down at 20-30 concurrent users without optimization.
Will load testing count against my WU allocation?
Yes. Load test traffic consumes WUs just like real user traffic. Test against the development environment, which has its own 100,000 WU monthly allocation on paid plans.
How often should I run load tests?
Run load tests before major launches, after significant feature additions, and quarterly as a health check. Always test before expected traffic spikes.
What if my app fails the load test?
Identify the bottleneck workflows using Bubble Logs, optimize them using the techniques in our performance tutorials, then retest. Most performance issues can be resolved through optimization before needing a plan upgrade.
Can RapidDev help with load testing and optimization?
Yes. RapidDev performs comprehensive load testing, bottleneck analysis, and performance optimization for Bubble apps preparing for growth or product launches.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation