# Scale a database

You can increase the resources available to a database, including CPU and memory, storage space, and number of replicas. You should [monitor your addon](database-observability-and-monitoring) to identify bottlenecks.

You can also make use of [high-availability strategies](configure-addons-for-high-availability) for many addons, to ensure availability and enable automatic fail-over.

![An addon's resources page in the Northflank application](https://assets.northflank.com/documentation/v1/application/databases-and-persistence/scale-a-database/addon-resources-page.png)

See [Northflank pricing plans](https://northflank.com/pricing) for compute plans available on Northflank's managed cloud, as well as storage and network egress costs.

## Scale compute

You can increase the vCPU and memory dedicated to an addon on the resources page. Some databases have higher requirements than others, meaning lower compute plans will be unavailable for them.

## Scale storage

You can increase the storage space dedicated to a database on the resources page.

You cannot reduce the storage space assigned to a database after increasing it, either manually or automatically.

### Storage warnings

The addon list and header show a warning when volume usage reaches its warning threshold. You need permission to view addon metrics to see these warnings. Missing metrics or a missing warning do not establish that storage space is sufficient.

Open the addon's [volume metrics](https://northflank.com/docs/v1/application/observe/view-metrics) to inspect usage, then increase storage or configure disk auto-resize below. The warning itself does not start a resize or send a notification.

### Configure disk auto-resize

You can enable disk auto-resize on your addon's resources page to automatically increase its storage when the volume reaches a selected usage threshold. Disk auto-resize is available when the underlying storage supports volume expansion.

![Configuring disk auto-resize for an addon in the Northflank application](https://assets.northflank.com/documentation/v1/application/databases-and-persistence/scale-a-database/disk-auto-resize.png)

You can configure the following options:

- Resize threshold: select `75%` or `90%` volume usage. The default threshold is `90%`.

- Set maximum size: optionally limit the storage size that the addon can automatically grow to.

When the volume reaches the selected threshold, Northflank increases it to the next supported storage size. A volume can be automatically resized at most once every six hours and, if you set a maximum size, will not grow beyond it.

Saving the disk auto-resize configuration restarts the addon. Subsequent automatic storage increases do not restart the addon. You will be billed for the increased storage from the time the volume is resized.

## Scale replicas

You can increase the number of replica sets your database will use to improve availability, each replica set contains a copy of the database.

Database replicas can be scaled up from the resources page, but cannot be scaled down. Any increase will be permanent.

## Next steps

- [Upgrade a database: Upgrade your database to a newer version with one click.](/v1/application/databases-and-persistence/upgrade-a-database)
- [Backup, restore, and import your data: Create and import backups of your database, or restore from an existing backup.](/v1/application/databases-and-persistence/backup-restore-and-import-data)
- [Configure addons for high availability: Configure your addons to maximise availability.](/v1/application/databases-and-persistence/configure-addons-for-high-availability)
