Exoscale DBaaS is a database as a service product with a set of data services that can be triggered on demand. It comes with:

  • Managed data engine with high SLA
  • Selection of plans with upscale and downscale possibilities as well as redundancy options
  • Automatic backup policies
  • Lifecycle management

Service availability

3 services are currently available. These services along with their short names are:

  • Managed PostgreSQL: pg
  • Managed Apache Kafka: kafka
  • Managed Redis™: redis

Geographical availability

The Exoscale DBaaS product described in the following guide is available in all current Exoscale zones.

Service level agreement

All plans come with SLA regarding the availability of the data service:

  • all Hobbyist and Startup plans: 99.95%
  • Business and upwards: 99.99%

Known limitations of DBaaS

A number of features are currently unavailable in DBaaS and need to be taken into account while working with it.

CLI/API support and no portal support

Interaction with DBaaS currently happens with the exo CLI utility and API only.

Service integration

Integrating services with one another is not currently possible.

Multi-zone setup and geo-replication

All services are currently supported on a single zone at once and are not geo-replicated across zones.

Forks are however possible across zones, enabling to start a copy of a service from one zone in another location.

Interacting with DBaaS

Prerequisites

To interact with DBaaS you will need the Exoscale CLI >= 1.40. Binaries for all major platforms are available at https://github.com/exoscale/cli/releases/latest

  • Windows
  • Linux
  • MacOS

Or use your usual package upgrade mechanism to retrieve the latest version.

The CLI relies on the API functionality documented at Exoscale APIv2 API documentation

General information about Exoscale DBaaS

Database services are launched on dedicated instances but not directly accessible to the end user or visible in your Compute instance list. The database services are therefore not shared and run on single to several machines specifically deployed for your organization depending on the plan.

The plan naming convention indicates the resources of each single or cluster of instances powering your service:

  • Service type: pg, kafka, redis,...
  • Plan: hobbyist-1, business-32, premium-9x-16

Where:

Hobbyist, startup, business, premium keywords differentiate for each service the redundancy and data protection mechanism used. Refer to the product pages to list the available plans and their specifications.

And the optional first digit indicates for distributed systems the number of nodes in the cluster.

Last 1, 2, 4,...32,...,225 indicates the memory associated with each node in the plan in GB. These are indexed on the existing compute instance types available at Exoscale, so a 32GB is a compute general purpose Huge instance.

For example an Apache Kafka service on a premium-9x-16 plan, is a Kafka cluster with 9 nodes each with 16 GB RAM. The other details regarding storage, backup, number of connections, versions and plugins are available in the tables or documentation to be published.

Bootstrap instructions

Verify the CLI is working properly. This can be achieved by listing the types of DBaaS services available with the command:

exo lab db types list

┼───────────────────┼────────────────┼─────────────────┼
│       NAME        │ LATEST VERSION │ DEFAULT VERSION │
┼───────────────────┼────────────────┼─────────────────┼
│ pg                │ 13.4           │ 13              │
│ redis             │ 6.2.3          │ -               │
│ kafka             │ 2.8.0          │ 2.7             │
┼───────────────────┼────────────────┼─────────────────┼

Then per service you can list the plans available:

exo lab db types show pg

