Configuring Auto-suspend for Neon computes
Learn how to configure Neon's Auto-suspend feature to control when your compute scales to zero
Neon's Auto-suspend feature controls when a Neon compute instance transitions to an
Idle state (scales to zero) due to inactivity. This guide demonstrates how to configure the Auto-suspend setting in your Neon project.
You can configure the Auto-suspend setting in an existing project by editing a compute endpoint. You can also configure it when you first create a Neon project, which sets the Auto-suspend default for the project. Both methods are described below.
Configure Auto-suspend for a compute endpoint
Neon Pro plan users can edit an individual compute endpoint to adjust the Auto-suspend configuration.
To edit a compute endpoint:
In the Neon Console, select Branches.
Select a branch.
Click the compute endpoint kebab menu, and select Edit.
Under Compute size, enter the desired Auto-suspend delay setting. The value is specified in seconds. The maximum setting is
604800seconds (7 days). A value of
0is equivalent to the global default value of
300seconds (5 minutes). A value of
-1turns off the Auto-suspend feature, which means that the compute remains active.
You can configure Autoscaling settings for your compute endpoint at the same time. For more information, see Enable Autoscaling in Neon.
Set the Auto-suspend default when creating a project
A project is a top-level object in the Neon object hierarchy. You can think of it as a container for all other objects, including branches and compute endpoints.
Enabling Auto-suspend when you create a project allows you to set the Auto-suspend default setting for all compute endpoints created in your project. You can adjust Auto-suspend setting for individual compute endpoints afterward, but setting a default when creating a project saves you from having to configure this setting for each compute later on.
To configure the Auto-suspend default setting at project creation time:
Navigate to the Neon Console.
If you are creating your very first project, click Create a project. Otherwise, click New Project.
Specify a name, a Postgres version, and a region.
Under Compute size, enter the desired Auto-suspend delay setting.
You can configure default Autoscaling settings at the same time. For more information, see Enable Autoscaling in Neon.
Click Create Project. Your initial compute endpoint is created with the specified setting. All compute endpoints created in the future when creating a branch or adding a compute endpoint to a branch are created with this setting.
Monitor compute status
You can monitor compute status on the Branches page in the Neon Console. A compute reports either an Active or Idle status.
You can also view compute state transitions in the Branches widget on the Neon Dashboard.
You can try any of these methods and watch the status of your compute as it transitions from an Idle to an Active state.