Funtap - stock.adobe.com
PlanetScale released a new capability that makes its database more easily accessible from serverless edge deployments.
Among the users of the PlanetScale database looking to use the PlanetScale serverless driver is online sports and popular culture news service Barstool Sports.
The company had been running on Amazon Aurora for its MySQL database workloads and ran into scaling and performance problems, said Andrew Barba, head of engineering at Barstool Sports.
Amazon Aurora, like PlanetScale, is intended to be compatible with MySQL. In 2021, Barstool moved to PlanetScale after the database vendor launched its fully managed database-as-a-service offering.
Andrew BarbaHead of engineering, Barstool Sports
"Similar to how compute is moving the edge, it’s time for databases to move to the edge as well," Barba said.
With a traditional application stack that runs on a server, a developer would have access to a full set of APIs that enable connections to any database.
Edge services, including Cloudflare Workers, have provided users with somewhat complicated workarounds to connect to different types of databases, Van Wiggeren noted. PlanetScale wanted to provide a mechanism for edge services that will work with any edge service and be easy to configure.
For PlanetScale, the hardest part of building out the serverless driver was figuring out how to expose all the capabilities of the database with an API that connects over HTTP. It's a process that took PlanetScale about six months as it built out capabilities in the database and its platform infrastructure.
"We started out and realized what we actually needed is a new load balancer, a new front door into the database that can serve queries over HTTP," Van Wiggeren said. "We weren't willing to compromise on security or functionality, so we actually built and architected from the ground up, our very own HTTP load balancer for MySQL databases."
Looking forward, there are still some areas PlanetScale might be looking to address in term of API connectivity. One such area could be GraphQL, another API approach for connecting and querying data.
"It's an area that we're really interested in," Van Wiggeren said of GraphQL. "It's definitely an attractive and, I think, very interesting way that people are leveraging their databases."