Skip to content

Commit

Permalink
docs: more compute size updates
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltprice committed Dec 12, 2024
1 parent 55171ad commit 7a5d67f
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 79 deletions.
25 changes: 8 additions & 17 deletions content/docs/guides/autoscaling-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ To edit a compute:

1. In the Neon Console, select **Branches**.
1. Select a branch.
1. On the **Compute** tab, identify the compute you want to configure and click **Edit**.
1. On the **Computes** tab, identify the compute you want to configure and click **Edit**.
![Edit compute menu](/docs/guides/autoscaling_edit.png)
1. On the **Edit compute** settings drawer, toggle **Enable autoscaling** to enable it and use the slider to specify a minimum and maximum compute size.
![Autoscaling edit settings](/docs/introduction/autoscaling_config.png)
1. On the **Edit compute** drawer, select **Autoscale** and use the slider to specify a minimum and maximum compute size.

Neon scales the compute size up and down within the specified range to meet workload demand. Autoscaling currently supports a range of 1/4 (.25) to 16 vCPUs. One vCPU has 4 GB of RAM, 2 vCPUs have 8 GB of RAM, and so on. The amount of RAM in GB is always 4 times the number of vCPUs. For an overview of available compute sizes, see [Compute size and autoscaling configuration](/docs/manage/endpoints#compute-size-and-autoscaling-configuration). The maximum autoscaling setting cannot be more than 8 times the minimum setting when your maximum compute size is greater than 10.
Neon scales the compute size up and down within the specified range to meet workload demand. Autoscaling currently supports a range of 1/4 (.25) to 16 vCPUs. One vCPU has 4 GB of RAM, 2 vCPUs have 8 GB of RAM, and so on. The amount of RAM in GB is always 4 times the number of vCPUs. For an overview of available compute sizes, see [Compute size and autoscaling configuration](/docs/manage/endpoints#compute-size-and-autoscaling-configuration). Please note that when the autoscaling maximum is > 10, the autoscaling minimum must be ≥ (max / 8).

<Admonition type="note">
You can configure the scale to zero setting for your compute at the same time. The scale to zero setting defines the period of inactivity after which a compute is automatically suspended. For more, see [Scale to Zero](/docs/introduction/scale-to-zero).
Expand All @@ -56,31 +55,23 @@ To configure autoscaling defaults:
1. Navigate to your Project Dashboard and select **Settings** from the sidebar.
2. Select **Compute**.
3. Select **Change** to open the **Change default compute settings** modal.
![Edit autoscaling defaults](/docs/guides/autoscaling_defaults.png)
4. Use the slider to specify a minimum and maximum compute size and **Save** your changes.

The next time you create a compute, these settings will be applied to it.

## Monitor autoscaling

From the Neon Console, you can view how your vCPU and RAM usage scales over time (last hour, day, and week). From the **Branches** page, open the branch you want to inspect, then open the **Edit** modal for its compute.
From the Neon Console, you can view how your vCPU and RAM usage have scaled for the past 24 hours. On the **Project Dashboard** page, navigate down the page to the **Monitoring** section.

![autoscaling graph example](/docs/guides/autoscaling_graphs_sample.png 'no-border')
Some key points about this Autoscaling graph:

Some key points about this Autoscaling view:

- Allocation refers to the vCPU and memory size provisioned to handle current demand; autoscaling automatically adjusts this allocation, increasing or decreasing the allocated vCPU and memory size in a step-wise fashion as demand fluctuates, within your minimum and maximum limits.
- Your minimum and maximum limits are shown as solid horizontal lines. This represents the allocation boundary: the size of your allocated vCPU/memory stays within this range so long as your compute remains active. It scales to zero after the defined period of inactivity.
- **Allocated** refers to the vCPU and memory size provisioned to handle current demand; autoscaling automatically adjusts this allocation, increasing or decreasing the allocated vCPU and memory size in a step-wise fashion as demand fluctuates, within your minimum and maximum limits.
- **VCPU Usage** is represented by the green line
- **RAM usage** is represented by the blue line.
- A re-activated compute scales up immediately to your minimum allocation, ensuring adequate performance for your anticipated demand.

Place your cursor anywhere in the graph to get more usage detail about that particular point in time.

![autoscaling graph detail](/docs/guides/autoscaling_graph_detail.png 'no-border')

<Admonition type="note">
To refresh the graph, close the **Edit compute settings** drawer and reopen it.
</Admonition>

See below for some rules of thumb on actions you might want to take based on trends you see in this view.

### Start with a good minimum
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/branch-promote.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The procedure described below creates a new branch and promotes it to the defaul
The following information is required to perform the procedure:

- A Neon API key. For information about obtaining an API key, see [Create an API key](/docs/manage/api-keys#create-an-api-key).
- The `project_id` for your Neon project. You can obtain a `project_id` using the [List projects](https://api-docs.neon.tech/reference/listprojects) method, or you can find it on your project's **Project settings** page in the Neon Console.
- The `project_id` for your Neon project. You can obtain a `project_id` using the [List projects](https://api-docs.neon.tech/reference/listprojects) method, or you can find it on your project's **Settings** page in the Neon Console.
- The `branch_id` of the current default branch. You can obtain a `branch_id` using the [List branches](https://api-docs.neon.tech/reference/listprojectbranches) method, or you can find it on the your project's **Branches** page in the Neon Console. A `branch_id` has a `br-` prefix.
- The `endpoint_id` of the compute associated with the current default branch. You can obtain an `endpoint_id` using the [List endpoints](https://api-docs.neon.tech/reference/listprojectendpoints) method, or you can find it on the **Branches** page in the Neon Console. An `endpoint_id` has an `ep-` prefix.

Expand Down
6 changes: 3 additions & 3 deletions content/docs/guides/branching-neon-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ curl 'https://console.neon.tech/api/v2/projects/<project_id>/branches' \
}' | jq
```

- The `project_id` for a Neon project is found on the **Project settings** page in the Neon Console, or you can find it by listing the projects for your Neon account using the Neon API. It is a generated value that looks something like this: `autumn-disk-484331`.
- The `project_id` for a Neon project is found on the **Settings** page in the Neon Console, or you can find it by listing the projects for your Neon account using the Neon API. It is a generated value that looks something like this: `autumn-disk-484331`.
- The `endpoints` attribute creates a compute, which is required to connect to the branch. Neon supports `read_write` and `read_only` compute types. A branch can be created with or without a compute. You can specify `read_only` to create a [read replica](/docs/guides/read-replica-guide).
- The `branch` attribute specifies the parent branch.
- The `parent_id` can be obtained by listing the branches for your project. See [List branches](#list-branches-with-the-api). The `parent_id` is the `id` of the branch you are branching from. A branch `id` has a `br-` prefix. You can branch from your Neon project's default branch or a non-default branch.
Expand Down Expand Up @@ -135,7 +135,7 @@ curl 'https://console.neon.tech/api/v2/projects/autumn-disk-484331/branches' \
-H "Authorization: Bearer $NEON_API_KEY" | jq
```

The `project_id` for a Neon project is found on the **Project settings** page in the Neon Console, or you can find it by listing the projects for your Neon account using the Neon API.
The `project_id` for a Neon project is found on the **Settings** page in the Neon Console, or you can find it by listing the projects for your Neon account using the Neon API.

The response lists the project's default branch and any child branches. The name of the default branch in this example is `main`.

Expand Down Expand Up @@ -186,7 +186,7 @@ curl -X 'DELETE' \
-H "Authorization: Bearer $NEON_API_KEY" | jq
```

- The `project_id` for a Neon project is found on the **Project settings** page in the Neon Console, or you can find it by listing the projects for your Neon account using the Neon API.
- The `project_id` for a Neon project is found on the **Settings** page in the Neon Console, or you can find it by listing the projects for your Neon account using the Neon API.
- The `branch_id` can be found by listing the branches for your project. The `<branch_id>` is the `id` of a branch. A branch `id` has a `br-` prefix. See [List branches](#list-branches-with-the-api).

The response shows information about the branch being deleted and the `suspend_compute` and `delete_timeline` operations that were initiated.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/logical-replication-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In Neon, you can enable logical replication from the Neon Console. This only nec
To enable logical replication:

1. Select your project in the Neon Console.
2. On the Neon **Dashboard**, select **Project settings**.
2. On the Neon **Dashboard**, select **Settings**.
3. Select **Replication**.
4. Click **Enable**.

Expand Down
4 changes: 2 additions & 2 deletions content/docs/guides/logical-replication-estuary-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Enabling logical replication modifies the Postgres `wal_level` configuration par
To enable logical replication in Neon:

1. Select your project in the Neon Console.
2. On the Neon **Dashboard**, select **Project settings**.
3. Select **Beta**.
2. On the Neon **Dashboard**, select **Settings**.
3. Select **Logical Replication**.
4. Click **Enable** to enable logical replication.

You can verify that logical replication is enabled by running the following query from the [Neon SQL Editor](https://docs.neon.tech/docs/query-with-neon-sql-editor):
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/neon-authorize-firebase-gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You'll need two pieces of information:
2. **Project ID** - This serves as your JWT Audience value:

- Go to the [Firebase Console](https://console.firebase.google.com)
- Navigate to **Project settings** > **General** > **Project ID**
- Navigate to **Settings** > **General** > **Project ID**

<Admonition type="note" title="Note">
Every GCP Identity Platform project automatically creates a corresponding Firebase project, which is why we use the Firebase Console to get the Project ID.
Expand Down
5 changes: 2 additions & 3 deletions content/docs/guides/protected-branches.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ To configure an allowlist:

1. Select a project in the Neon Console.
2. On the Project Dashboard, select **Settings**.
3. Select **IP Allow**.
![IP Allow configuration](/docs/manage/ip_allow.png)
4. Specify the IP addresses you want to permit. Separate multiple entries with commas.
3. Select **Network Security**.
4. Under **IP Allow**, specify the IP addresses you want to permit. Separate multiple entries with commas.
5. Click **Save changes**.

</TabItem>
Expand Down
32 changes: 9 additions & 23 deletions content/docs/guides/scale-to-zero-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,28 @@ The scale to zero limits differ by [Neon plan](/docs/introduction/plans). The li
| Business | 1 minute to 7 days | &check; |
| Enterprise | 0 seconds up to 7 days | &check; |

### Configure the scale to zero setting for a new project

Configuring the scale to zero setting for a new project sets the project's default, which is applied to all computes created from that point forward. You can adjust this scale to zero default at any time, or configure the setting for individual computes later, as necessary.
## Configure scale to zero for a compute

To configure the scale to zero default setting when you first create your project:
To configure the scale to zero setting for an individual compute:

1. Navigate to the [Neon Console](https://console.neon.tech).
1. If you are creating your very first project, click **Create a project**. Otherwise, click **New Project**.
1. Specify a name, a Postgres version, and a region.
1. Under **Compute size**, configure your scale to zero setting.
1. In the Neon Console, select **Branches**.
1. Select a branch.
1. On the **Computes** tab, click **Edit**.
1. Specify your scale to zero setting. The maximum setting is 7 days.
1. Click **Save**.
1. Click **Create Project**. Your initial compute is created with the specified setting.

### Configure the scale to zero setting for an existing project
### Configure the scale to zero default

Configuring the scale to zero setting for an existing project sets the project's default, which is applied to all computes created from that point forward. Existing computes are unaffected. You can adjust the scale to zero default or configure the setting for individual computes later, as necessary.
Configuring the scale to zero setting in your project's settings sets the project's default, which is applied to all computes created from that point forward. Existing compute scale to zero settings are unaffected.

To configure the scale to zero default for an existing project:

1. Select a project in the Neon Console.
1. On the Neon **Dashboard**, select **Project settings**.
1. On the Neon **Dashboard**, select **Settings**.
1. Select **Compute** and click **Change**.
1. Specify your scale to zero setting.
1. Click **Save**.

## Configure scale to zero for a compute

To configure the scale to zero setting for an individual compute:

1. In the Neon Console, select **Branches**.
1. Select a branch.
1. Click the menu in the **Computes** table, and select **Edit**.
![Edit compute menu](/docs/guides/autoscaling_edit.png)
1. Under **Compute size**, specify your scale to zero setting. The maximum setting is 7 days.
1. Click **Save**.

## Monitor scale to zero

You can monitor scale to zero on the **Branches** page in the Neon Console. A compute reports either an **Active** or **Idle** status.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/schema-diff-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ First, create a new database called `people` on the `main` branch and add some s
neon set-context --project-id empty-glade-66712572
```

You can find your project ID on the **Project settings** page in the Neon Console.
You can find your project ID on the **Settings** page in the Neon Console.

</Admonition>

Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/stepzen.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ configurationset:
uri: YOUR_NEON_DSN?user=YOUR_NEON_USERNAME&password=YOUR_NEON_PASSWORD&options=project=YOUR_NEON_PROJECT_ID&sslmode=require
```

As shown above, you need to append `&options=project=YOUR_NEON_PROJECT_ID` to the `uri` connection string. This is needed to establish a secure connection to the Neon database. The `project` option is the ID of the project in Neon. You can find the project ID in the Neon Console under **Project settings** or in the URL of your project.
As shown above, you need to append `&options=project=YOUR_NEON_PROJECT_ID` to the `uri` connection string. This is needed to establish a secure connection to the Neon database. The `project` option is the ID of the project in Neon. You can find the project ID in the Neon Console under **Settings** or in the URL of your project.

The next section explores the GraphQL API to see how the connection between the Neon Postgres database and StepZen works.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/introduction/autoscaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Neon's Autoscaling feature offers the following benefits:

## Configuring autoscaling

You can enable autoscaling for any compute instance, whether it's a primary compute or a read replica. Simply open **Edit compute settings** ([learn how](/docs/guides/autoscaling-guide)) for your compute and set the autoscaling range. This range defines the minimum and maximum compute sizes within which your compute will automatically scale. For example, you might set the minimum to 2 vCPUs with 8 GB of RAM and the maximum to 8 vCPUs with 32 GB of RAM. Your compute resources will dynamically adjust within these limits, never dropping below the minimum or exceeding the maximum, regardless of demand. We recommend regularly [monitoring](/docs/introduction/monitoring-page) your usage from the **Monitoring Dashboard** to determine if adjustments to this range are needed.
You can enable autoscaling for any compute instance, whether it's a primary compute or a read replica. Simply open the **Edit compute** drawer ([learn how](/docs/guides/autoscaling-guide)) for your compute and set the autoscaling range. This range defines the minimum and maximum compute sizes within which your compute will automatically scale. For example, you might set the minimum to 2 vCPUs with 8 GB of RAM and the maximum to 8 vCPUs with 32 GB of RAM. Your compute resources will dynamically adjust within these limits, never dropping below the minimum or exceeding the maximum, regardless of demand. We recommend regularly [monitoring](/docs/introduction/monitoring-page) your usage from the **Monitoring Dashboard** to determine if adjustments to this range are needed.

![autoscaling configuration](/docs/introduction/autoscaling_config.png)

Expand Down
2 changes: 1 addition & 1 deletion content/docs/introduction/point-in-time-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Neon retains a history of changes for all branches. This shared history provides

By default, Neon's history retention window is set to **1 day** across all plans to help you avoid unexpected storage costs. Increasing your retention window gives you a better range for your reset and restore operations, but it can also increase storage costs. The history retention limit is up to 24 hours for [Neon Free Plan](/docs/introduction/plans#free-plan) users, 7 days for [Launch](/docs/introduction/plans#launch), 14 days for [Scale](/docs/introduction/plans#scale), and 30 days for [Business](/docs/introduction/plans#business) plan users.

You can configure the **History retention** setting in the Neon Console, under **Project settings** > **Storage**. For further instructions, see [Configure history retention](/docs/manage/projects#configure-history-retention).
You can configure the **History retention** setting in the Neon Console, under **Settings** > **Storage**. For further instructions, see [Configure history retention](/docs/manage/projects#configure-history-retention).
![History retention configuration](/docs/relnotes/history_retention.png)

Increasing the history retention period affects all branches in your Neon project and increases [project storage](/docs/introduction/usage-metrics#storage). You can scale **History retention** down to zero if reducing storage cost is more important than the ability to restore your data to a past state.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/introduction/regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ After you select a region for a Neon project, it cannot be changed for that proj

A NAT gateway has a public IP address that external systems see when private resources initiate outbound connections. Neon uses 3 to 6 IP addresses per region for this outbound communication, corresponding to each availability zone in the region. To ensure proper connectivity for setups such as replicating data to Neon, you should allow access to all the NAT gateway IP addresses associated with your Neon project's region.

If you are unsure of your project's region, you can find this information in the **Project settings** widget on the **Project Dashboard**.
If you are unsure of your project's region, you can find this information in the **Settings** widget on the **Project Dashboard**.

### AWS NAT Gateway IP Addresses

Expand Down
Loading

0 comments on commit 7a5d67f

Please sign in to comment.