Skip to content

Update MPG docs for soft launch #2005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 49 additions & 21 deletions mpg/overview.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
toc: false
---

<div class="important icon">Managed Postgres is currently in Technical Preview. To request access, please contact <a href="mailto:beta@Fly.io">[email protected]</a></div>
<div class="important icon">Managed Postgres is currently in Technical Preview. This means it's suitable for production workloads, but could be subject to unplanned maintenance or unexpected hiccups. Contact Fly.io support if you're having issues.</div>

<figure class="flex justify-center">
<img src="/static/images/Managed_Postgres.png" alt="Illustration by Annie Ruygt of a balloon doing a lot of tasks" class="max-w-lg">
Expand All @@ -15,24 +15,31 @@

Fly.io's Managed Postgres is our database-as-a-service offering where we handle:

- Automatic backups and point-in-time recovery (coming soon)
- High availability and failover
- Security patches and version upgrades
- Performance monitoring
- Automatic backups and recovery
- High availability with automatic failover
- Performance monitoring and metrics
- Resource scaling (CPU, RAM, storage)
- 24/7 support and incident response
- Automatic encryption of data at rest and in transit

### What's included

If you're enrolled in the Technical Preview, you'll be able to access:
You'll be able to access:

- A highly-available Postgres cluster within your Fly.io organization's [private network](/docs/networking/private-networking/)
- A single database on that cluster
- Fly.io Support Portal to log tickets and get help
- The `pgvector` extension for vector similarity search

### What's not there yet

At the moment, backups are still under development and we haven't opened up access to them just yet. You also can't currently create more databases or schemas on a cluster (though you can create more clusters). You won't yet be able to add Postgres extensions, either.
At the moment, the following features are under development:

- Security patches and version upgrades
- Multiple databases or schemas per cluster
- Postgres extensions besides `pgvector`
- Customer-facing monitoring and alerting
- Database migration tools

We're working on expanding these capabilities and will provide updates as they become available.

Expand All @@ -42,10 +49,13 @@

You'll be prompted to choose:

- Cluster name
- Region
- A plan with predefined hardware resources (CPU, Memory)
- Storage size
- Cluster name (must be unique within your organization)
- Region (see available regions below)
- A plan with predefined hardware resources:
- Launch: 2 vCPUs, 4GB RAM
- Performance: 4 vCPUs, 8GB RAM
- Enterprise: 8 vCPUs, 16GB RAM
- Storage size (up to 500GB at creation)

<div>
<img src="/static/images/create-mpg.webp" alt="A screenshot of the Managed Postgres creation page.">
Expand All @@ -55,14 +65,16 @@

To connect your Fly.io application to your Managed Postgres instance:

- After creation, the "Connection" tab will display your connection string
- Set it as a secret in your Fly.io application:
1. After creation, the "Connection" tab will display your connection string
2. Set it as a secret in your Fly.io application:

```cmd
fly secrets set DATABASE_URL="postgres://username:password@host:port/database"
```

- Your application can now use the `DATABASE_URL` environment variable to connect
3. Your application can now use the `DATABASE_URL` environment variable to connect

For security, the connection string uses SSL by default. Make sure your application's Postgres client is configured to use SSL.

## Using flyctl with Managed Postgres

Expand All @@ -76,7 +88,7 @@
fly mpg connect [flags]
```

This command will establish a direct connection to your database using the psql client.
This command will establish a direct connection to your database using the psql client. You'll need psql installed locally.

### Setting up a Proxy Connection

Expand All @@ -86,20 +98,36 @@
fly mpg proxy [flags]
```

This command is useful when you want to connect to your database from your local machine using tools other than psql.
This command is useful when you want to connect to your database from your local machine using tools other than psql, such as database management tools or your application in development.

## Regions

The current regions available for deploying Fly.io Managed Postgres are fra, gru, iad, lax, ord, and syd. We'll be rolling out more regions as soon as we can.
The current regions available for deploying Fly.io Managed Postgres are:

- `fra` - Frankfurt, Germany
- `gru` - São Paulo, Brazil

Check warning on line 108 in mpg/overview.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Fly.Spelling] Is 'Paulo' a typo? Raw Output: {"message": "[Fly.Spelling] Is 'Paulo' a typo?", "location": {"path": "mpg/overview.html.md", "range": {"start": {"line": 108, "column": 15}}}, "severity": "INFO"}
- `iad` - Ashburn, USA
- `lax` - Los Angeles, USA
- `ord` - Chicago, USA
- `syd` - Sydney, Australia

We'll be rolling out more regions as soon as we can. Choose a region close to your application for optimal performance.

## Database Storage

Our Managed Postgres comes with an auto-grow disk, so you don't have to worry about manually scaling your storage. Storage grows automatically with your data, with an upper limit of **1 TB**. When you create a cluster, the maximum storage size you can set is **500 GB**.
Managed Postgres storage features:

- Maximum storage limit: 1 TB
- Initial storage size: Up to 500 GB at creation
- Storage is replicated across all nodes in your cluster
- Storage growth is monitored and managed automatically

## Pricing

Currently, everyone with access to the Technical Preview has been given credits sufficient for two full months' worth of use of the "Launch" plan ($282/month).
The price of running Fly.io Managed Postgres depends on:

The price of running Fly.io Managed Postgres depends on the CPU/Memory configuration you choose and the region in which you're deploying.
- CPU/Memory configuration (Launch, Performance, or Enterprise plans)
- Region in which you're deploying
- Storage usage

Database storage is priced at **$0.30 per GB for a 30-day month**, with each node (primary + replica) incurring its own cost.
Database storage is priced at **$0.30 per GB for a 30-day month**, with each node (primary + replica) incurring its own cost. You can view detailed pricing in your Fly.io dashboard.
Loading