Cloudflare has unveiled a significant advancement in its platform, enabling direct connections between Cloudflare Workers and PlanetScale databases. This integration allows developers to construct full-stack applications powered by either Postgres or MySQL, streamlining the development process for serious applications.

In collaboration with PlanetScale, Cloudflare aims to provide a database solution that aligns with its commitment to performance, reliability, and an exceptional developer experience. These elements are vital for development teams looking to build robust applications. The connection to PlanetScale databases is optimized through Hyperdrive, ensuring rapid access from Workers to databases, irrespective of their location.
Building full-stack
As Cloudflare Workers evolves into a comprehensive full-stack platform, it introduces enhanced connectivity options for data access. With features like Workers KV, developers can effortlessly store configurations and cache unstructured data at the edge. Additionally, D1 and Durable Objects facilitate the creation of multi-tenant applications with isolated SQL databases. The integration of Hyperdrive further accelerates connections to external databases, making it a versatile tool for developers.
Now, users can directly access Postgres and MySQL PlanetScale databases from the Cloudflare dashboard. This seamless integration eliminates the need for manual API key management, allowing developers to link their Cloudflare and PlanetScale accounts effortlessly and connect to any of their databases, whether in production or development.

Postgres and MySQL are widely recognized as the go-to databases for application development, and their popularity is well-founded. Many enterprises have successfully scaled their operations using these databases, fostering a robust ecosystem that includes Cloudflare. The integration with Hyperdrive enhances this experience by maintaining warm connections to databases, thereby minimizing latency and reducing CPU load through efficient connection pooling. Furthermore, Hyperdrive can cache frequently queried results, significantly alleviating the load on databases, especially since approximately 80% of queries in typical transactional databases are read-only.
No more copying credentials around
Starting today, developers can connect to their PlanetScale databases directly from the Cloudflare dashboard with just a few clicks. This new feature ensures secure connections by default, complete with a one-click password rotation option, eliminating the cumbersome process of managing credentials manually. A Hyperdrive configuration will be automatically generated for each PlanetScale database, providing an optimal setup for building on Workers.

This integration with Hyperdrive ensures that PlanetScale databases are configured for optimal access from Workers. When a Worker connects to a Hyperdrive configuration for a PlanetScale database, the system automatically determines the database’s location and positions its connection pool in the Cloudflare data centers with the lowest latency. This setup minimizes unnecessary roundtrips typically involved in database connection setups, allowing for rapid query responses. Additionally, Hyperdrive’s caching capabilities support scaling for high-read workloads, further enhancing performance.
Get started with PlanetScale and Workers
With this partnership, building on Workers with PlanetScale has never been easier. Developers can create a globally deployed application that queries their database, caches essential queries, and maintains warm database connections with just a few clicks.

To get started, developers can:
- Visit the Cloudflare dashboard to connect their PlanetScale account.
- Alternatively, access PlanetScale to connect their Cloudflare account.
- Then, deploy a Worker.
For further information, developers can review the Hyperdrive documentation and the PlanetScale documentation to learn more about connecting Workers to PlanetScale and begin their development journey.