Zum Inhalt springen

Storage Updates & Release Notes

Einträge
78
Quellen
1
Zuletzt aktualisiert

Folge Storage, um die Release Notes in deinen Feed zu holen.

Storage von Cloudflare

By default, the runtime retries a call up to four times, and starts no retry more than 10 seconds after the initial call starts. It does not retry errors thrown by your Durable Object code, or errors with .overloaded set to true.

If the connection drops and the runtime cannot tell whether the Durable Object received the call, it still retries, but the Durable Object rejects the retry if the first attempt arrived. A method never runs twice because of a retry, unless you mark it with retryable() from cloudflare:durable-objects:

src/index.jsjs

import { DurableObject } from "cloudflare:workers";
import { retryable } from "cloudflare:durable-objects";

export class Cart extends DurableObject {
	static {
		retryable(this.prototype.setQuantity);
	}
	// Idempotent: a second run sets the same quantity.
	async setQuantity(itemId, quantity) {
		await this.ctx.storage.put(itemId, quantity);
	}

	// Not retryable: a second run would add another item.
	async addOne(itemId) {
		const quantity = (await this.ctx.storage.get(itemId)) ?? 0;
		await this.ctx.storage.put(itemId, quantity + 1);
	}
}

src/index.tsts

import { DurableObject } from "cloudflare:workers";
import { retryable } from "cloudflare:durable-objects";

export class Cart extends DurableObject {
	static {
		retryable(this.prototype.setQuantity);
	}
	// Idempotent: a second run sets the same quantity.
	async setQuantity(itemId: string, quantity: number): Promise<void> {
		await this.ctx.storage.put(itemId, quantity);
	}

