NavigationContentFooter
Jump toSuggest an edit

Serverless SQL Databases overview

Reviewed on 08 February 2024Published on 04 August 2023

Scaleway Serverless SQL Databases are fully managed databases that automatically scale both in storage and compute according to your workloads.

Idle state

After receiving no query for 5 minutes, a Serverless SQL Database will enter into an idle state. It switches from Running to Ready to use, even if your client applications are still connected.

While your database is in an idle state, you will not be billed for compute resources (vCPU and RAM). You will however still be billed for storage resources.

Note

All query processing must be finished to switch a database to an idle state. For example, a long-running transaction (such as updating millions of rows) taking one minute will delay switching to an idle state by one minute.

Technical specifications

SpecificationMinimumMaximum
vCPU0 vCPU15 vCPU
RAM0 GB60 GB (4 GB/vCPU)
Storage*0 GB100 GB (1 TB planned after General Availability)
Connections**01000

* The maximum storage capacity will increase with upcoming releases.

** The number of maximum connections scales with the allocated vCPUs and RAM, and will increase with upcoming releases.

Autoscaling

Autoscaling is triggered automatically, based on your database vCPU consumption:

  • Scaling up: after using more than 90% of the currently allocated vCPU for 10 seconds, the vCPU and RAM allocated to your database will increase by 25% (rounded up to the nearest vCPU integer value), up to a maximum of 15 vCPUs and 60 GB RAM.

  • Scaling down: after using less than 70% of the currently allocated vCPU for 10 seconds, the vCPU and RAM allocated to your database will decrease by 25% (rounded down to the nearest vCPU integer value), down to a minimum of 1 vCPU and 4 GB RAM while your database is active.

Note

Scaling (up or down) operations happens at most once every minute. Moreover, for low vCPU values, scale-down operations happen only if the current workload can be absorbed by the nearest vCPU integer value rounded down. For instance, a database with 2 vCPUs consuming only 1.2 vCPU on average (60% of provisioned vCPU) will not scale down to 1 vCPU as the current load could not be absorbed.

Automatic scaling operations may need to happen between atomic transactions. For example, a long-running transaction (such as updating millions of rows) taking one minute may delay the next scaling operation by one minute. The next transaction performed will, however, benefit from the upscaled/downscaled database performance. For optimal autoscaling reactivity and performance, we recommend you limit each transaction duration to a few seconds at most.

Compatibility

Serverless SQL Database is compatible with most PostgreSQL-compatible clients and tools. Due to connection pooling support, some minor features relying on PostgreSQL sessions and temporary data storage are disabled or may not work as expected. Check out the known differences documentation.

If you require strict compatibility with all PostgreSQL features, you can use Managed Databases for PostgreSQL instead.

Authentication and access management

Authentication and access management are handled directly through Scaleway IAM so that you can easily manage all your users and applications accesses in a single place. Refer to How to connect to a Serverless SQL Database for more information.

Configuration requiring manual actions

To avoid any impact on your applications, some actions will require manual actions from you:

  • Major version upgrades (e.g. PostgreSQL 14 -> PostgreSQL 15): New PostgreSQL major versions may introduce client-side incompatibilities. To avoid any application downtime, make sure your application code is compatible with the major version you are upgrading to.

  • Restoring backups: Restoring a backup to your current database will overwrite all current data with the data stored when the backup was performed. If you want to keep your current data, either perform a manual backup of your current database before restoring, or restore your backup to another Serverless SQL Database.

Note

You can automate these actions using APIs, CLI tools or Terraform.

Actions not managed by Scaleway

Serverless SQL Databases do not automatically handle database usage and optimizations related to your specific data model. You can assess query performance using any PostgreSQL client or tool, or our integrated SQL editor, using EXPLAIN and ANALYZE commands.

The following actions must be performed by you directly:

  • Index creation or rebuild: you are responsible for creating and managing indexes.

  • Query and data model optimization: you are responsible for changing database table structure or queries to optimize performance or storage size.

  • Manual Backups: Scaleway currently does not support manual backups of your Serverless SQL Databases. You can perform manual backups via SQL queries or with an SQL administration tool, such as pgAdmin.

Technical Limitations

  • SQL request size is limited to 512 KB. A single SQL query sent to a Serverless SQL Database cannot exceed 512 KB, but the response to the query is not limited and results tables can exceed 512 KB.

  • The total size of prepared statements is limited to 512 KB per client connection. Refer to the official PostgreSQ documentation for more information on prepared statements.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway