Managed database hosting

Give your application a SQL database, document store or persistent key store. Each database has its own deployment slot, data directory and client identity.

Redis connection example
Client identity
client.pem
Server trust
server-ca.pem
redis> PING
PONG
See the TLS client commands

How hosted database deployments work

Choose by the queries your app makes

Use PostgreSQL or MySQL for relational records, MongoDB for document collections and Redis for keys, expirations or streams. Start with the engine your application driver supports, then size the deployment for its data and indexes.

See engine allocations

Connect with a client identity

The owner can download the client identity and server trust file from Connection. Your driver presents the identity and checks the server hostname. A successful query from the application confirms the credentials and the database role together.

See commands for each engine

A volume for each engine

The engine keeps its data through a process restart. Reserve enough disk for growth, temporary files and indexes. Your web app and database can restart independently and draw their resource allocations from the same account.

Allocate a deployment pool

Recovery points by plan

On a node with database snapshots enabled, Backups shows the available recovery points. Pick a point from before the unwanted change and account for later writes when deciding whether to restore.

Read the database recovery procedure

Choose a database engine

Start with the client your application already uses and the data it needs to query. The figures below are minimum allocations for one database. Reserve additional space for records, indexes and temporary writes.

  • MySQL

    Use relational tables for an application built around a MySQL driver and SQL transactions.

    1024 MB RAM · 50% CPU · 2048 MB storage
    Deploy MySQL on Relay
  • PostgreSQL

    Use SQL joins, constraints and indexes with a PostgreSQL client.

    512 MB RAM · 25% CPU · 1024 MB storage
    Deploy PostgreSQL on Relay
  • MongoDB

    Store related fields together in documents and query collections with a MongoDB driver.

    1024 MB RAM · 50% CPU · 2048 MB storage
    Deploy MongoDB on Relay
  • Redis

    Look up keys, expire cached results or append events to a stream.

    256 MB RAM · 25% CPU · 512 MB storage
    Deploy Redis on Spark

Make the first connection

  1. Allocate the database

    Choose an engine and reserve memory, CPU, storage and a slot from your account pool. The image initializes its own directory. Start the database, then open Connection as the deployment owner.

  2. Install the client identity

    Download client.pem and server-ca.pem. The client file contains a private key. Restrict it to your application user and keep it outside the repository. Configure your driver with the hostname and port shown in Connection.

  3. Test with a small query

    Enable TLS and hostname verification. Run SELECT 1 for SQL, list the application collections for MongoDB, or send PING for Redis. Then read a known record with your application’s own client settings.

Read the full deployment guide

Move an existing dataset and verify the cutover

An empty database that answers a connection test is ready to receive your data. Before switching your application, prove that its own driver can read and write the records it depends on.

Open connection and recovery instructions
  1. Choose a representative record

    Record a primary key, document ID or Redis key from the source database, along with the value you expect. Check the engine versions and choose an export and import format supported by both. Estimate space for records and indexes.

  2. Import and test from the app

    Use a separate target deployment and its TLS credentials. Import a copy, compare table or collection counts where applicable and read your known record with the real application driver. Test a disposable write using the application role.

  3. Switch while writes are paused

    Stop writers, transfer any final changes and verify the record again. Update the application’s endpoint and identity, restart it and confirm a new write reaches the target. Keep the source or final export until you have checked the result.

Database plans

Each database uses one deployment and shares the memory, CPU and storage in your account. Redis fits the Spark free plan. PostgreSQL, MySQL and MongoDB require a larger plan.

PlanMemoryStorageCPUDeploymentsDatabase backupHistoryPer month
Spark256 MB512 MB25%1Every hour24 hours$0.00
Relay1 GB5 GB50%2Every 15 minutes3 days$2.25
Circuit2 GB8 GB100%4Every 15 minutes7 days$3.25
Grid4 GB15 GB200%8Every 15 minutes14 days$6.00
Fleet8 GB25 GB250%12Every 15 minutes30 days$9.00
Spark1 deployment$0.00
Memory
256 MB
Storage
512 MB
CPU
25%
Deployments
1
Database backup
Every hour
History
24 hours
Compare Spark
Relay2 deployments$2.25
Memory
1 GB
Storage
5 GB
CPU
50%
Deployments
2
Database backup
Every 15 minutes
History
3 days
Compare Relay
Circuit4 deployments$3.25
Memory
2 GB
Storage
8 GB
CPU
100%
Deployments
4
Database backup
Every 15 minutes
History
7 days
Compare Circuit
Grid8 deployments$6.00
Memory
4 GB
Storage
15 GB
CPU
200%
Deployments
8
Database backup
Every 15 minutes
History
14 days
Compare Grid
Fleet12 deployments$9.00
Memory
8 GB
Storage
25 GB
CPU
250%
Deployments
12
Database backup
Every 15 minutes
History
30 days
Compare Fleet

Prices in USD before tax. A year costs the same as ten monthly payments.

Compare all plan features
Which databases fit the free plan?

Redis fits a complete Spark allocation on a host with database support enabled. MySQL, PostgreSQL and MongoDB have higher minimums. A Redis deployment on Spark uses the account’s only slot, so an app hosted alongside it needs a larger pool.

Does a backup of my bot also back up its separate database?

The two deployments have separate data. Check recovery points on the database itself. A file backup of a bot can preserve its local files, while database records need a recovery point or an engine-appropriate export.

Why does my client reject the certificate?

Use the database hostname and assigned port from Connection. Configure the trust file for this database and present its client identity. A website URL, raw IP address or certificate from another deployment can fail hostname or identity verification.

How do I replace a client identity?

Stop the database and wait for Offline. Rotate the client identity in Connection, download its replacement, restart and update every application that connects.

What should I verify after restoring a backup?

Restore to the same engine major version. Refresh the server certificate from Connection if the server identity changed. Read a known application record before sending normal traffic to the restored deployment.