What Is FaunaDB?

01 Introducing Adaptive Scale

FaunaDB is a new type of database—the adaptive operational database.

Scalable, flexible, secure.

FaunaDB is operational, because it serves real-time data at global scale—supporting complex, low-latency workloads. Query transactional, relational, temporal, document, and graph data with a simple DSL in the programming language you already know.

FaunaDB is adaptive, because it lets you change your infrastructure footprint on the fly. Dynamically shift resources to critical applications, elastically add capacity during peak events, and replicate data around the world—all in a unified data fabric.

02 Data Models

FaunaDB's unified data model lets you query your data in any paradigm, from any application language.

  1. Relations

    For applications that require traditional, structured data, FaunaDB supports fully relational modeling. Joins, foreign keys, unique indexes, and other critical correctness features are supported without the complexity and insecurity of SQL.

    ACID compliance guarantees that transactions—even across multiple servers and multiple keys—will be strongly consistent.

  2. Documents

    For less structured data, FaunaDB transparently supports document-style interactions. Create, modify, and delete richly nested records, and build indexes and views across them.

    Records in the same table can contain different fields, and records in different tables can contain the same fields—and even be merged into the same index.

  3. Graphs

    FaunaDB has native support for distributed graphs and graph functions. It excels at storing highly clustered graphs with billions of nodes and edges and serving workloads that are impossible in other systems.

    Relationships can be recursive and polymorphic, can be modified and decorated at any time, and can be modelled with or without foreign keys and join tables—you choose what's best for your application.

  4. Feeds and Snapshots

    FaunaDB lets you convert any query into a change feed: a view of how that query's results have changed within a time window. Combine change feeds with graph data and you can trivially serve complex activity feeds at scale.

    FaunaDB’s historical snapshot queries support auditing, forensics, and provenance analysis, and can show the state of any data at any point in the past.

  • Example Query
    • This JavaScript query returns a change feed of crime watch reports from users in districts in the city of Woodside, excluding the caller's own district.

      It illustrates graph queries, multi-level joins, indexes, and temporality—all at the same time.

      Expressions in other languages are equally simple. This is just a small taste of the power of FaunaDB.


q.Paginate(
  q.Join(
    q.Intersect(
      q.Join(
        q.Difference(
          q.Match(q.Index("districts_by_city"), "Woodside"),
          q.Ref("classes/districts/1")
        ),
        q.Index("users_by_district")
      ),
      q.Match(q.Index("users_by_group"), "Crime Watch")
    ),
    q.Index("reports_by_user")
  ),
  {
    events: true,
    after: q.Date("2017-1-1")
  }
)

FaunaDB can tolerate the loss of a minority of physical datacenters in a cluster without interruption. According to the CAP theorem, FaunaDB is a CP system.

03 Architecture

FaunaDB’s modern distributed architecture brings innovation to every level of the data stack.

  1. FaunaDB lets you seamlessly add capacity to meet demand, and just as easily dial it down when demand subsides. It supports both horizontal and vertical scaling.

    Add capacity by provisioning commodity hardware on-premises or adding inexpensive virtual machines to your private cloud. With our serverless cloud, you don't have to add capacity at all.

    Consistency

    Strong consistency lets you implement applications quickly and correctly. When an application writes to FaunaDB, the cluster uses layered coordination protocols to agree on the state change before the effects are applied, isolating the transaction and preventing partial failure.

    The result is strongly consistent, multi-key transactions and indexes—even across datacenters—with no visible impact on latency.

  2. Temporality

    In FaunaDB, every piece of data has a history. Whenever data is updated or deleted, the existing values are preserved—not overwritten. This is useful for incremental backups and auditing, but also makes it easy to model rich change feeds.

    FaunaDB guarantees that temporal queries are scalable and fast. Configurable retention policies ensure that your data meets storage and compliance requirements.

  3. Scalability

    FaunaDB scales linearly. It supports both horizontal and vertical scalability, enabling you to add capacity on the fly by provisioning commodity machines in your datacenter, or by adding virtual machines to your cloud.

Graph
  1. Availability

    FaunaDB is masterless, self-coordinating, and has no service dependencies or single points of failure. Operational tasks are simple and require only a few commands.

    You can geographically replicate your infrastructure on the fly—across multiple physical datacenters and public clouds.

  2. Performance

    FaunaDB delivers consistent, high performance. Modern techniques like speculative request dispatch, predicate pushdown, and total query parallelization are combined with a low-latency storage engine.

    But it's not just fast, it's predictable: query plans are determistic, optimizations are local, and query performance scales with query complexity, not with the total size of your dataset.

  3. JVM

    FaunaDB is implemented in Scala and Java and runs on any modern operating system, including Linux, Windows, BSD, and OS X.

    It scales down to your laptop and up to your largest server, and runs in any virtualized or container environment. You can operate FaunaDB with standard JVM tools—or use our serverless cloud and don't operate anything at all.

Get the features you need to innovate without tradeoffs.

04 Operations

FaunaDB's operational profile maintains high availability and simplicity at any scale.

  1. Tenancy and QoS

    FaunaDB lets you dynamically assign priority to projects, apps, and workloads—like an operating system—and assigns resources moment-to-moment based on those priorities.

    Your hardware runs at higher levels of utilization, TCO is vastly reduced, and workloads with competing performance profiles—like analytics and user-facing queries—run safely against the same datasets.

  2. Elasticity

    FaunaDB ensures that resources are dynamically provisioned across teams, projects, applications, and workloads as demand spikes and subsides.

    Say goodbye to nerve-wracking product launches and upside risk. When resources are truly exhausted, scale your cluster in minutes, and optimize when things settle down.

  3. Security

    FaunaDB delivers enterprise-grade security by isolating datasets among tenant databases. Databases can be nested, making it simple to delegate administration to other departments and teams.

    If you choose, FaunaDB’s security model can allow untrusted clients like mobile apps and IoT devices to connect directly to the database—no middleware needed.

    In-flight queries are protected by encrypted networking and authentication wherever FaunaDB is deployed.

  4. Microservices

    FaunaDB’s security and isolation features make it ideal for highly diverse microservices environments.

  5. Packaging and Integration

    FaunaDB plays well in enterprise IT organizations. It works with all standard orchestration tools—including container schedulers—and speaks HTTPS on the wire.

    FaunaDB supports a fully relational data model, so existing datasets can be imported without denormalization.

    Change feed queries let you synchronize data in FaunaDB with analytics engines and column stores in real time, or use it like a message bus.

  6. Disaster Recovery

    FaunaDB goes to great lengths to minimize the potential loss in the event of catastrophe. The temporal data model makes transaction history clear—including schema history—and transparently supports incremental, logical backups. Filesystem backups are supported as well.

    Under normal operating conditions, FaunaDB is self-healing. Under disaster scenarios, such as the loss of the majority of datacenters, operators can use FaunaDB’s built-in tools to quickly recover to entirely new infrastructure and get your business back online.

05 Customer Showcase

NVIDIA runs FaunaDB in production datacenters around the globe where it serves tens of millions of users with real-time interactions.

"With FaunaDB, we’re able to support tens of millions of users with a small operational staff and their global replication will help us maintain availability in case of unexpected regional outages. After launch, we optimized our service and cut our cloud service bill significantly."