The development model for Internet applications has weirdly followed, in many ways, the model developers have used for enterprise applications. First, there was the highly-centralized "mainframe" model of CGI. Then as browsers got beefier, next came the "client-server" model of JavaScript-laden Web pages (and code-heavy mobile apps) doing all the display-side work using Web-based APIs.

If you've followed the history of software development, you know what comes next: middleware. And that's exactly where Fly.io, founded by Kurt Mackey, comes in. Full disclosure: Mackey is Ars' former technology director. And his Fly.io platform is a "global load balancer" in that it puts gateways for programming interfaces in data centers around the world. Much like how Cloudflare uses the "Anycast" feature of the Border Gateway Protocol to provide a content delivery network, Fly.io uses Anycast to leverage routing of application requests to the nearest gateway. The gateway connects back to the back-end of the application through an encrypted SSH tunnel.

But the middleware running on the gateway can also be used to handle a lot of the work that previously would have required multiple requests from the Web browser or app client. Fly.io provides a number of middleware components that can handle many of the processing tasks currently handled either by the back-end application or script in the browser. Developers can wire together middleware components through a Web-based tool before connecting them to an agent on their application server. Multiple back-end services can be put behind a single DNS address—for example, Fly.io's own site uses Github Pages as a back-end service to provide its documentation.

Applications don't just get a boost from having some of the application logic closer to the client. "Apps get a speed boost from global SSL termination," Mackey told Ars. "Cutting back on JavaScript improves render speeds. App developers can also do clever stuff like send mobile users to a different backend, and combine some of our middleware to combat DDoS."

One example of a potential practical application for Fly.io is making Web advertisements more secure. It could (in theory) be used to replace much of the JavaScript that delivers Web advertisements, instead dynamically inserting ads into the page displaying them before the ads are sent to the browser based on the location and other information about the user collected from the page request. Such a setup could go a long way toward defeating problems like malvertising that relies on script being executed in the browser.

Fly.io has something else in common with Cloudflare—getting started with the service is free, as are the first 50,000 application requests each month. Above and beyond that, Fly,io is metered at $0.05 per 1,000 requests. Some of the pre-built middleware components have their own pricing, but any middleware marked "beta" is currently free.