Start for free
Introduction to serverless databases
What is a serverless database?
Why should you use a serverless database?
- Automatic elastic scaling and geographical distribution: You don’t have to worry about sharding or whether your database can handle a sudden spike in traffic, because a serverless database scales up and down automatically to meet demand. This means scaling all the way down to zero when the database isn't being utilized while promptly responding when a query arrives. A serverless database can also scale geographically, moving and storing data dynamically around the globe to minimize latency and give users worldwide a consistently fast experience.
- Native resilience and fault tolerance: You also won’t have to worry about faulty storage nodes or zone disruptions bringing your services down. A serverless database can survive node and zone outages, as well as implement software updates and online schema changes, without any planned downtime required.
- Simplicity and familiarity: Working with your database is as simple and intuitive as using an API. With features such as self-service starts, completely managed operations, and the ability to create clusters with the press of a button or a single command, a serverless database makes life simpler for everyone who works with it.
- Consumption-based billing: You don’t pay for storage and compute resources you’re not using. A serverless database only bills you for resources you used, and you can set spending limits so that you don’t overrun your budget.
- ACID: You don’t have to sacrifice consistency for scale. Some serverless databases like Fauna provide the needed atomicity, consistency, isolation, and durability (ACID) properties to your transactions without sacrificing speed, no matter what scale you’re operating at.
- Prototyping and testing: With increasing competition across all industries, it is critical to produce prototypes and gather meaningful feedback from users as soon as possible. Since serverless database features such as self-serve, speed, and pay-per-use billing are both economical and relatively fast to implement, you can focus on writing code and responding to user feedback in the testing environment.
- Reduced time to market: Serverless databases can help you drastically reduce time to market. Instead of performing complex deployment procedures to push out bug patches and new features, you can add and alter code as needed.
- Automatic scaling: A serverless database can be utilized with existing or new applications that have unpredictably high database demand; it automatically scales up when needed and down when not. You don’t need to spend time configuring an autoscaling policy for your database system.
- Managing resource demands: With a serverless database, you don’t have to worry about allocating enough resources to fulfill inconsistent resource requests. A serverless database will expand automatically when needed.
Examples of serverless databases
- Amazon Aurora Serverless is a proprietary service from AWS that’s compatible with Postgres and MySQL, which means you can connect to your Aurora database as if you’re connecting to Postgres or MySQL. It is also AWS cloud optimized. Aurora storage automatically grows in increments of 10 GB, up to 64 TB.
- Google Firestore is a serverless document database that provides direct database access for web, IoT, and mobile app development. It’s highly scalable with no maintenance window and zero downtime. Firestore enables offline data access for web and mobile SDKs, enables ACID-compliant transactions, supports multiple server-side development libraries and programming languages, enables data validation and identity-based security access controls, and offers real-time data synchronization with offline data access.
- Amazon DynamoDB is a NoSQL database service with single-digit millisecond response times. AWS manages everything, allowing you to store as much data as you need while also handling unpredictable demands. It's also a fully managed NoSQL database service with built-in scalability.
- CockroachDB, an SQL relational serverless database, is considered one of the most evolved serverless databases. It offers a completely elastic and robust data architecture, distributed globally to help developers rapidly develop apps at a low cost. It is a single Postgres instance in many aspects.
- Fauna is a versatile transactional database that’s supplied as a secure, scalable cloud API with native GraphQL. Fauna blends the flexibility of NoSQL systems with SQL databases’ relational querying and transactional capabilities. It supports drivers for languages including Python, Java, Scala, and GraphQL, and promises full ACID compliance.
How does a serverless database work?
What are the benefits of serverless databases?
- Cost-effectiveness and high scalability: You will save time and money by using a serverless database, which eliminates the need for a license, installation, cabling, configuration, maintenance, and support. Scaling computing systems do not need to be set up manually by operators or developers. Furthermore, you can use resources to construct apps in the most efficient way possible based on your needs.
- Better resilience and availability: A serverless database is duplicated across multiple regions, so if a storage node fails, all queries will be diverted to other nodes with load balancers until the node recovers, making it resilient and highly available. A serverless system is more adaptable than a traditional system in general. Serverless databases enable you to reduce latency, and data from event-driven functions is read where it is closest to the user.
- Increased productivity and better developer experience (DX): Developers don't have to worry about provisioning, configuring, or managing database infrastructure while using a serverless database. Developers just need to concentrate on creating applications, which increases productivity and provides a better DX.
If you enjoyed our blog, and want to work on systems and challenges related to globally distributed systems, serverless databases, GraphQL, and Jamstack, Fauna is hiring!
Subscribe to Fauna's newsletter
Get latest blog posts, development tips & tricks, and latest learning material delivered right to your inbox.