┼─────────────────┼───────────────────────────────────────────────────────────┼
│ Name            │ pg                                                        │
│ Description     │ PostgreSQL - Object-Relational Database Management System │
│ Latest Version  │ 13.3                                                      │
│ Default Version │ 13                                                        │
│ Plans           │                                                           │
│                 │          Name   business-128                              │
│                 │         Nodes              2                              │
│                 │     Node CPUs             16                              │
│                 │   Node Memory         137 GB                              │
│                 │    Disk Space         1.1 TB                              │
│                 │                                                           │
│                 │          Name   business-16                               │
│                 │         Nodes             2                               │
│                 │     Node CPUs             4                               │
│                 │   Node Memory         17 GB                               │
│                 │    Disk Space        376 GB                               │
│                 │                                                           │
│                 │          Name   business-225                              │
│                 │         Nodes              2                              │
│                 │     Node CPUs             24                              │
│                 │   Node Memory         242 GB                              │
│                 │    Disk Space         1.4 TB                              │
│                 │                                                           │
│                 │          Name   business-32                               │
│                 │         Nodes             2                               │
│                 │     Node CPUs             8                               │
│                 │   Node Memory         34 GB                               │
│                 │    Disk Space        537 GB                               │
│                 │                                                           │
│                 │          Name   business-4                                │
│                 │         Nodes            2                                │
│                 │     Node CPUs            2                                │
│                 │   Node Memory       4.3 GB                                │
│                 │    Disk Space        86 GB                                │
│                 │                                                           │
│                 │          Name   business-8                                │
│                 │         Nodes            2                                │
│                 │     Node CPUs            4                                │
│                 │   Node Memory       8.6 GB                                │
│                 │    Disk Space       188 GB                                │
│                 │                                                           │
│                 │          Name   hobbyist-1                                │
│                 │         Nodes            1                                │
│                 │     Node CPUs            2                                │
│                 │   Node Memory       2.1 GB                                │
│                 │    Disk Space       8.6 GB                                │
│                 │                                                           │
│                 │          Name   premium-128                               │
│                 │         Nodes             3                               │
│                 │     Node CPUs            16                               │
│                 │   Node Memory        137 GB                               │
│                 │    Disk Space        1.1 TB                               │
│                 │                                                           │
│                 │          Name   premium-16                                │
│                 │         Nodes            3                                │
│                 │     Node CPUs            4                                │
│                 │   Node Memory        17 GB                                │
│                 │    Disk Space       376 GB                                │
│                 │                                                           │
│                 │          Name   premium-225                               │
│                 │         Nodes             3                               │
│                 │     Node CPUs            24                               │
│                 │   Node Memory        242 GB                               │
│                 │    Disk Space        1.4 TB                               │
│                 │                                                           │
│                 │          Name   premium-32                                │
│                 │         Nodes            3                                │
│                 │     Node CPUs            8                                │
│                 │   Node Memory        34 GB                                │
│                 │    Disk Space       537 GB                                │
│                 │                                                           │
│                 │          Name   premium-4                                 │
│                 │         Nodes           3                                 │
│                 │     Node CPUs           2                                 │
│                 │   Node Memory      4.3 GB                                 │
│                 │    Disk Space       86 GB                                 │
│                 │                                                           │
│                 │          Name   premium-8                                 │
│                 │         Nodes           3                                 │
│                 │     Node CPUs           4                                 │
│                 │   Node Memory      8.6 GB                                 │
│                 │    Disk Space      188 GB                                 │
│                 │                                                           │
│                 │          Name   startup-128                               │
│                 │         Nodes             1                               │
│                 │     Node CPUs            16                               │
│                 │   Node Memory        137 GB                               │
│                 │    Disk Space        1.1 TB                               │
│                 │                                                           │
│                 │          Name   startup-16                                │
│                 │         Nodes            1                                │
│                 │     Node CPUs            4                                │
│                 │   Node Memory        17 GB                                │
│                 │    Disk Space       376 GB                                │
│                 │                                                           │
│                 │          Name   startup-225                               │
│                 │         Nodes             1                               │
│                 │     Node CPUs            24                               │
│                 │   Node Memory        242 GB                               │
│                 │    Disk Space        1.4 TB                               │
│                 │                                                           │
│                 │          Name   startup-32                                │
│                 │         Nodes            1                                │
│                 │     Node CPUs            8                                │
│                 │   Node Memory        34 GB                                │
│                 │    Disk Space       537 GB                                │
│                 │                                                           │
│                 │          Name   startup-4                                 │
│                 │         Nodes           1                                 │
│                 │     Node CPUs           2                                 │
│                 │   Node Memory      4.3 GB                                 │
│                 │    Disk Space       86 GB                                 │
│                 │                                                           │
│                 │          Name   startup-8                                 │
│                 │         Nodes           1                                 │
│                 │     Node CPUs           4                                 │
│                 │   Node Memory      8.6 GB                                 │
│                 │    Disk Space      188 GB                                 │
│                 │                                                           │
┼─────────────────┼───────────────────────────────────────────────────────────┼

Create a first service

The sequence below is shown for service pg but is valid with all DBaaS service types.

To create a first service, use the exo lab db create command. The --help flag will give all the details on the usage, and a minimal command is:

exo lab db create pg hobbyist-1 test-pg -z de-fra-1

PS1: from now on add the -z <zone> flag to manage this db instance

*PS2: your organization is limited to 3 DBaaS by default services in total. Reach out to your Exoscale support if you encounter the message “Usage of resource ‘dbaas’ has been exceeded.” *

