🚀 White Paper: Fauna Architectural Overview - A distributed document-relational database delivered as a cloud API.
Download free
Fauna logo
Product
Solutions
Pricing
Resources
Company
Log InContact usStart for free
Fauna logo
Pricing
Customers
Log InContact usStart for free
© 0 Fauna, Inc. All Rights Reserved.

Serverless databases

Apply the serverless paradigm to your database for consistency and scale.

Android Image
C Sharp Image
Go Logo Image
GraphQL-Small Image
Java Logo Image
JS Image
python-small Image
ruby-small Image
scala Image
Swift Image
Android Image
C Sharp Image
Go Logo Image
GraphQL-Small Image
Java Logo Image
JS Image
python-small Image
ruby-small Image
scala Image
Swift Image
Android Image
C Sharp Image
Go Logo Image
GraphQL-Small Image
Java Logo Image
JS Image
python-small Image
ruby-small Image
scala Image
Swift Image

How to get both consistency and scale

Picking the right serverless database for your architecture

Serverless computing is a cloud-native development model that allows developers to create, build, and run applications without having to personally manage servers. Instead, server management is handled by the provider. There are multiple advantages to applying the serverless paradigm to databases - such as reducing database cost (pay-per-use), providing greater scalability, reducing maintenance overhead , and allowing quick deployments.
Databases are the one component in most serverless architectures that still tend to require server provisioning and administration. This is because of the complexity of managing data efficiently - companies generally needed a database administrator to know the ins and outs of their database system and apply best practices to shard, replicate, and store data effectively. In the past 5 years, serverless database offerings have exploded - each coming with their own set of tradeoffs. They can be broken down based on a few categories: data model, deployment methods, and edge presence.

Document or relational databases

Similar to traditional non-serverless databases, the offerings for serverless databases can store data as relations (i.e., relational database, SQL database) or as documents (i.e., NoSQL database). The one a developer chooses depends on their familiarity with a specific model and if they have a very defined shape to the data they’ll be storing. Most early-stage companies choose NoSQL databases given they don’t have known access patterns or defined data schemas - the unstructured nature of document databases is beneficial at this stage. Companies who understand very clearly what type of data they’ll be storing can benefit from choosing SQL databases - giving them the advantage of defining relationships between data, making it easier to query and not duplicate data across your database. Fauna’s document-relational model takes the best elements from both models and stores data as documents while providing the capability to define relationships between documents for ease of querying.

Models of deployment for serverless databases

A serverless database seems to imply that there is only one deployment method - serverless, as in when a dev creates a database, it’s just there instead of requiring time to spin up infrastructure in the backend. This is not true today - there are serverless databases that only spin up infrastructure when you’re creating a database instead of always being available. This leads to a general problem in the serverless world - cold starts. If latency is important for an application, you must identify if the serverless database will induce cold starts. Fauna is a truly serverless database - when you make an API call to create a database it’s instantaneously available to be written and read without any delay.
Development teams are also moving from using single-region services like AWS Lambda in their serverless architecture to using more compute at the edge services like Cloudflare Workers, Netlify, and Vercel edge functions. When your compute layer is distributed across the globe to reduce latency, you want a global database to ensure a good end-user experience. When you create a database in Fauna it’s intrinsically distributed across three regions - you can choose to have it distributed across a single region group (i.e., either US or EU) or have it distributed across the globe.
When building serverless apps it’s important to consider all of these elements when picking the right serverless database for your application and workload.

Benefits of Fauna, a serverless database

Worry less about operations

✅ Create a multi-region database in just three clicks and interface with it using our language drivers, or GraphQL

✅ Scale as you grow without managing servers, clusters, data partitioning, or replication of your data

✅ Run compute close to your data using Fauna’s user defined functions without any server administration

Integrate with your existing serverless stack

✅ Interface with Fauna’s global database directly from FaaS services like AWS Lambda or edge functions like Cloudflare workers with an API call

✅ Automate with infrastructure as code platforms such as serverless framework

✅ Integrated with frontend development platforms like Netlify and Vercel

Ship serverless applications faster

✅ Fauna combines the flexibility of NoSQL with the relational querying capabilities of SQL systems

✅ Start locally in one region group (i.e. US or EU) or route intelligently from a single endpoint across global region groups

