Modern companies need to provide low latency access to their service or risk losing customers. Yet, data centers are physical entities and the speed of light cannot be exceeded, meaning the farther your customers are from their data, the worse latency they will get.
This pressure has been around for decades. CDNs for static assets offer a great experience to users all over the globe. But at the same time, users expect dynamic and personalized experiences. To bridge that gap, platforms like Cloudflare, Vercel and Netlify offer Edge functions: the ability to execute code at the Edge, from locations that are closer to your users than traditional multi-region data centers.
But what about the data? Without access to data, personalized experiences are limited in what they can provide. The Data Edge was a missing part of the puzzle because traditional databases struggle on Edge environments due to their resource limitations and high cost.
To bridge that gap, we are announcing Turso, our Edge database. It is now in public beta, meaning it’s available for anyone to build with for free. Those interested can sign up for our Starter plan, which is free forever, and get started today
What does the Data Edge need from a database?
One of the defining features of the Edge is that resources are not as readily available and abundant as the Cloud. Databases are notoriously heavy, which makes traditional databases either too expensive or outright impractical for Edge use cases.
Among the usual top contenders, SQLite breaks this paradigm: it is lightweight, meaning it uses very little memory and doesn’t have complex query planners; it is fast, and highly embeddable, and can fit anywhere.
The only disadvantage of SQLite is that, not being Open Contribution, it is hard to adapt for the needs of an Edge database. Turso is built by the team behind libSQL, an Open Contribution fork of SQLite under the MIT License, meaning it is fully compatible with SQLite, while adding core functionality that is needed to power an Edge database.
Connecting to the database also requires special care. Edge environments are restricted not only in the amount of resources available, but also what channels of communication are made available to developers: HTTP and WebSockets are usually the only I/O available, so Turso uses those protocols when connecting over the network.
How does Turso work?
Turso offers drivers for TypeScript, Rust, and Go, with others to come. Developers can build, test and iterate locally, with a standard SQLite interface. The drivers automatically switch between local and HTTP/WebSockets when it is time to deploy.
Creating a database is easy:
# creates a database in the closest region $ turso db create db-name
There is no need to worry about provisioning computing resources. And once you decide a particular location is important for your business, creating a replica is just as easy:
# makes your data available in London $ turso db replicate db-name lhr
Which use cases benefit from Turso?
Every developer that already uses Edge functions will benefit from Turso, by now collocating their Edge data. And developers thinking about Edge compute as a way to offer low-latency experience to their users will benefit from an architecture that contemplates the Data Edge from the get-go.
In particular, E-commerce, storefronts, user personalization, A/B testing, and AI are examples of use cases that are already seeing their compute at the Edge, and are now ready to embrace the Data Edge.
How much does Turso cost?
Turso is free to use, and the Starter plan we just announced, which is free forever, has very generous allowances. There is also an Enterprise Partner tier, only available during the Public Beta period, for those who need much higher allowances and want to work on building the future of the Data Edge. Finally, all those who participated in the private beta will be receiving an email about upgrading to the greater allowances of the free Starter plan. You can find all the details on current and future pricing at https://turso.tech/pricing
Once again, welcome to the Data Edge.