Connect and use your DB

To connect to your DB instance you first need to retrieve your credentials:

exo lab db show -u test-pg -z de-fra-1

postgres://avnadmin:sfsdfsdfsdfsdfs\@test-pg-exoscale-08b0165e-ef03-47ec-926f-f01163d557ed.aivencloud.com:21699/defaultdb?sslmode=require

Then check the status of your db instance, it should have changed from rebuilding right after the create command to running

exo lab db show test-acr -z de-fra-1

┼───────────────────────┼───────────────────────────────────────────────┼
│ Name                  │ test-pg                                       │
│ Zone                  │ de-fra-1                                      │
│ Type                  │ pg                                            │
│ Plan                  │ hobbyist-1                                    │
│ Creation Date         │ 2021-07-05 08:38:39 +0000 UTC                 │
│ Nodes                 │ 1                                             │
│ Node CPUs             │ 2                                             │
│ Node Memory           │ 2.1 GB                                        │
│ Update Date           │ 2021-07-05 08:41:32 +0000 UTC                 │
│ Disk Size             │ 8.6 GB                                        │
│ State                 │ running                                       │
│ Termination Protected │ false                                         │
│ Maintenance           │ sunday (10:40:38)                             │
│ Users                 │ avnadmin (primary)                            │
│ Features              │                                               │
│                       │   enhanced_logging                    true    │
│                       │   kafka_connect_service_integration   false   │
│                       │   pgbouncer                           true    │
│                       │   service_integrations                true    │
│                       │                                               │
│ Metadata              │                                               │
│                       │   max_connections                     25      │
│                       │   pg_version                        13.3      │
│                       │   write_block_threshold_exceeded   false      │
│                       │                                               │
┼───────────────────────┼───────────────────────────────────────────────┼

You can now connect to the database engine:

psql postgres://avnadmin:dssdsdsfdsff\@test-acr-exoscale-08b0165e-ef03-47ec-926f-f01163d557ed.aivencloud.com:21699/defaultdb?sslmode=require

psql (13.3)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

defaultdb=> \l
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
 _aiven    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 defaultdb | avnadmin | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
(4 rows)

defaultdb=>

Other commands

In addition to the creation commands listed above, you will find:

  • List: exo lab db list
  • Delete: exo lab db delete test-acr -z de-fra-1

The update command will enable you to adjust parameters of a DB instance.

Enable termination protection
exo lab db update test-pg -z de-fra-1 --termination-protection=true

 ✔ Updating Database Service "test-pg"... 0s
┼───────────────────────┼───────────────────────────────────────────────┼
│ Name                  │ test-pg                                       │
│ Zone                  │ de-fra-1                                      │
│ Type                  │ pg                                            │
│ Plan                  │ hobbyist-1                                    │
│ Creation Date         │ 2021-07-05 08:38:39 +0000 UTC                 │
│ Nodes                 │ 1                                             │
│ Node CPUs             │ 2                                             │
│ Node Memory           │ 2.1 GB                                        │
│ Update Date           │ 2021-07-05 10:05:40 +0000 UTC                 │
│ Disk Size             │ 8.6 GB                                        │
│ State                 │ running                                       │
│ Termination Protected │ true                                          │
│ Maintenance           │ sunday (10:40:38)                             │
│ Users                 │ avnadmin (primary)                            │
│ Features              │                                               │
│                       │   enhanced_logging                    true    │
│                       │   kafka_connect_service_integration   false   │
│                       │   pgbouncer                           true    │
│                       │   service_integrations                true    │
│                       │                                               │
│ Metadata              │                                               │
│                       │   max_connections                     25      │
│                       │   pg_version                        13.3      │
│                       │   write_block_threshold_exceeded   false      │
│                       │                                               │
┼───────────────────────┼───────────────────────────────────────────────┼

It is therefore not possible to delete the instance anymore:

exo lab db delete test-pg -z de-fra-1

[+] Are you sure you want to delete Database Service "test-pg"? [yN]: y
 ✔ Deleting Database Service "test-pg"... 1s
error: Delete "https://api-de-fra-1.exoscale.com/v2.alpha/dbaas-service/test-pg": invalid request: DBaaS permission error

Revert the flag and then delete the DB instance.

Other parameters currently supported:
  • Maintenance day of the week
  • Maintenance time slot