In this video we explore how to effectively track and monitor your app's Workload consumption on Bubble. By using Bubble's App Metrics dashboard, you'll learn how to measure your app's server resource usage, pinpoint spikes in workload, and drill down into specific actions that consume resources. You'll also discover tips for estimating future workload as your app scales.
Additionally, we cover tools for monitoring your Workload in real-time, including built-in notifications for when your app reaches certain usage thresholds, and setting up custom alerts for proactive monitoring. You'll also learn about Infinite Recursion Protection, a tool designed to stop runaway workflows from consuming unnecessary resources.
Whether you’re optimizing your app for performance or planning for future growth, this video gives you the tools to measure and monitor workload efficiently.
For more information on workload and other Bubble topics, please visit our manual.
Transcript
Tracking how much Workload your app consumes is the primary way to understand where you are spending your Workload. By tracking your app's Workload consumption, you can identify where your app uses the most server resources, helping you optimize performance and plan for future costs as your app scales.
We break down tracking into two fields: measuring and monitoring. Measuring is about understanding how much Workload your app is using, and monitoring is about notifying you if your app exceeds the predetermined limit. Using the App Metrics sub-tab in our Logs, this dashboard gives you a bird's eye view of how much Workload your app is using and what is using it. This allows you to measure your app's Workload consumption.
The first bar chart shows your Workload used over time between your Development and Live versions. This helps you pinpoint exactly where and when your app spikes in usage and allows you to see when you might be going over your total plan amount. Most importantly, you can interact with every chart that you see here for detailed information! Let me show you how.
Click on a bar to select a day to view from the chart. All of the charts on the page will update, and you'll begin to drill down into each hour of that day, showing you when Workload usage was the highest and lowest. You can get more granular by selecting the hourly chart which will display your app's consumption for each minute of that hour.
As you start selecting these different timeframes, you start leaning on the pie chart below for specific activity types that were consumed during this window. If you watched our video on Understanding Workload, you'll be familiar with this table representing the different activity types. This gives you a quick glance at some of the base costs but for a full list, check out our manual entry.
And just like with the bar chart, you can click on the pie chart to see what the activities within that activity type are and their corresponding server work. Once you reveal the activity, you'll be navigated to where it exists in your app. In this case, this activity pointed us to this expression in the table.
So these charts are here to help you measure your Workload usage. You can drill down step by step into more detailed views until you reach the specific event, action or expression.
Now let's talk about the question that comes up often: how do I estimate the amount of workload I need for my app? I have some tips for that. Since you're always building and testing with your Development version, you're using a small amount of workload during testing. When you're testing your Development version and your server starts consuming resources, these charts will start to populate with how much resources they've consumed, giving you an idea as to what it may cost. This amount will always be lower than what you would use in the Live version, but it's a great place to start estimating how much Workload your app might use.
Another way to measure server usage is via the server logs. This gives you a playback of every workflow that runs, who runs it, and how much workload it cost to do so. Using this tab as a tool for measuring is a great way to see what it might cost you as you deploy to Live. Most new users will not consume their total allotment of Workload in the first few months, especially if your app is still in development.
Let's now look at the tools we have for monitoring! Monitoring is about notifying you, the app owner, about the current status of your available workload units. It's important to be proactive with measuring so you know exactly what you might need to closely monitor. To start, Bubble will automatically let you know when your app has consumed: 75% of your app's monthly WU allowance as well as when it has consumed a 100% of your app's monthly WU allowance.
In addition, Bubble will automatically send you email notifications about workload spikes when it detects that your app is consuming more workload than typical. Alerts will be sent to you when your app's Workload consumption meets any of the following conditions:
Period | Threshold | Additional Criteria |
Last 24 hours | 2x the average of the last 7 days | Average > 30,000/day (for larger apps) |
Last 24 hours | 3x the average of the last 7 days | Average > 300/day |
Last hour | Greater than 3% of total monthly WU allowance |
|
Last six hours | Greater than 6% of total monthly WU allowance |
|
Last 12 hours | Greater than 10% of total monthly WU allowance |
|
While it's great that there are automatic notifications set up for you, you can also customize your own alerts to monitor in real-time using workload notifications. This will alert you the moment your app exceeds a custom defined amount of Workload in case you want to take any action sooner than the automatic alerts that Bubble already does.
We have another great tool for monitoring and protecting your app against runaway activities with Infinite Recursion Protection. Over in the Settings tab under API, you will find controls for your backend workflows and a section for Infinite Recursion Protection. This allows you to set a maximum depth for your entire app. If any workflow exceeds this limit, it will automatically stop. When a workflow is terminated, it's captured in the server logs under Workflow errors, and prevents your app from spending more workload than is necessary.
Earlier we mentioned using server logs to measure your apps Workload usage, but you can also think of it as a way to monitor everything that your server does. While it's great to use this to measure, it's doing double-duty by allowing you to monitor in real-time the workflows that users are running and how much their total workload ended up costing. In case you notice that a particular workflow started to consume too much workload, this would help you debug that.
I want to reiterate that you have the tools available to track Workload and prepare your app for scale. Bubble's pricing and Workload metric is designed so that it grows with you. Tracking workload allows you to get clarity and peace of mind over what your app is actually doing so you know where you are spending your money.
For more resources on tracking Workload please read our manual entry and check out our other videos on Workload.