Author: guillaume

  • Workflows – Rollback support now available in Workflows

    Workflows now supports saga-style rollbacks, allowing you to add compensating logic to each step.do() in case of downstream failures. If the instance fails, the rollback handlers will execute in reverse step-start order.

    This is useful for multi-step operations that touch external systems, such as inventory reservations, payment authorization, ticket creation, or infrastructure provisioning. Instead of writing all cleanup logic in a top-level catch, you can keep each compensating action next to the step it undoes.

    Rollback handlers support their own retry and timeout configuration, and Workflows now exposes rollback outcomes in instance status responses. Workflows analytics also emits rollback lifecycle events, making it easier to distinguish a forward execution failure from a rollback failure when debugging production workflows.

    • JavaScript

      await step.do(
      "provision resource",
      async () => {
      const resource = await provisionResource();
      return { resourceId: resource.id };
      },
      {
      rollback: async ({ output }) => {
      const { resourceId } = output;
      await deleteResource(resourceId);
      },
      rollbackConfig: {
      retries: { limit: 3, delay: "15 seconds", backoff: "linear" },
      timeout: "2 minutes",
      },
      },
      );
    • TypeScript

      await step.do(
      "provision resource",
      async () => {
      const resource = await provisionResource();
      return { resourceId: resource.id };
      },
      {
      rollback: async ({ output }) => {
      const { resourceId } = output as { resourceId: string };
      await deleteResource(resourceId);
      },
      rollbackConfig: {
      retries: { limit: 3, delay: "15 seconds", backoff: "linear" },
      timeout: "2 minutes",
      },
      },
      );

    Refer to rollback options to learn more.

  • Workflows – Rollback support now available in Workflows

    Workflows now supports saga-style rollbacks, allowing you to add compensating logic to each step.do() in case of downstream failures. If the instance fails, the rollback handlers will execute in reverse step-start order.

    This is useful for multi-step operations that touch external systems, such as inventory reservations, payment authorization, ticket creation, or infrastructure provisioning. Instead of writing all cleanup logic in a top-level catch, you can keep each compensating action next to the step it undoes.

    Rollback handlers support their own retry and timeout configuration, and Workflows now exposes rollback outcomes in instance status responses. Workflows analytics also emits rollback lifecycle events, making it easier to distinguish a forward execution failure from a rollback failure when debugging production workflows.

    • JavaScript

      await step.do(
      "provision resource",
      async () => {
      const resource = await provisionResource();
      return { resourceId: resource.id };
      },
      {
      rollback: async ({ output }) => {
      const { resourceId } = output;
      await deleteResource(resourceId);
      },
      rollbackConfig: {
      retries: { limit: 3, delay: "15 seconds", backoff: "linear" },
      timeout: "2 minutes",
      },
      },
      );
    • TypeScript

      await step.do(
      "provision resource",
      async () => {
      const resource = await provisionResource();
      return { resourceId: resource.id };
      },
      {
      rollback: async ({ output }) => {
      const { resourceId } = output as { resourceId: string };
      await deleteResource(resourceId);
      },
      rollbackConfig: {
      retries: { limit: 3, delay: "15 seconds", backoff: "linear" },
      timeout: "2 minutes",
      },
      },
      );

    Refer to rollback options to learn more.

  • Workflows – Rollback support now available in Workflows

    Workflows now supports saga-style rollbacks, allowing you to add compensating logic to each step.do() in case of downstream failures. If the instance fails, the rollback handlers will execute in reverse step-start order.

    This is useful for multi-step operations that touch external systems, such as inventory reservations, payment authorization, ticket creation, or infrastructure provisioning. Instead of writing all cleanup logic in a top-level catch, you can keep each compensating action next to the step it undoes.

    Rollback handlers support their own retry and timeout configuration, and Workflows now exposes rollback outcomes in instance status responses. Workflows analytics also emits rollback lifecycle events, making it easier to distinguish a forward execution failure from a rollback failure when debugging production workflows.

    • JavaScript

      await step.do(
      "provision resource",
      async () => {
      const resource = await provisionResource();
      return { resourceId: resource.id };
      },
      {
      rollback: async ({ output }) => {
      const { resourceId } = output;
      await deleteResource(resourceId);
      },
      rollbackConfig: {
      retries: { limit: 3, delay: "15 seconds", backoff: "linear" },
      timeout: "2 minutes",
      },
      },
      );
    • TypeScript

      await step.do(
      "provision resource",
      async () => {
      const resource = await provisionResource();
      return { resourceId: resource.id };
      },
      {
      rollback: async ({ output }) => {
      const { resourceId } = output as { resourceId: string };
      await deleteResource(resourceId);
      },
      rollbackConfig: {
      retries: { limit: 3, delay: "15 seconds", backoff: "linear" },
      timeout: "2 minutes",
      },
      },
      );

    Refer to rollback options to learn more.

  • Radar – Finer-grained chart granularity on Cloudflare Radar for longer time ranges

    Radar now provides finer-grained traffic charts for longer time ranges. Previously, selecting a 1-3 month view on HTTP and NetFlows charts defaulted to weekly aggregation, which was too coarse to surface meaningful trends. Views longer than 3 months defaulted to monthly aggregation, returning as few as 7 data points for a 6-month range.

    The new defaults are:

    • 1-3 months: daily granularity (7x more data points)
    • Longer than 3 months (HTTP and NetFlows): weekly granularity (4x more data points)

    For example, a 12-week traffic view previously showed weekly data:

    Traffic trends chart with weekly granularity for a 12-week view

    The same view now shows daily data:

    Traffic trends chart with daily granularity for a 12-week view

    Similarly, a 1-year HTTP traffic view that previously showed just 12 monthly data points now provides 52 weekly data points.

    Visit Cloudflare Radar to explore the new granular views.

  • Radar – Finer-grained chart granularity on Cloudflare Radar for longer time ranges

    Radar now provides finer-grained traffic charts for longer time ranges. Previously, selecting a 1-3 month view on HTTP and NetFlows charts defaulted to weekly aggregation, which was too coarse to surface meaningful trends. Views longer than 3 months defaulted to monthly aggregation, returning as few as 7 data points for a 6-month range.

    The new defaults are:

    • 1-3 months: daily granularity (7x more data points)
    • Longer than 3 months (HTTP and NetFlows): weekly granularity (4x more data points)

    For example, a 12-week traffic view previously showed weekly data:

    Traffic trends chart with weekly granularity for a 12-week view

    The same view now shows daily data:

    Traffic trends chart with daily granularity for a 12-week view

    Similarly, a 1-year HTTP traffic view that previously showed just 12 monthly data points now provides 52 weekly data points.

    Visit Cloudflare Radar to explore the new granular views.

  • Radar – Finer-grained chart granularity on Cloudflare Radar for longer time ranges

    Radar now provides finer-grained traffic charts for longer time ranges. Previously, selecting a 1-3 month view on HTTP and NetFlows charts defaulted to weekly aggregation, which was too coarse to surface meaningful trends. Views longer than 3 months defaulted to monthly aggregation, returning as few as 7 data points for a 6-month range.

    The new defaults are:

    • 1-3 months: daily granularity (7x more data points)
    • Longer than 3 months (HTTP and NetFlows): weekly granularity (4x more data points)

    For example, a 12-week traffic view previously showed weekly data:

    Traffic trends chart with weekly granularity for a 12-week view

    The same view now shows daily data:

    Traffic trends chart with daily granularity for a 12-week view

    Similarly, a 1-year HTTP traffic view that previously showed just 12 monthly data points now provides 52 weekly data points.

    Visit Cloudflare Radar to explore the new granular views.

  • AI Gateway – Control AI costs with spend limits

    AI Gateway now supports spend limits — cost-based budgets that track cumulative dollar spend and block requests when the budget is exceeded. Unlike rate limiting, which caps the number of requests, spend limits track actual cost based on token usage and model pricing.

    You can scope limits by model, provider, or custom metadata dimensions. For example, give each user a $200/day budget, cap total gateway spend at $10,000/day, or limit a specific model to $50/day per user. Each rule uses a configurable time window with fixed or sliding enforcement.

    Spend limits work with both Unified Billing and BYOK requests for models with known pricing.

    For more details, refer to the Spend limits documentation.

  • AI Gateway – Control AI costs with spend limits

    AI Gateway now supports spend limits — cost-based budgets that track cumulative dollar spend and block requests when the budget is exceeded. Unlike rate limiting, which caps the number of requests, spend limits track actual cost based on token usage and model pricing.

    You can scope limits by model, provider, or custom metadata dimensions. For example, give each user a $200/day budget, cap total gateway spend at $10,000/day, or limit a specific model to $50/day per user. Each rule uses a configurable time window with fixed or sliding enforcement.

    Spend limits work with both Unified Billing and BYOK requests for models with known pricing.

    For more details, refer to the Spend limits documentation.

  • AI Gateway – Control AI costs with spend limits

    AI Gateway now supports spend limits — cost-based budgets that track cumulative dollar spend and block requests when the budget is exceeded. Unlike rate limiting, which caps the number of requests, spend limits track actual cost based on token usage and model pricing.

    You can scope limits by model, provider, or custom metadata dimensions. For example, give each user a $200/day budget, cap total gateway spend at $10,000/day, or limit a specific model to $50/day per user. Each rule uses a configurable time window with fixed or sliding enforcement.

    Spend limits work with both Unified Billing and BYOK requests for models with known pricing.

    For more details, refer to the Spend limits documentation.

  • AI Gateway – Control AI costs with spend limits

    AI Gateway now supports spend limits — cost-based budgets that track cumulative dollar spend and block requests when the budget is exceeded. Unlike rate limiting, which caps the number of requests, spend limits track actual cost based on token usage and model pricing.

    You can scope limits by model, provider, or custom metadata dimensions. For example, give each user a $200/day budget, cap total gateway spend at $10,000/day, or limit a specific model to $50/day per user. Each rule uses a configurable time window with fixed or sliding enforcement.

    Spend limits work with both Unified Billing and BYOK requests for models with known pricing.

    For more details, refer to the Spend limits documentation.