Zum Inhalt springen

Developer Platform Updates & Release Notes

Einträge
583
Quellen
1
Zuletzt aktualisiert

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

Developer Platform von Cloudflare

Cron Triggers in Python Workers unterstützt

Python Workers lassen sich jetzt per Cron Trigger ausführen, indem man einen scheduled-Handler definiert und Crons in der Wrangler-Konfiguration festlegt.

You can now create Python Workers which are executed via a cron trigger.

This is similar to how it's done in JavaScript Workers, simply define a scheduled event listener in your Worker:

from workers import handler

@handler
async def on_scheduled(event, env, ctx):
  print("cron processed")

Define a cron trigger configuration in your Wrangler configuration file:

{
	"triggers": {
		// Schedule cron triggers:
		// - At every 3rd minute
		// - At 15:00 (UTC) on first day of the month
		// - At 23:59 (UTC) on the last weekday of the month
		"crons": [
			"*/3 * * * *",
			"0 15 1 * *",
			"59 23 LW * *"
		]
	}
}
[triggers]
crons = [ "*/3 * * * *", "0 15 1 * *", "59 23 LW * *" ]

Then test your new handler by using Wrangler with the --test-scheduled flag and making a request to /cdn-cgi/local/scheduled?cron=*+*+*+*+*:

npx wrangler dev --test-scheduled

curl "http://localhost:8787/cdn-cgi/local/scheduled?cron=*+*+*+*+*"

Consult the Workers Cron Triggers page for full details on cron triggers in Workers.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

AutoRAG: Metadatenfilter und Multitenancy-Unterstützung

AutoRAG-Suchergebnisse lassen sich nun per Metadatenfilter nach folder und timestamp eingrenzen, wodurch sich mandantenfähige Suchen mit pro Mandant getrennten Ordnern umsetzen lassen.

You can now filter AutoRAG search results by folder and timestamp using metadata filtering to narrow down the scope of your query.

This makes it easy to build multitenant experiences where each user can only access their own data. By organizing your content into per-tenant folders and applying a folder filter at query time, you ensure that each tenant retrieves only their own documents.

Example folder structure:

customer-a/logs/
customer-a/contracts/
customer-b/contracts/

Example query:

const response = await env.AI.autorag("my-autorag").search({
	query: "When did I sign my agreement contract?",
	filters: {
		type: "eq",
		key: "folder",
		value: "customer-a/contracts/",
	},
});

You can use metadata filtering by creating a new AutoRAG or reindexing existing data. To reindex all content in an existing AutoRAG, update any chunking setting and select Sync index. Metadata filtering is available for all data indexed on or after April 21, 2025.

If you are new to AutoRAG, get started with the Get started AutoRAG guide.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Queues: Höhere Limits für Pull Consumers

Queues Pull Consumers können nun bis zu 5.000 Nachrichten pro Sekunde und Queue abrufen und bestätigen, zuvor galt ein Limit von 1.200 Anfragen pro 5 Minuten über alle Queues.

Queues pull consumers can now pull and acknowledge up to 5,000 messages / second per queue. Previously, pull consumers were rate limited to 1,200 requests / 5 minutes, aggregated across all queues.

Pull consumers allow you to consume messages over HTTP from any environment—including outside of Cloudflare Workers. They’re also useful when you need fine-grained control over how quickly messages are consumed.

To setup a new queue with a pull based consumer using Wrangler, run:

Create a queue with a pull based consumersh

npx wrangler queues create my-queue
npx wrangler queues consumer http add my-queue

You can also configure a pull consumer using the REST API or the Queues dashboard.

Once configured, you can pull messages from the queue using any HTTP client. You'll need a Cloudflare API Token with queues_read and queues_write permissions. For example:

Pull messages from a queuebash

curl "https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/queues/${QUEUE_ID}/messages/pull" \
--header "Authorization: Bearer ${API_TOKEN}" \
--header "Content-Type: application/json" \ …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

KV: Mehrere Schlüssel per Bulk Read lesen

Über das Binding lassen sich in Workers KV jetzt bis zu 100 Schlüssel in einer einzigen Bulk-Read-Anfrage abrufen, was performanter ist als Einzelanfragen und nicht von den Limits für gleichzeitige Verbindungen betroffen ist.

You can now retrieve up to 100 keys in a single bulk read request made to Workers KV using the binding.

This makes it easier to request multiple KV pairs within a single Worker invocation. Retrieving many key-value pairs using the bulk read operation is more performant than making individual requests since bulk read operations are not affected by Workers simultaneous connection limits.

// Read single key
const key = "key-a";
const value = await env.NAMESPACE.get(key);

