Fly.io

Fauna is a distributed relational database with a document data model and delivered as an API. Databases created in Fauna get three geographically distributed replicas with active-active writes and ACID compliance, making Fauna a powerful complement to Fly.io in serving low-latency reads and writes for dynamic global applications.

Fauna and Fly.io make for a great combination when building low-latency, dynamic, global applications.

Starter kit

Fauna provides starter kits to help you quickly launch an application on Fly.io, using Fauna as the database backend.

Region Groups

A Fauna Region Group refers to the locality footprint where the replicas are located and allows you to control where your data resides, making it possible to comply with data locality legislation, such as the General Data Protection Regulation (GDPR).

When you create a database in Fauna, you choose which Region Group you want the database created in. When you query the database, your request is routed to the closest replica in the Region Group based on latency. This capability comes out-of-the-box without any special configuration or deployment strategy.

Scale your deployment to match the Fauna footprint

Currently, Fauna provides two choices of Regions Groups, US and EU. The following table lists the Fly.io regions that are closest to the Fauna replicas of each Region Group:

Fauna Region Group Deploy on Fly Regions

EU

lhr, arn, fra

US

sjc, ord, iad

To take full advantage of the Fauna distributed footprint, you should also deploy your application on three Fly.io regions and as close as possible to the replicas for the Region Groups. For example, if your database is in the US region group, scale up or set your Fly.io regions using these commands:

fly regions set sjc ord iad
fly scale count 3 --max-per-region=1

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!