Think about a world the place deploying and operating highly effective purposes is so simple as writing JavaScript, a world the place infrastructure fades into the background, and your code simply runs precisely the place it must be: on the fringe of the web, proper subsequent to your customers.
We’re excited to announce that this world is now a actuality and introduce Bunny Edge Scripting!
Edge Scripting is a brand new, serverless JavaScript platform constructed on prime of Deno, designed to assist builders construct, deploy, and run JavaScript purposes on our huge world community with out worrying about {hardware}, scaling, or load balancing ever once more.
With only a few clicks, Edge Scripting means that you can join your GitHub repository and routinely deploy and run your utility on the fringe of the web to take pleasure in unparalleled ease, pace, and scalability by merely pushing your code.
Join. Push. Carried out.
Once we designed Edge Scripting, our objective was easy: permit builders to construct and run their purposes within the easiest way potential, and with Bunny Edge Scripting, your GitHub foremost department turns into your launchpad.
Connecting your account takes only a few clicks. Then, when you’re achieved together with your code modifications, simply push them to your foremost department, and in simply seconds, your app is constructed and deployed globally.
No extra tedious compiling, versioning, rollback worries, or advanced CI/CD configurations. Edge Scripting handles the heavy lifting so you may deal with what you do greatest: writing code. With automated deployments and seamless integration into your growth workflow, getting your utility dwell has by no means been simpler. It is so simple as connecting your repo, pushing your code, and also you’re dwell.