	// Not retryable: a second run would add another item.
	async addOne(itemId: string): Promise<void> {
		const quantity = (await this.ctx.storage.get<number>(itemId)) ?? 0; …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Consume requests that return records now have 41% to 49% lower latency across percentiles, with median latency down from 1.19 seconds to 0.63 seconds. Subscriptions catching up on a backlog see 71% lower median latency and consume about 170% more batches per hour.

Each Consume first finds where in the stream its batch starts, then reads the records. We optimized this seek phase, so K2 starts reading records sooner.

p95 latency of K2 Consume requests that return records, dropping by about half after the change

The following table shows the latency of Consume requests that return records:

Percentile Before After Change

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Subscriptions that are far behind the newest records see the largest reduction. Their median Consume latency dropped from 2.0 seconds to 0.6 seconds, so they catch up on a backlog sooner.

You do not need to change anything to get these improvements. They apply to every subscription and to the existing Consume API.

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Basin SQL JSON functions now support documents up to 16 MiB

Basin SQL Basin

Basin SQL JSON functions now accept JSON documents up to 16 MiB (16,777,216 bytes), increased from the previous 2,000-byte limit.

The higher limit lets you query full application events, telemetry records, and logs stored as JSON strings in Apache Iceberg tables without preprocessing or splitting fields. It applies across JSON scalar functions, including json_get, json_get_str, json_get_int, json_contains, and json_length.

For the full list of JSON functions and runtime constraints, refer to JSON functions and Limitations and best practices.

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Basin Catalog now supports object-level role-based access control

Basin Catalog Basin

Basin Catalog now supports object-level role-based access control (RBAC). You can scope account member policies and Account API tokens to specific catalogs, namespaces, tables, and views, instead of every catalog in your account.

Previously, Basin Catalog permissions applied to all catalogs in an account. Object-level access lets you follow the principle of least privilege. For example, you can give an analytics team read access to one namespace, and give an ingestion pipeline write access to only the tables it updates.

Basin Catalog object picker in a permission policy, filtered to show the tables in a catalog

The update includes:

  • New roles — Assign Basin Catalog Object Reader or Basin Catalog Object Editor to account members. Account API tokens use the Basin Catalog Object permission with Read or Edit access.
  • New scopes — Select Individual Basin Catalog objects as the scope of a member policy, or Specified Basin Catalog Objects as the scope of an Account API token. …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Subscribe to Stream events with Queues

Stream Queues

You can now subscribe to Stream events through Queues event subscriptions and receive them on a queue. Process them with a Worker or an HTTP pull consumer to publish videos when they are ready, react to live broadcasts starting or stopping, or track caption and download progress.

Unlike webhooks, which send a fixed set of events to one URL, event subscriptions let you choose which events you receive and route them to multiple destinations. Create one subscription per queue to send different events to different consumers.

Stream publishes 14 event types across your account:

  • Videos: video_state.ready, video_state.updated, video_state.errored
  • Live inputs: live_input.connected, live_input.disconnected, live_input.errored
  • Captions: caption.created, caption.updated, caption.ready, caption.deleted
  • Downloads: download.created, download.updated, download.ready, download.deleted

To create a subscription, run the following command:

npmyarnpnpm

npx wrangler queues subscription create <QUEUE_NAME> --source stream --events video_state.ready,live_input.connected

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Self-host Workers and Durable Objects with workerd clustering (experimental)

Workers Durable Objects

You can now run Workers and Durable Objects as a multi-machine cluster on your own infrastructure with workerd ↗︎, the open-source runtime behind Cloudflare Workers. Until now, workerd was primarily for local development because it ran as a single instance and stored data only on a local disk. Now several workerd instances can form one cluster that shares an object storage bucket. Documentation is at workerd.dev ↗︎.

What this is useful for

  • Your own infrastructure: Run inside your VPC, Kubernetes cluster, or on-premises hardware, next to internal services or within data residency limits.
  • Stateful AI agents: Give each agent a Durable Object with SQLite memory and alarms. Idle agents are evicted from memory; their state stays in the bucket.
  • Real-time apps: Give each chat room or collaborative document its own SQLite database, without a shared database or message broker.
  • Coordination: Build locks, counters, and job schedulers, each a single Durable Object that every instance routes to.

How bucket-backed clustering works …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

npx workerd serve --experimental . --cluster-addr 10.0.0.1:7000


For R2 or S3, also set `AWS_ENDPOINT_URL`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`; refer to the [cluster guide ↗︎](https://workerd.dev/docs/cluster/#settings).

A cluster is meant to run a single application whose code you trust. `workerd` is not a hardened sandbox. For details, refer to [security ↗︎](https://workerd.dev/docs/security/).

We're just getting started with `workerd` clustering; the purpose of this experimental release is to gather feedback. Please open issues in [github.com/cloudflare/workerd ↗︎](https://github.com/cloudflare/workerd/issues) as you encounter them.

![](https://developers.cloudflare.com/icons/agents/claude/light.svg)![](https://developers.cloudflare.com/icons/agents/claude/dark.svg)![](https://developers.cloudflare.com/icons/agents/codex/light.svg)![](https://developers.cloudflare.com/icons/agents/codex/dark.svg)![](https://developers.cloudflare.com/icons/agents/cursor/light.svg)![](https://developers.cloudflare.com/icons/agents/cursor/dark.svg)![](https://developers.cloudflare.com/icons/agents/opencode/light.svg)![](https://developers.cloudflare.com/icons/agents/opencode/dark.svg)Copy promptPrompt copied! …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

R2 default bandwidth limit

R2

Each Cloudflare account now has a default R2 bandwidth limit of up to 100 Gbps. Upload and download bandwidth are separate limits, so your account can upload at up to 100 Gbps and download at up to 100 Gbps at the same time.

Cloudflare has raised the limit for some accounts based on their historical R2 traffic. To find your account's current bandwidth limit, go to the R2 Metrics page in the Cloudflare dashboard.

Go to R2 Metrics ↗ R2 Metrics page showing the account bandwidth limit above the bandwidth charts

If your account exceeds its bandwidth limit, R2 throttles requests, which can increase request latency. Requests that are already in progress are not rejected, but new requests can receive a 429 Too Many Requests response if your account has so many concurrent requests that a new one would not get enough bandwidth to make progress. For more information, refer to R2 limits.

If your workload needs more bandwidth than your current limit, complete the Limit Increase Request Form ↗︎ to request a higher limit.

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Load balancing analytics available with Customer Metadata Boundary set to EU

Load Balancing Data Localization Suite

Load balancing analytics are now available for accounts with Customer Metadata Boundary set to EU.

Previously, load balancing analytics were only available in the US region, so the Load Balancing Analytics views were empty for accounts with Customer Metadata Boundary set to EU. Request analytics and endpoint health events for these accounts are now stored in, and served from, the EU.

For accounts with Customer Metadata Boundary set to EU:

  • Request analytics are available in the dashboard and the API. Overview and Latency in Traffic > Load Balancing Analytics are populated, and the loadBalancingRequestsAdaptive and loadBalancingRequestsAdaptiveGroups datasets are available in the GraphQL Analytics API.
  • Health events are available in the dashboard and the API. The Logs view in Traffic > Load Balancing Analytics is populated, and the account-scoped lbHealthEvents and lbHealthEntitiesGroups datasets are available in the GraphQL Analytics API. …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Pipelines Sink credentials can now be updated

Basin Pipelines Basin

You can now replace the credentials of a Basin Pipelines sink. Previously, an expired or revoked token meant deleting and recreating the sink.

Pipelines keep the sink's earlier credentials until you update them. Updating a failed pipeline automatically restarts it.

A failed pipeline's page with the reason it failed, the sink that changed, and the Update pipeline button

Dashboard

  • Update credentials — On a sink's page, in Destination. Create a new API token, or enter the credentials of a token you created.
  • Update pipeline — On a pipeline's page, when a stream or sink it uses has changed.

Go to Sinks ↗ The Update credentials dialog with two options: create a new API token, or enter credentials

API …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

D1 Insights index recommendations

D1

D1 Insights now recommends indexes for your D1 databases. Each recommendation includes a CREATE INDEX statement, the queries it is expected to speed up, and usage metrics for those queries.

You can turn recommendations on or off in the dashboard, with the Cloudflare CLI, or with the API.

Review recommendations on the Metrics tab of a database in the dashboard, or list them with the Cloudflare CLI:

npx cf@latest d1 insights recommendations

For more information, refer to Index recommendations.

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

K2 metrics in the dashboard and GraphQL Analytics API

K2

You can now monitor your K2 streams in the Cloudflare dashboard: how fast records are produced and consumed, how much each stream stores, and how far behind each subscription is.

A K2 stream's Metrics tab, charting bytes produced by input and bytes stored

In the Cloudflare dashboard, go to the K2 Streams page and select a stream.

Go to K2 Streams ↗

Metrics appear in three places:

  • Overview — Produce and consume rates over the last 5 minutes, stored bytes, and each subscription's records behind, oldest unread record, lag over the last hour, and bytes consumed.
  • Metrics — Charts of bytes produced by input, bytes stored, and bytes delivered to each subscription, over a time range you choose.
  • Subscription page — Select a subscription to see its records and bytes behind, its oldest unread record, its consume rate, and charts of its lag and throughput.

The same metrics are available in the GraphQL Analytics API, in four beta datasets:

  • k2ProduceAdaptiveGroups — Bytes produced to a stream, by input ( http or binding).
  • k2ConsumeAdaptiveGroups — Bytes delivered to each subscription. …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

CPU and heap profiling for Worker Previews

Workers Durable Objects

You can now profile Worker Previews, following the launch of on-demand CPU and memory profiling ↗︎ for Workers and Durable Objects. This lets you see what a pull request costs in CPU and memory before you merge it.

Send traffic to a Preview, capture a CPU or heap profile from one of its deployments, and see which functions in your branch use the most CPU time or memory. Push a fix, profile the next deployment, and compare. Production stays untouched the whole time.

Flamegraph of a Preview CPU profile showing scoreProduct, tokenize, formatPrice, and buildProduct under handleSearch

In this Preview, formatPrice takes almost a third of the CPU time because it creates a new Intl.NumberFormat for every product. A slowdown like this is easy to miss in code review, but it stands out in a flamegraph.

Let your agent optimize performance …

Originalquelle(öffnet in neuem Tab)Problem melden

Storage von Cloudflare

Improved Durable Object Reliability During Runtime Updates

Durable Objects

Cloudflare has improved how Durable Object storage handles machines restarting during runtime updates.

Each write to a Durable Object's storage must be confirmed by a majority within a group of machines for durability. Machines now proactively remove themselves from the group when restarting, so that they can be replaced before the restart happens.

Previously, this could take up to a few minutes. During that time, a write could fail to reach a majority, and the object was reset with Internal error in Durable Object storage caused object to be reset, disconnecting its WebSockets.

This can make these resets less frequent for SQLite-backed Durable Objects, especially ones that write to storage only occasionally, such as those using WebSocket hibernation. Actual results depend on your workload and traffic patterns.

The change is live in all regions. No action is needed by customers to see benefits from this change. Some disconnects during runtime updates are still expected, so clients should continue to reconnect when a WebSocket closes.

To learn more, refer to Use WebSockets.

Originalquelle(öffnet in neuem Tab)Problem melden