Introducing Workers Usage Notifications

Aly Cabral
4 min readintermediate
--
View Original

Overview

The article introduces Workers usage notifications, a feature designed to provide Cloudflare Workers users with proactive updates about their application's traffic and resource usage. It details two types of notifications: a weekly summary of usage statistics and an on-demand alert for significant increases in CPU usage.

What You'll Learn

1

How to enable Workers usage notifications in your Cloudflare account

2

Why monitoring CPU usage is crucial for serverless applications

3

When to expect weekly summaries of your Workers usage

Key Questions Answered

What are Workers usage notifications?
Workers usage notifications are alerts that provide users with insights into their application's traffic and resource usage. They include a weekly summary of usage statistics and on-demand notifications for significant CPU usage increases, helping users monitor their serverless applications effectively.
How do I enable Workers usage notifications?
To enable Workers usage notifications, navigate to the Notifications section of the Cloudflare zone dashboard and click 'Add'. You can then select the types of notifications you wish to receive, including weekly summaries and CPU usage alerts.
What information does the Worker Weekly Summary provide?
The Worker Weekly Summary provides a high-level overview of your Workers usage, including total request counts, duration, egress data transfer, and a breakdown of your most popular Workers with median CPU time, all delivered directly to your inbox.
What triggers an on-demand usage notification?
An on-demand usage notification is triggered when a worker's CPU usage exceeds 25% above its average CPU usage over the previous seven days, allowing users to quickly identify significant changes in their application's resource consumption.

Key Statistics & Figures

CPU usage threshold for notifications
25%
An on-demand usage notification is triggered when a worker's CPU usage exceeds this threshold compared to the average of the previous seven days.

Technologies & Tools

Backend
Cloudflare Workers
Used to deploy serverless applications that can benefit from usage notifications.

Key Actionable Insights

1
Enable Workers usage notifications to stay informed about your application's performance without needing to log in daily.
This feature helps you proactively manage your serverless application by providing timely insights directly to your inbox, allowing you to focus on development tasks.
2
Utilize the on-demand CPU usage notifications to quickly identify potential issues with your Workers.
By receiving alerts for significant CPU usage increases, you can address performance bottlenecks or unexpected behavior in your application as soon as they arise.
3
Review the weekly summary to understand traffic patterns and optimize your Workers accordingly.
The summary provides valuable data that can help you make informed decisions about scaling and optimizing your serverless applications.

Common Pitfalls

1
Neglecting to enable notifications can lead to unexpected traffic surges without awareness.
Without proactive alerts, developers may miss critical performance issues or spikes in usage, which can affect application reliability and user experience.