Fly.io: Making the Edge Accessible for Developers
After spending six years building the Compose Database-as-a-Service platform that was acquired by IBM in 2015, Kurt Mackey and Jerome Gravel-Niquet say they set out to do something really hard.
“We have a long history with CDNs, which are really good at serving up the same static image to a million people very fast, but it always irked us that you couldn’t apply those same sort of edge caching mechanisms to applications that don’t serve the same thing to a million people,” says Mackey. “We wanted to make what I now call a programmable edge, which is a CDN that’s controlled by developers.” Of course, he adds with a laugh, “we didn’t really know what that meant when we started.”
Living on The Edge
With what Fly calls Edge Apps, “you have users with their devices and you have your application that’s probably on a server in Virginia or somewhere else, and there’s everything in between,” says Mackey. “The scope of our mission is to give developers control over the whole edge, which is everything between a user device and wherever the application runs.”
Enabling that mission is Fly’s partnership with Packet. As a startup, the company didn’t want to have to worry about managing farflung servers or hiring a network person. “Packet took us to 16 cities very fast, and they’ve added two data centers since then,” says Mackey. “We’re hoping that Packet keeps growing faster than we do.”
As it turns out, the two companies also have complementary missions. “I think both of us want to make a lot of ‘hard stuff’ accessible to developers,” says Mackey. “Working together on these kinds of problems is a unique part of our relationship with Packet as a cloud provider - and I think that is because we have very similar problems to solve.”
Some Unexpected Use Cases
Fly.io launched with a post on Hacker News. “There were no negative comments, which is always really weird,” Mackey jokes. Interest was high from the beginning from developers who had run into the limits of a CDN and wanted to try to solve existing problems with the platform.
For Mackey, the really interesting use cases, though, are the companies that haven’t had experience with CDNs and are building things from scratch. “We just happen to give them a new way of thinking about things,” he says. “It’s fun to show them the types of problems you can solve if you just get outside of the constraints of your app and run things all over the world.”
I think both of us want to make a lot of ‘hard stuff’ accessible to developers. Working together on these kinds of problems is a unique part of our relationship with Packet as a cloud provider - and I think that is because we have very similar problems to solve.
For example, Fly makes it easy to host your blog, homepage, and everything else under the same domain name, and that’s gotten a lot of mileage from new users. A number of users are also improving how they handle images. “One of the big problems people run into is they have a lot of images and they want to crop them into the right size to put them in their apps the right way,” says Mackey. “You wouldn’t necessarily want to run all that on one server and one data center. That’s one thing that’s inherently better because of being global.”
Mackey points to another use case that he never anticipated. A stock photo company uses Fly to apply a watermark on its images if they’re embedded on any other site. “It’s kind of stupidly simple to think about,” he says, “but I don’t think they could have done that without us, and it was such a cool little thing to see.”
The Fly platform is also being used for what the company calls routing. “Imagine you’re moving from one cloud provider to another,” Mackey says. “If you put Fly in front of that, you can manage that transition by sending a little bit of traffic to the new destination, making sure things are all good, and then slowly scaling the traffic over. And the users never know the difference.”
With Fly, the fear of changing CDNs because everything will go down has been taken away. In fact, Fly can be run on a local machine, so users can actually test and develop applications on an airplane if they want to.
The company has reached a scale that requires much more speed, so they’re currently rewriting the runtime in Rust “to make it just ridiculously fast,” says Mackey. “It’s very fun, but it might actually also become an HAProxy alternative that’s programmable. We’re kind of developing it by accident, which is kind of cool.”
Today, most of Fly’s ongoing development is “expanding the scope of what we’re doing to cover a lot more surface area of the edge,” says Mackey. The underlying mission, he adds, is to “turn the whole edge into a set of APIs and expose those lower level fundamental bits of the edge to developers so they can solve new and interesting and global problems.”