// Read multiple keys
const keys = ["key-a", "key-b", "key-c", ...] // up to 100 keys
const values : Map<string, string?> = await env.NAMESPACE.get(keys);

// Print the value of "key-a" to the console.
console.log(`The first key is ${values.get("key-a")}.`)

Consult the Workers KV Read key-value pairs API for full details on Workers KV's new bulk reads support.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Workers Routes und Secrets API korrigiert und dokumentiert

Die Create Route API von Workers gibt nun korrekt die Werte für pattern und script zurück statt eines leeren Strings und null, außerdem wurde die Secrets API behoben und dokumentiert.

Workers Routes API

Previously, a request to the Workers Create Route API always returned null for "script" and an empty string for "pattern" even if the request was successful.

Example requestbash

curl https://api.cloudflare.com/client/v4/zones/$CF_ACCOUNT_ID/workers/routes \
-X PUT \
-H "Authorization: Bearer $CF_API_TOKEN" \
-H 'Content-Type: application/json' \
--data '{ "pattern": "example.com/*", "script": "hello-world-script" }'

Example bad responsejson

{
	"result": {
		"id": "bf153a27ba2b464bb9f04dcf75de1ef9",
		"pattern": "",
		"script": null,
		"request_limit_fail_open": false
	},
	"success": true,
	"errors": [],
	"messages": []
}

Now, it properly returns all values!

Example good responsejson

{
	"result": {
		"id": "bf153a27ba2b464bb9f04dcf75de1ef9",
		"pattern": "example.com/*",
		"script": "hello-world-script",
		"request_limit_fail_open": false
	},
	"success": true,
	"errors": [],
	"messages": []
}

Workers Secrets API

…

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Stream Live WebRTC Beta: Signed URLs und neue Infrastruktur

Die Stream Live WebRTC Beta läuft nach einem Infrastruktur-Upgrade skalierbarer mit besserer Wiedergabeleistung und unterstützt nun Signed URLs zum Schutz der Wiedergabe.

Cloudflare Stream has completed an infrastructure upgrade for our Live WebRTC beta support which brings increased scalability and improved playback performance to all customers. WebRTC allows broadcasting directly from a browser (or supported WHIP client) with ultra-low latency to tens of thousands of concurrent viewers across the globe.

Additionally, as part of this upgrade, the WebRTC beta now supports Signed URLs to protect playback, just like our standard live stream options (HLS/DASH).

For more information, learn about the Stream Live WebRTC beta.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Workers AI: Schnellere Inferenz, neue Modelle, Batch-API, LoRA

Workers AI beschleunigt die Inferenz bei einigen Modellen um das 2- bis 4-Fache, etwa bei @cf/meta/llama-3.3-70b-instruct-fp8-fast, und die bge-Embedding-Modelle erhalten ein aktualisiertes Backend mit etwa doppelter Geschwindigkeit.

Happy Developer Week 2025! Workers AI is excited to announce a couple of new features and improvements available today. Check out our blog ↗︎ for all the announcement details.

Faster inference + New models

We’re rolling out some in-place improvements to our models that can help speed up inference by 2-4x! Users of the models below will enjoy an automatic speed boost starting today:

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

R2 Data Catalog als Open Beta gestartet

R2 Data Catalog, ein verwalteter Apache-Iceberg-Katalog direkt im R2-Bucket, ist als Open Beta verfügbar und bietet eine Iceberg-REST-Schnittstelle für Engines wie Spark, Snowflake und PyIceberg.

Today, we are launching R2 Data Catalog in open beta, a managed Apache Iceberg catalog built directly into your Cloudflare R2 bucket.

If you are not already familiar with it, Apache Iceberg ↗︎ is an open table format designed to handle large-scale analytics datasets stored in object storage, offering ACID transactions and schema evolution. R2 Data Catalog exposes a standard Iceberg REST catalog interface, so you can connect engines like Spark, Snowflake, and PyIceberg to start querying your tables using the tools you already know.

To enable a data catalog on your R2 bucket, find R2 Data Catalog in your buckets settings in the dashboard, or run:

npx wrangler r2 bucket catalog enable my-bucket

And that's it. You'll get a catalog URI and warehouse you can plug into your favorite Iceberg engines.

Visit our getting started guide for step-by-step instructions on enabling R2 Data Catalog, creating tables, and running your first queries.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Cloudflare Pipelines jetzt in der Beta verfügbar

Cloudflare Pipelines ist für alle Nutzer mit Workers-Paid-Plan als Beta verfügbar und nimmt per HTTP oder Worker bis zu 100 MB Daten pro Sekunde auf, die gebündelt in einen R2-Bucket geschrieben werden.