Infinite scalability with out the trouble or the value tag
We have all been there: your app positive aspects recognition, and instantly, you are scrambling so as to add new servers. This immediately brings a mountain of recent obligations, from monitoring, failover, load balancing, and safety. All of this requires experience, however greater than something, it requires time. The cloud was alleged to simplify this, however these days, it typically appears so as to add much more complexity.
This is the reason we designed Edge Scripting to be as hands-free as potential. We have constructed it instantly into our world community with automated scalability, load balancing, failover, and sturdy safety built-in with out you even lifting a finger. All the pieces is seamlessly dealt with on the fringe of the community.
What additionally helps you scale infinitely is the pricing.
We’re on a mission to assist make the web hop sooner, which additionally consists of making it reasonably priced to everybody. We consider that highly effective compute assets ought to be accessible with out breaking the financial institution. Regardless of should you’re simply constructing a easy contact type or operating a large world operation, Edge Scripting pricing was designed to work and scale with you.
It comes with no minimums, no advanced billing, and no hidden prices. You solely pay for the assets that you simply use:
- Requests: $0.2 per million
- CPU Time: $0.02 per 1,000 of CPU time seconds
If you happen to’re serving nothing? You are paying nothing, too!
Make the CDN edge your playground with Middleware Apps
Edge Scripting wasn’t only a compute product that we bolted on and deployed globally. As an alternative, we constructed it straight into the material of one of many largest networks on the web. Because of this, Edge Scripting turns our ultra-fast world community right into a CDN that you would be able to program your self. With this, we’re unlocking highly effective new methods to construct, optimize, and safe purposes nearer to customers than ever earlier than.
At the moment, bunny.internet is an entry level for over 1.5 million web sites and furthermore, serves belongings for hundreds of thousands of different domains. This offers us a strong function in safety, load balancing, caching, and good logic on the edge. Whereas we already provide highly effective options comparable to Edge Guidelines, Edge Scripting takes this to an entire new stage, making the sting your playground with the brand new Middleware Apps.
Middleware Apps had been designed to transcend standalone purposes and supply a toolkit for customizing the CDN habits on a a lot deeper stage. With Middleware Apps, you may combine instantly into Bunny CDN and seamlessly lengthen it with your personal performance.
Be it load balancing, safety checks, A/B testing, caching, or request modification, the Middleware mode means that you can take management of how the CDN ought to reply and modify it on demand. It’s as shut as you will get to operating your personal customized CDN however with out the infrastructure overhead.
At launch, Middleware Apps assist modifying the origin request and response, however that is solely the start. We’re actively engaged on increasing this performance to present you even deeper management over caching, revalidation, and different core CDN behaviors quickly.
Your first edge utility takes only a few traces of code
Edge Scripting is not simply easy to deploy, it is also extremely simple to code. That can assist you effortlessly run standalone purposes throughout Deno, Node.js, and Bunny Edge Scripting, we created BunnySDK. The SDK is a light-weight wrapper that intently mirrors the Deno server implementation however provides the flexibility to run seamlessly throughout totally different environments.
This makes getting began with Edge Scripting unbelievably easy, taking as little as a number of traces of code.
Hey World instance:
import * as BunnySDK from "https://esm.sh/@bunny.internet/edgescript-sdk@0.11.2"; /** * Returns an HTTP response. * @param {Request} request - The Fetch API Request object. * @return {Response} The HTTP response or string. */ BunnySDK.internet.http.serve(async (request: Request): Response | Promise<Response> => { return new Response("Hey World"); });
The snippet above is all it takes to create a world, edge-optimized utility that is ready to reply immediately to person requests on the edge, but additionally run domestically in your machine.
Middleware Purposes are equally easy. We have made it extraordinarily simple to change each the request and response of any CDN request. Middleware Apps will let you inject customized logic instantly into the prevailing CDN processing pipeline. This supplies a seamless integration into any origin configuration, Edge Guidelines, and Pull Zone configuration with out having to rewrite any advanced proxy logic your self.
Middleware App instance:
import * as BunnySDK from "https://esm.sh/@bunny.internet/edgescript-sdk@0.11.2"; /** * When a response is just not served from the cache, you need to use this occasion handler * to change the request going to the origin. * * @param {Context} context - The context of the middleware. * @param {Request} context.request - The present request. */ async perform onOriginRequest(context: { request: Request }): Promise<Response> | Response | Promise<Request> | Request | void { context.request.headers.append("Earlier than", "Added earlier than request"); } /** * When a response is just not served from the cache, you need to use this occasion handler * to change the response going from the origin. * This modifies the response earlier than being cached. * * Returns an HTTP response. * @param {Context} context - The context of the middleware. * @param {Request} request - The present request achieved to the origin. * @param {Response} response - The HTTP response or string. */ async perform onOriginResponse(context: { request: Request, response: Response }): Promise<Response> | Response | void { context.response.headers.append("After", "Added on the response return."); } BunnySDK.internet.http.servePullZone() .onOriginRequest(onOriginRequest) .onOriginResponse(onOriginResponse);
It is this simple so as to add a request and response header to any Pull Zone. You may then simply set off the script for all of the requests and even execute dynamically utilizing Edge Guidelines.
After all, writing software program is not only about producing code, however sharing it. One in every of our causes for constructing Edge Scripting on prime of Deno was its current assist for an unlimited ecosystem of exterior packages. For instance, integrating an exterior service like SendGrid to ship an e-mail is this straightforward:
SendGrid instance:
import * as BunnySDK from "@bunny.internet/edgescript-sdk"; import sgMail from "https://esm.sh/@sendgrid/mail@7.7.0"; // Set your SendGrid API key sgMail.setApiKey(Deno.env.get('SENDGRID_API_KEY')); BunnySDK.internet.http.serve(async (req) => { const msg = { to: 'person@instance.com', from: 'you@yourdomain.com', topic: 'Welcome to Bunny Edge Scripting!', textual content: 'This e-mail was despatched instantly from the sting.', }; strive { await sgMail.ship(msg); return new Response("E-mail despatched efficiently!"); } catch (error) { console.error(error); return new Response("Didn't ship e-mail.", { standing: 500 }); } });
Gone are the times of losing hours to construct, deploy, and join a easy contact type. Now, all it takes is a number of traces of code.
To discover ways to get began simply and for extra examples, you may go to the Edge Scripting documentation.
Powered by Deno: Flexibility, pace, and freedom with out the lock-in
Once we got down to construct Bunny Edge Scripting, we got down to reinvent the person expertise for the way builders construct, deploy, and run purposes on the edge. What we did not need to do was to construct one more JavaScript runtime with restricted capabilities. We wished builders to have the ability to construct on a well-recognized ecosystem, full with hundreds of thousands of modules, and with out the burden of lock-in.
That is why we determined to mix the pace of bunnies with the would possibly of dinosaurs, and construct Edge Scripting on prime of Deno. Deno is an open-source, trendy JavaScript runtime designed to uncomplicate JavaScript growth and remove pointless complexity. Finest to be mentioned by Ryan, the Deno founder himself:
https://www.youtube.com/watch?v=swXWUfufu2w
On prime of simply being easy, constructing on Deno brings a listing of extra benefits:
- Native TypeScript assist: You may simply write type-safe code in TypeScript with none further configuration.
- Enhanced safety: Deno runs in a safe sandbox by default, minimizing vulnerabilities.
- Extremely-fast efficiency: Being inbuilt Rust, Deno provides distinctive efficiency and ultra-low startup instances.
- An unlimited ecosystem of modules: Deno helps tens of 1000’s of native modules and hundreds of thousands of npm packages that will help you construct something simply.
We’re excited to empower builders with a platform that does not deal with locking you in, however as a substitute, empowers you to simply construct and run your purposes wherever.
Batteries included: Compute, efficiency, and safety
Out of the field, Deno comes with the whole lot it’s good to construct, check, and deploy your purposes. With Edge Scripting, we’re constructing additional on prime of that.
Leveraging our huge world footprint, any utility deployed to bunny.internet is routinely accelerated by our world community and routinely integrates with edge caching, highly effective safety, logging, and analytics.
This implies your purposes are at all times protected by highly effective DDoS safety, utility assaults, and have built-in CDN useful resource caching for the best possible efficiency potential.
There is no extra want to mix a number of totally different companies for DNS, CDN, and cargo balancing. With Edge Scripting, all of it comes built-in by default. On prime of that, Edge Scripting provides much more essential options that will help you run purposes globally, comparable to real-time logging, launch management, environmental variables, and secret administration.
Constructed-in real-time logging
Debugging and logging on a globally distributed scale brings some distinctive challenges, and with 1000’s of servers throughout 119+ datacenters globally, we perceive this very effectively.
To make these challenges so simple as potential for builders, we constructed Edge Scripting with built-in real-time logging, permitting you to seamlessly observe what your app is doing within the wild.
With the dwell log view, you may shortly see what is going on on, and dig deeper into particular points due to regional filters and search assist.

