Cloudflare recently announced their query caching & connection pooling solution for databases in Workers, Hyperdrive. Whilst there's plenty of examples of using Hyperdrive with libraries like pg in the documentation, someone in the Cloudflare Developers Discord asked about usability with Rust Workers. There are examples for using tokio-postgres with workers-rs, the
If you're not familiar with Cloudflare Workers already, it's a serverless platform that leverages the V8 runtime & isolate model to provide super fast execution at a nanoservice level. In September 2022, the runtime was made publicly available as workerd. The launch blog provides some background & context, and I highly recommend
Replacing global identifiers with build-time constants has a few uses - inserting a Git hash or release number for using with Sentry SDKs or eliding away code that is only meant for development & staging environments. Wrangler, the Cloudflare Workers command-line tool, exposes a few esbuild APIs that we can interact
PutObject - STREAMING-AWS-HMAC-SHA256-PAYLOAD If you've tried to use the AWSSDK.S3 package for interacting with Cloudflare R2 from .NET, you've likely ran into this error when uploading a file using PutObject: STREAMING-AWS-HMAC-SHA256-PAYLOAD This is since R2 doesn't support Streaming SigV4 which is used in chunked uploading. The fix for this
What are 103 Early Hints? 103 Early Hints, a new informational HTTP status code to provide resource hints to clients before the final response is ready, has landed in Chrome 103. If you haven't already read the blog from Cloudflare about how it works & their performance benchmarks, you definitely should!