✅ Write business logic in the context of your data with Fauna Query Language (FQL)

Comparison of serverless databases

FaunaMongdoDB AtlasDynamoDBCockroach serverlessFirebasePlanetScale

Connect over HTTP

No cold starts

Multi-region by default

ACID compliant

Document-relational model

FAQs

Does Fauna have a free tier?

Yes - Fauna has a generous free forever tier. Included in the free tier is 100k read ops, 50k write ops, 500k compute ops, and 5 GB of database storage.

Do I have to manage my own database resources?

Fauna is a serverless database - meaning you don’t have to provision, scale, or maintain any database resources or infrastructure. Fauna’s distributed, document-relational model enables you to ship global applications quickly while worrying less about operations.

Does Fauna have any security around data access?

Fauna's attribute-based access control (ABAC) enables you to build a fine-grained strategy for managing identity-based operations within Fauna. ABAC is an extension of traditional RBAC, where roles can define privilages that can be dynamically determined based on any attribute of the actor attempting to access or modify data, any attribute of data to be accessed or modified, or contextual information available during a transaction.

How does Fauna deal with unpredictable workloads with spikes in traffic?

Fauna's serverless delivery model ensures that it is able to handle variable workloads in your read/write requests without you having to manage any infrastructure.

How does Fauna handle a data migration?

You can migrate data to Fauna using Fauna's data import. Export data from your existing database in either CSV or JSON format and upload it using Fauna's import feature through the shell.

How can developers interface with Fauna?

You can create and access your Fauna database's using drivers in JavaScript, Python, Java, Go, and Scala. You can also use Fauna's GraphQL API or interact in Fauna's very own query language - Fauna query language (FQL). What is Fauna's document-relational model?
Fauna's document-relational model combines the flexibility of document NoSQL with the relational querying capabilities and ACID consistency of relational SQL systems. So you can store data as documents in JSON format while maintaining relationships between your documents to perform joins and complex data manipulation with your data.

What can I do with Fauna's query language?

Fauna's query language (FQL) enables you to execute complex business logic as ACID transactions similar to stored procedures in the SQL/relational world. You can also call functions you write in FQL using GraphQL custom resolvers.

What can I do with Fauna's query language?

Fauna's query language (FQL) enables you to execute complex business logic as ACID transactions similar to stored procedures in in SQL/traditional databases . You can also call functions you write in FQL using GraphQL custom resolvers. Running UDFs to run compute close to your data is similar to serverless code you run in the compute tier on AWS lambda.

What is a serverless application?

A serverless application is an application built using serverless technology that enables developers to focus on features and not infrastructure. The serverless ecosystem has grown significantly from FaaS services like AWS Lambda, Azure Functions to web hosting solutions like Vercel, and Netlify to now serverless database solutions like Fauna.

What are Fauna's transactional capabilities?

Fauna has a document-relational, distributed architecture but is still ACID compliant. ACID compliance ensures all transactions, and data, are consistent.

Learn more

Getting started with Fauna is easy! Browse through our resources to better understand how Fauna works.

Fauna documentation

Learn more
Fauna + BNR + Netlify

Building composable serverless architectures with Fauna, Netlify, and Big Nerd Ranch

Learn more
Fauna Serverless Framework AWS

Implementing Fauna as infrastructure as code with Serverless Framework

Learn more
Edge computing

Why Use Fauna with edge computing?

Learn more
Jamstack database

Comparing databases for Vercel and Netlify

Learn more
fauna-vs-dynamoDB

Modernization of the database: DynamoDB to Fauna

Learn more

Hear why our customers love Fauna

Fauna is a "fire and forget" globally distributed database. We've tried them all and only Fauna was truly serverless.

Will Kimbell, CTO/Architect, Connexin

Fauna is a "fire and forget" globally distributed database. We've tried them all and only Fauna was truly serverless.

With Fauna we can scale without impacting our application code and don't have to worry a bout the cost and effort that are required to scale a traditional cloud database.

Kevin Ho, Co-Founder & CEO, Insights.GG

With Fauna we can scale without impacting our application code and don't have to worry a bout the cost and effort that are required to scale a traditional cloud database.

Ready to get started?

Sign up or get in touch with one of our experts and discover why thousands of developers love Fauna.

Start for freeRequest a Demo