Cloudflare Pipelines is now available in beta, to all users with a Workers Paid plan.

Pipelines let you ingest high volumes of real time data, without managing the underlying infrastructure. A single pipeline can ingest up to 100 MB of data per second, via HTTP or from a Worker. Ingested data is automatically batched, written to output files, and delivered to an R2 bucket in your account. You can use Pipelines to build a data lake of clickstream data, or to store events from a Worker.

Create your first pipeline with a single command:

Create a pipelinebash

$ npx wrangler@latest pipelines create my-clickstream-pipeline --r2-bucket my-bucket

🌀 Authorizing R2 bucket "my-bucket"
🌀 Creating pipeline named "my-clickstream-pipeline"
✅ Successfully created pipeline my-clickstream-pipeline

Id:    0e00c5ff09b34d018152af98d06f5a1xvc
Name:  my-clickstream-pipeline
Sources:
  HTTP:
    Endpoint:        https://0e00c5ff09b34d018152af98d06f5a1xvc.pipelines.cloudflare.com/
    Authentication:  off
    Format:          JSON
  Worker:
    Format:  JSON
Destination:
  Type:         R2
  Bucket:       my-bucket
  Format:       newline-delimited JSON
  Compression:  GZIP
Batch hints:
  Max bytes:     100 MB
  Max duration:  300 seconds
  Max records:   100,000 …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

D1 Read Replication als Public Beta

D1 Read Replication ist als Public Beta verfügbar und ermöglicht Workers über die Sessions API den Zugriff auf Read Replicas, um Latenz zu senken und den Durchsatz zu erhöhen, bei sequenzieller Konsistenz innerhalb einer Session.

D1 read replication is available in public beta to help lower average latency and increase overall throughput for read-heavy applications like e-commerce websites or content management tools.

Workers can leverage read-only database copies, called read replicas, by using D1 Sessions API. A session encapsulates all the queries from one logical session for your application. For example, a session may correspond to all queries coming from a particular web browser session. With Sessions API, D1 queries in a session are guaranteed to be sequentially consistent to avoid data consistency pitfalls. D1 bookmarks can be used from a previous session to ensure logical consistency between sessions.

// retrieve bookmark from previous session stored in HTTP header
const bookmark = request.headers.get("x-d1-bookmark") ?? "first-unconstrained";

const session = env.DB.withSession(bookmark);
const result = await session
	.prepare(`SELECT * FROM Customers WHERE CompanyName = 'Bs Beverages'`)
	.run();
// store bookmark for a future session
response.headers.set("x-d1-bookmark", session.getBookmark() ?? "");
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Hyperdrive unterstützt benutzerdefinierte TLS/SSL-Zertifikate

Hyperdrive unterstützt nun die SSL-Modi verify-ca und verify-full sowie Client-Zertifikate (mTLS), die über neue wrangler-cert-Befehle hochgeladen und in der Hyperdrive-Konfiguration verwendet werden können.

Hyperdrive now supports more SSL/TLS security options for your database connections:

  • Configure Hyperdrive to verify server certificates with verify-ca or verify-full SSL modes and protect against man-in-the-middle attacks
  • Configure Hyperdrive to provide client certificates to the database server to authenticate itself (mTLS) for stronger security beyond username and password

Use the new wrangler cert commands to create certificate authority (CA) certificate bundles or client certificate pairs:

# Create CA certificate bundle
npx wrangler cert upload certificate-authority --ca-cert your-ca-cert.pem --name your-custom-ca-name

# Create client certificate pair
npx wrangler cert upload mtls-certificate --cert client-cert.pem --key client-key.pem --name your-client-cert-name

Then create a Hyperdrive configuration with the certificates and desired SSL mode:

npx wrangler hyperdrive create your-hyperdrive-config \
  --connection-string="postgres://user:password@hostname:port/database" \
  --ca-certificate-id <CA_CERT_ID> \
  --mtls-certificate-id <CLIENT_CERT_ID>
  --sslmode verify-full

Learn more about configuring SSL/TLS certificates for Hyperdrive to enhance your database security posture.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Neues Observability-Dashboard mit Query Builder für Workers

Das neue Workers-Observability-Dashboard zeigt Logs aller Workers an einem Ort und bietet im Tab Investigate einen Query Builder, mit dem sich Logs über strukturierte Abfragen untersuchen und visualisieren lassen.

The Workers Observability dashboard ↗︎ offers a single place to investigate and explore your Workers Logs.

The Overview tab shows logs from all your Workers in one place. The Invocations view groups logs together by invocation, which refers to the specific trigger that started the execution of the Worker (i.e. fetch). The Events view shows logs in the order they were produced, based on timestamp. Previously, you could only view logs for a single Worker.