For superior customers, we additionally uncovered the logging through an HTTP and a dwell WebSocket API, permitting you to simply join it to different platforms.
Easy model and launch controls
We get it, typically issues break. A essential bug slips by way of or an surprising rollback is urgently wanted. That is why Edge Scripting introduces a easy, and intuitive model management system. Each time you make a change, or publish a launch, we routinely create a model historical past for you, making on the spot world rollbacks only a few clicks away.

Even higher, we’re taking it a step additional. Quickly, we plan to introduce a built-in dynamic developer mode, permitting you to simply run a selected commit, launch, or package deal utilizing a dynamically mapped utility URL. Meaning as quickly as you push code, you may immediately check it dwell, with out disrupting your manufacturing surroundings.
Full API and Terraform assist
We perceive that automation and infrastructure as code are important for any trendy growth workflow. That is why, like all of our merchandise, Bunny Edge Scripting comes with complete API assist in addition to a Terraform supplier.
This lets you handle and deploy your purposes programmatically and simply combine into your current CI/CD pipelines. With near-real-time configuration modifications and deployments, Edge Scripting means that you can construct highly effective workflows, automate duties, and execute dynamic code—supplying you with a strong automation instrument with only a few API calls.
Transferring past JavaScript with WASM assist
At the moment, JavaScript is by far the most well-liked programming language on the earth, however why cease there? For these eager to do extra, Deno additionally brings WebAssembly (WASM) assist, permitting you to usher in Rust, C++, or some other language, and make it run globally with simply as a lot ease. This supplies even sooner and extra constant efficiency, rivaling low-level native code.
Getting WASM operating may be very simple, and Deno conveniently exposes WebAssembly to the usual browser interface. All you want is a binary to run.
WASM counter instance:
import * as BunnySDK from "https://esm.sh/@bunny.internet/edgescript-sdk@0.11.2"; const { occasion, module } = await WebAssembly.instantiateStreaming( fetch("https://wpt.dwell/wasm/incrementer.wasm"), ); /** * Returns an HTTP response. * @param {Request} request - The Fetch API Request object. * @return {Response} The HTTP response or string. */ BunnySDK.internet.http.serve(async (request: Request): Response | Promise<Response> => { const increment = occasion.exports.increment as (enter: quantity) => quantity; return new Response("Worth " + increment(41)); });
It is that simple to run virtually any utility globally. FFmpeg on the edge? Not an issue. Weaving your subsequent Rust or C++ purposes into the material of the web? Not an issue both. WASM allows you to transfer past the bounds of a single programming language. You’re free to construct, deploy, and code virtually something.
For extra particulars on WASM assist, take a look at Deno’s WASM documentation.
Reside within the blink of an eye fixed
According to our mission to make the web hop sooner, Edge Scripting is not simply easy, it is also blazing quick!
Deno was written in Rust and crafted for ultra-low startup instances and blazing-fast efficiency. With out heavy dependencies, a extremely optimized I/O pipeline, and native TypeScript assist, purposes hosted on Edge Scripting get as shut as potential to precise 0ms startup instances.
With Bunny Edge Scripting, you get the form of efficiency that’s as near 0ms startup because it will get. We’ve reduce out the bloat and fine-tuned each layer of the request pipeline in order that your purposes reply earlier than your customers may even blink. As a result of on the edge, each millisecond issues.
Pawing the way forward for edge: Constructing one of the best Edge Computing platform
We’re getting down to make ultra-fast world purposes a breeze, and for us, that is only the start. We’re excited to share that we’ve got a wealthy roadmap forward to make Edge Scripting one of the best ways for anybody to construct, and run any sort of utility.
This is what’s coming quickly:
- A globally distributed database
- bunny.internet storage library
- Assist for npm module resolves
- Higher node specifier assist
- GPU and AI inference assist
- Assist for bigger purposes
- On-the-fly dynamic builds primarily based on every commit
- CLI assist
- And far, rather more to observe…
As we proceed to evolve Bunny Edge Scripting, we’re dedicated to pushing the boundaries of what is potential on the edge, and construct an edge computing platform of each developer’s dream.
Hop into the way forward for Edge Computing
At bunny.internet, we’re on a mission to make the web hop sooner, and what higher method to obtain that than by shifting your purposes simply milliseconds away out of your customers.
If you happen to’re uninterested in coping with difficult, gradual, and costly infrastructure, and also you need to embrace a future the place deploying is so simple as writing code, we invite you to hop onto Edge Scripting and provides it a strive!
You may join, and apply for our beta program right now, and begin specializing in what you take pleasure in most: creating superior software program! We’re excited to construct a sooner, safer, and extra dependable web collectively!
Dejan Grofelnik Pelzel