Edge Scripting just evolved: faster, safer, and even more powerful

Posted by:

Running applications at the edge should be simple, fast, and seamless, but too often, developers hit roadblocks. Cold starts drag performance down, module importing lacks flexibility, and managing secrets securely feels like an afterthought. Over the past few months, we've been closely listening to your feedback, watching discussions on our Discord, reviewing feature requests, and iterating based on real-world usage. The result? We’ve rolled out a wave of updates to make Edge Scripting smoother, faster, and more powerful than ever.

To help you build and deploy with less friction, we’ve focused on key improvements that enhance performance, flexibility, and security. Let’s dive into what’s new!

Cold starts: so fast, you won’t even notice

Cold starts have always been one of the biggest challenges in serverless computing. Nobody likes waiting, and we’re making sure you never have to. We introduced several cold start optimizations, significantly improving execution times across the board.

Cold starts happen when a runtime starts from scratch, leading to an initial delay before executing a request. While this might not be noticeable in some cases, for latency-sensitive applications like e-commerce, even a slight delay can hurt user experience and conversions. A snappy experience isn’t just nice to have; it’s essential. That’s why we’ve focused on reducing cold start times, ensuring your applications respond faster than ever.

After adding some behind-the-scenes magic, cold starts are now consistently faster, with a large portion of executions staying under 15 ms!

Average cold start times

And we’re not stopping there. We have more optimizations coming soon that should bring even better performance. Our goal is to eliminate cold start delays altogether!

Upgrade to Deno 2.1.5: over 200 fixes, features, and performance improvements

Bunny Edge Scripting was built on top of Deno to provide developers with a modern, secure, high-performance environment without the headaches of traditional runtimes. Deno’s native TypeScript support, built-in security model, and ultra-fast execution make it the perfect fit for running code at the edge. As Deno continues to evolve, we’re committed to keeping you up to date with the latest features and optimizations. Last month, we officially upgraded to Deno 2.1.5 and plan to move to the just-released 2.2.1 version soon.

This upgrade unlocks a range of improvements that will help make development on Edge Scripting even smoother. Changes to fine-tune networking, filesystem interactions, and external module handling will make everything feel more predictable and efficient. Better Node.js compatibility ensures easier integration with popular libraries, while enhanced observability and diagnostics make tracking and debugging issues simpler than ever. Plus, customizable linting options give developers more control over code quality, helping maintain best practices with greater flexibility.

This ensures Edge Scripting stays future-proof and ready for your next big project.

Secrets support: keep it safe, keep it simple

One of the most requested features post-launch was secrets support, and we’ve delivered! Now, you can securely store API keys, database credentials, and other sensitive information without hardcoding them into your scripts.

Security first: Secrets are encrypted at rest and stored separately from your code and GitHub repositories, providing an extra layer of protection. Manage them effortlessly through the dashboard or programmatically via our API.

When it’s time to use your secrets, Edge Scripting makes it seamless. Load them directly using the Deno.env API, or if you're working with Node.js-based modules, we’ve got you covered with node:process support for maximum compatibility.

With built-in secrets management, your applications stay secure, flexible, and easy to configure without compromising usability.

More flexibility with module importing

When Edge Scripting launched, we only supported HTTP-based external module imports. That worked, but it wasn’t enough. Developers needed a faster, more seamless way to integrate external libraries without awkward workarounds. The solution? Expanding support for additional module import methods:

  • npm: Direct access to the vast ecosystem of npm packages, making it easier to leverage existing tools and frameworks.
  • jsr: Integration with Deno’s official JavaScript registry, giving developers access to high-quality, optimized modules.

Now, you can build more with less hassle. No more manually fetching dependencies or relying on third-party bundlers—just import what you need when you need it, and keep moving forward. This update unlocks new possibilities, allowing you to build richer, more powerful applications at the edge without the friction of limited import options.

Awesome apps need awesome domains: introducing bunny.run

At bunny.net, speed is not just a feature; it's part of who we are. Every millisecond counts, so we created a domain that reflects that philosophy. Meet bunny.run, a dedicated and ready-to-go domain for your edge-hosted apps. It's a little more fun and a lot more in tune with what we do best: delivering the speed and performance your applications deserve.

While bunny.run is a fast and convenient way to deploy, we know that branding is important. That's why custom domains are just as simple to set up. Just hop into your Pull Zone settings, where you can connect your own domain and have your app running exactly how you want it. No complicated configurations—just a seamless experience tailored to your needs.

More improvements on the horizon

While we've already introduced some major upgrades, we're just getting started. With Edge Scripting, our vision is to create a world where developers can build and deploy applications with unparalleled speed, simplicity, and global reach. We're eliminating infrastructure complexity, allowing developers to focus purely on writing code while we handle scaling, security, and performance behind the scenes. Here's a taste of what's coming next:

  • Storage integration – You’ll be able to seamlessly integrate Edge Scripting with Bunny Storage, enabling scripts to manage files directly within storage zones. This allows developers to store assets, configuration files, and dynamically generated content efficiently while leveraging bunny.net’s high-performance network for ultra-fast access and distribution.
  • On-client request scripts – Run scripts on every incoming client request immediately upon receipt, prior to cache lookup or origin forwarding. This will allow you to modify cached requests, enforce security policies, and apply custom logic before they reach the cache or origin. Use cases include JWT validation on all CDN requests, request rewriting, and rate limiting, giving you unprecedented control over request handling at the edge.
  • Edge Database Lite - While not strictly an Edge Scripting feature, it deserves an honorary mention here since it's one of the most requested features we get from Edge Scripting users. We’ll be launching a globally distributed SQLite-based database based on Turso’s SQLite, designed to bring ultra-fast, low-latency data storage to the edge. With millisecond query speeds and seamless scalability, it enables developers to build powerful, data-driven applications without relying on centralized databases.

Ready to hop into the future?

Edge Scripting has already empowered developers worldwide to build and deploy applications at the edge with ease. With these updates, it's more powerful, more seamless, and packed with improvements that make development and deployment even smoother. Whether you're building APIs, optimizing performance, or creating dynamic applications, Edge Scripting helps you scale effortlessly while keeping your focus where it belongs, on your code. 

If you are already using Edge Scripting, there's nothing you need to do; just enjoy the updates. If you have not tried it yet, now is the perfect time. Deploy your code and experience the power of Edge Scripting firsthand. Happy coding and happy hopping! 🐰🚀