Workers Observability Overview Tab

The Investigate tab presents a Query Builder, which helps you write structured queries to investigate and visualize your logs. The Query Builder can help answer questions such as:

  • Which paths are experiencing the most 5XX errors?
  • What is the wall time distribution by status code for my Worker?
  • What are the slowest requests, and where are they coming from?
  • Who are my top N users?

Workers Observability Overview Tab …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

CPU time und Wall time für Workers Invocations verfügbar

CPU time und Wall time werden jetzt für jede Workers Invocation in Workers Logs, Tail Workers und Workers Logpush angezeigt, wobei bestehende Logpush-Jobs für die neuen Felder aktualisiert werden müssen.

You can now observe and investigate the CPU time and Wall time for every Workers Invocations.

You can use a Workers Logs filter to search for logs where Wall time exceeds 100ms.

Workers Logs Wall Time Filter …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Lokale Entwicklung für Email Workers mit wrangler dev

Email Workers lassen sich nun lokal mit wrangler dev testen, indem E-Mails per POST an den lokalen Endpunkt /cdn-cgi/local/email gesendet werden und den email()-Handler auslösen.

Email Workers enables developers to programmatically take action on anything that hits their email inbox. If you're building with Email Workers, you can now test the behavior of an Email Worker script, receiving, replying and sending emails in your local environment using wrangler dev.

Below is an example that shows you how you can receive messages using the email() handler and parse them using postal-mime ↗︎:

import * as PostalMime from "postal-mime";

export default {
	async email(message, env, ctx) {
		const parser = new PostalMime.default();
		const rawEmail = new Response(message.raw);
		const email = await parser.parse(await rawEmail.arrayBuffer());
		console.log(email);
	},
};

Now when you run npx wrangler dev, wrangler will expose a local /cdn-cgi/local/email endpoint that you can POST email messages to and trigger your Worker's email() handler:

curl -X POST 'http://localhost:8787/cdn-cgi/local/email' \
  --url-query 'from=sender@example.com' \
  --url-query 'to=recipient@example.com' \
  --header 'Content-Type: application/json' \
  --data-raw 'Received: from smtp.example.com (127.0.0.1)
        by cloudflare-email.com (unknown) id 4fwwffRXOpyR
        for <recipient@example.com>; Tue, 27 Aug 2024 15:50:20 +0000
From: "John" <sender@example.com>
Reply-To: sender@example.com
To: recipient@example.com
Subject: Testing Email Workers Local Dev
Content-Type: text/html; charset="windows-1252" …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Hyperdrive jetzt im Free Plan verfügbar

Hyperdrive steht nun auch im Workers Free Plan zur Verfügung, sodass Workers ohne Aufpreis eine Verbindung zu PostgreSQL- oder MySQL-Datenbanken herstellen können.

Hyperdrive is now available on the Free plan of Cloudflare Workers, enabling you to build Workers that connect to PostgreSQL or MySQL databases without compromise.

Low-latency access to SQL databases is critical to building full-stack Workers applications. We want you to be able to build on fast, global apps on Workers, regardless of the tools you use. So we made Hyperdrive available for all, to make it easier to build Workers that connect to PostgreSQL and MySQL.

If you want to learn more about how Hyperdrive works, read the deep dive ↗︎ on how Hyperdrive can make your database queries up to 4x faster.

Hyperdrive provides edge connection setup and global connection pooling for optimal latencies.

Visit the docs to get started with Hyperdrive for PostgreSQL or MySQL.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Hyperdrive unterstützt MySQL und kompatible Datenbanken

Hyperdrive kann sich jetzt mit MySQL und MySQL-kompatiblen Datenbanken wie Amazon RDS und Aurora, Google Cloud SQL, Azure Database for MySQL, PlanetScale und MariaDB verbinden, ohne dass Codeänderungen an bestehenden Treibern nötig sind.

Hyperdrive now supports connecting to MySQL and MySQL-compatible databases, including Amazon RDS and Aurora MySQL, Google Cloud SQL for MySQL, Azure Database for MySQL, PlanetScale and MariaDB.

Hyperdrive makes your regional, MySQL databases fast when connecting from Cloudflare Workers. It eliminates unnecessary network roundtrips during connection setup, pools database connections globally, and can cache query results to provide the fastest possible response times.

Best of all, you can connect using your existing drivers, ORMs, and query builders with Hyperdrive's secure credentials, no code changes required.

import { createConnection } from "mysql2/promise";

export interface Env {
	HYPERDRIVE: Hyperdrive;
}

export default {
	async fetch(request, env, ctx): Promise<Response> {
		const connection = await createConnection({
			host: env.HYPERDRIVE.host,
			user: env.HYPERDRIVE.user,
			password: env.HYPERDRIVE.password,
			database: env.HYPERDRIVE.database,
			port: env.HYPERDRIVE.port,
			disableEval: true, // Required for Workers compatibility
		});

		const [results, fields] = await connection.query("SHOW tables;");

		ctx.waitUntil(connection.end());

		return new Response(JSON.stringify({ results, fields }), {
			headers: {
				"Content-Type": "application/json",
				"Access-Control-Allow-Origin": "*",
			},
		});
	},
} satisfies ExportedHandler<Env>;
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Deploy-to-Cloudflare-Button für Workers-Anwendungen

Mit dem neuen Deploy-to-Cloudflare-Button im README lässt sich ein Git-Repository mit einer Workers-Anwendung per Klick klonen, mit benötigten Ressourcen versehen und über Workers Builds automatisch bereitstellen.

You can now add a Deploy to Cloudflare button to the README of your Git repository containing a Workers application — making it simple for other developers to quickly set up and deploy your project!

Deploy to Cloudflare

The Deploy to Cloudflare button:

  1. Creates a new Git repository on your GitHub/ GitLab account: Cloudflare will automatically clone and create a new repository on your account, so you can continue developing.
  2. Automatically provisions resources the app needs: If your repository requires Cloudflare primitives like a Workers KV namespace, a D1 database, or an R2 bucket, Cloudflare will automatically provision them on your account and bind them to your Worker upon deployment.
  3. Configures Workers Builds (CI/CD): Every new push to your production branch on your newly created repository will automatically build and deploy courtesy of Workers Builds. …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Full-Stack-Frameworks auf Cloudflare Workers allgemein verfügbar

Adapter für React Router v7, Astro, Hono, Vue.js, Nuxt und SvelteKit sind für Cloudflare Workers allgemein verfügbar (GA), während Next.js (v1.0-beta) und Angular sich in der Beta befinden.

Full-stack on Cloudflare Workers

The following full-stack frameworks now have Generally Available ("GA") adapters for Cloudflare Workers, and are ready for you to use in production:

The following frameworks are now in beta, with GA support coming very soon:

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Bessere Unterstützung für Node.js Crypto- und TLS-APIs in Workers

Mit aktiviertem nodejs_compat-Flag stehen in Workers nun die vollständige node:crypto-API sowie Teile von node:tls zur Verfügung, was die Wiederverwendung von Node.js-Code und npm-Paketen erleichtert.

When using a Worker with the nodejs_compat compatibility flag enabled, the following Node.js APIs are now available:

This make it easier to reuse existing Node.js code in Workers or use npm packages that depend on these APIs.

node:crypto

The full node:crypto ↗︎ API is now available in Workers.

You can use it to verify and sign data:

import { sign, verify } from "node:crypto";

const signature = sign("sha256", "-data to sign-", env.PRIVATE_KEY);
const verified = verify("sha256", "-data to sign-", env.PUBLIC_KEY, signature);

Or, to encrypt and decrypt data:

import { publicEncrypt, privateDecrypt } from "node:crypto";

const encrypted = publicEncrypt(env.PUBLIC_KEY, "some data");
const plaintext = privateDecrypt(env.PRIVATE_KEY, encrypted);

See the node:crypto documentation for more information.

node:tls

The following APIs from node:tls are now available:

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Cloudflare Vite plugin ist jetzt Generally Available

Das Cloudflare Vite plugin (@cloudflare/vite-plugin) hat v1.0 erreicht und ist allgemein verfügbar, sodass Code während der Entwicklung mit Vites Dev-Server in workerd läuft.

The Cloudflare Vite plugin has reached v1.0 ↗︎ and is now Generally Available ("GA").

When you use @cloudflare/vite-plugin, you can use Vite's local development server and build tooling, while ensuring that while developing, your code runs in workerd ↗︎, the open-source Workers runtime.

This lets you get the best of both worlds for a full-stack app — you can use Hot Module Replacement ↗︎ from Vite right alongside Durable Objects and other runtime APIs and bindings that are unique to Cloudflare Workers.

@cloudflare/vite-plugin is made possible by the new environment API ↗︎ in Vite, and was built in partnership with the Vite team ↗︎.

Framework support

You can build any type of application with @cloudflare/vite-plugin, using any rendering mode, from single page applications (SPA) and static sites to server-side rendered (SSR) pages and API routes. …

Originalquelle(öffnet in neuem Tab)Problem melden