diff --git a/content/300-accelerate/200-getting-started.mdx b/content/300-accelerate/200-getting-started.mdx index 564e2390aa..6a6d53fd43 100644 --- a/content/300-accelerate/200-getting-started.mdx +++ b/content/300-accelerate/200-getting-started.mdx @@ -18,11 +18,11 @@ To get started with Accelerate, you will need the following: Navigate to your Prisma Data Platform project, choose an environment, and enable Accelerate by providing your database connection string and selecting the region nearest your database. - +:::note -If you require IP allowlisting or firewall configurations with trusted IP addresses, enable Static IP for enhanced security +If you require IP allowlisting or firewall configurations with trusted IP addresses, enable Static IP for enhanced security. Learn more on [how to enable static IP for Accelerate in the Platform Console](/accelerate/static-ip). - +::: ## 2. Add Accelerate to your application diff --git a/content/300-accelerate/350-static-ip.mdx b/content/300-accelerate/350-static-ip.mdx new file mode 100644 index 0000000000..8744d26ff8 --- /dev/null +++ b/content/300-accelerate/350-static-ip.mdx @@ -0,0 +1,56 @@ +--- +title: "Static IP" +metaTitle: "Enable Static IP for Prisma Accelerate" +metaDescription: "Learn enabling Static IP for Prisma Accelerate." +--- + +You can enable static IP for Accelerate when your security setup requires IP allowlisting or if you're implementing firewalls that only permit access from trusted IPs, ensuring controlled and secure database connections. + +![Result of enabling static IP Accelerate with a database using IP allowlisting](/img/accelerate/result-of-adding-static-ip-to-accelerate.png) + +:::info + +To enable static IP support for Accelerate within an existing or a new project environment, your workspace will need to be on our Pro or Business plans. Take a look at the [pricing page](https://www.prisma.io/pricing#accelerate) for more information. + +::: + +## Enable static IP in Accelerate + +You can opt-in to use static IP for Accelerate in the [Platform Console](https://pris.ly/pdp) in two ways: + +### 1. When enabling Accelerate for your project environment: + +1. Specify your database connection string and connection pool region. +2. Enable static IP by toggling the **Static IP** switch in the **Network restrictions** section. +3. Click on the **Enable Accelerate** button. + +### 2. For projects already using Accelerate: + +1. Navigate to the Accelerate **Settings** tab in the project environment. +2. Enable static IP by toggling the **Static IP** switch in the **Network restrictions** section. + +Enabling static IP for Accelerate will provide you with a list of static IPv4 and IPv6 addresses. + +Example IPv4 address range: +``` +52.86.207.46/32 +100.29.164.162/32 +54.211.230.107/32 +18.235.169.169/32 +54.209.237.70/32 +44.221.111.173/32 +``` + +Example IPv6 address range: +``` +2600:1f18:51ce:b00::/64 +2600:1f18:5acb:9a00::/56 +``` + +Once you have these addresses, configure your database firewall to allow incoming connections only from these IPs and any other trusted IPs that need access to your database. + +:::note + +Since you cannot enable static IP for an existing Accelerate-enabled environment, we recommend opting for static IP when enabling Accelerate in a new environment. Use the same database URL as your existing Accelerate environment to instantly access static IP support for Accelerate. + +::: \ No newline at end of file diff --git a/content/300-accelerate/600-faq.mdx b/content/300-accelerate/600-faq.mdx index 58ed384dfb..c83365b648 100644 --- a/content/300-accelerate/600-faq.mdx +++ b/content/300-accelerate/600-faq.mdx @@ -10,15 +10,22 @@ toc: true ## When should I enable static IP for Prisma Accelerate? -A static IP address is an IPv4 or an IPv6 address that is fixed. Unlike dynamic IP addresses, which can change unpredictably, traffic from static IP addresses can be easily identified. Enable static IP for Accelerate when your security setup requires IP allowlisting or if you're implementing firewalls that only permit access from trusted IPs, ensuring controlled and secure database connections. +Enable static IP for Accelerate when your security setup requires IP allowlisting or if you're implementing firewalls that only permit access from trusted IPs, ensuring controlled and secure database connections. -![What is a static IP](./images/static-ip.png) +![Result of enabling static IP Accelerate with a database using IP allowlisting](/img/accelerate/result-of-adding-static-ip-to-accelerate.png) -For databases using IP allowlisting, enable static IP for Accelerate in your specified project environment, and add the obtained IP address to your database's allowlist to ensure authorized access from Accelerate. +Learn more on [how to enable static IP for Accelerate in the Platform Console](/accelerate/static-ip). -![](./images/result-of-adding-static-ip-to-accelerate.png) +:::info +**What is a static IP?** -> ℹ️ To enable static IP support for Accelerate within your existing or new project environment, your workspace will need to be on our **Pro** or **Business** plans. Take a look at the [pricing page](https://www.prisma.io/pricing) for more information. +A static IP address is an IPv4 or an IPv6 address that is fixed. Unlike dynamic IP addresses, which can change unpredictably, traffic from static IP addresses can be easily identified. + +![What is a static IP](/img/accelerate/static-ip.png) +::: + + +> ℹ️ To enable static IP support for Accelerate within your existing or new project environment, your workspace will need to be on our **Pro** or **Business** plans. Take a look at the [pricing page](https://www.prisma.io/pricing#accelerate) for more information. ## Why do I sometimes see unexpected cache behavior? @@ -146,4 +153,8 @@ await prisma.$transaction([ ]); ``` -If you don't need [interactive transactions](/orm/prisma-client/queries/transactions#interactive-transactions), you can save costs and improve performance by using [sequential operations transactions](/orm/prisma-client/queries/transactions#sequential-prisma-client-operations). Sequential operations transactions perform better on Accelerate because they execute in one round-trip to the database, while interactive transactions require separate round-trips for start, commit, and each individual operation on the transaction. \ No newline at end of file +If you don't need [interactive transactions](/orm/prisma-client/queries/transactions#interactive-transactions), you can save costs and improve performance by using [sequential operations transactions](/orm/prisma-client/queries/transactions#sequential-prisma-client-operations). Sequential operations transactions perform better on Accelerate because they execute in one round-trip to the database, while interactive transactions require separate round-trips for start, commit, and each individual operation on the transaction. + +## Do the static IP ranges for Accelerate and Pulse differ? + +No, if you have static IP enabled for both Accelerate and Pulse using the same database URL, the generated static IP ranges will be the same for both products. \ No newline at end of file diff --git a/content/300-accelerate/650-troubleshoot.mdx b/content/300-accelerate/650-troubleshoot.mdx index da300940f3..df8e80c119 100644 --- a/content/300-accelerate/650-troubleshoot.mdx +++ b/content/300-accelerate/650-troubleshoot.mdx @@ -110,9 +110,9 @@ This error indicates that Prisma Accelerate cannot establish a connection to you #### Database Not Publicly accessible -Prisma Accelerate currently requires the database to be publicly accessible. If your database is behind a VPC, or access is restricted to specific IP addresses, this error may occur. +If your database is within a VPC or access is limited to specific IP addresses, you might encounter this error if static IP is not enabled for Accelerate or if the static IPs are not permitted in your database firewall. -**Suggested solution:** Ensure your database is publicly accessible, if not, allow public access. Please note this is only an interim requirement, Static IPs are coming soon and will alleviate the need for complete public access if that’s not desirable. +**Suggested solution:** [Enable static IP for Accelerate](/accelerate/static-ip) and configure your database firewall to allow access from the provided static IP addresses. #### Unreachable Database Host/Port diff --git a/content/400-pulse/200-getting-started.mdx b/content/400-pulse/200-getting-started.mdx index fe3b973e27..c86bd5ea7b 100644 --- a/content/400-pulse/200-getting-started.mdx +++ b/content/400-pulse/200-getting-started.mdx @@ -37,6 +37,7 @@ The Pulse **Setup** screen requires you to: 1. provide your **Database connection string** 1. select a **Region** where Pulse should be hosted +1. Enable **Static IP** if your database is using IP allowlisting. Learn more about enabling static IP for Pulse [here](/pulse/static-ip). 1. decide whether you want to use the **Automatic setup** for [**Database replication**](/pulse/database-setup/general-database-instructions#enable-logical-replication) (only available on paid plans) 1. make sure **Event persistence** is enabled to use delivery guarantees with [`.stream()`](/pulse/api-reference#stream) (or disable it if you want to use [`.subscribe()`](/pulse/api-reference#subscribe) for fully ephemeral events without delivery guarantees) diff --git a/content/400-pulse/250-database-setup/100-general-database-instructions.mdx b/content/400-pulse/250-database-setup/100-general-database-instructions.mdx index 8bd5dd0ff8..0cab634b35 100644 --- a/content/400-pulse/250-database-setup/100-general-database-instructions.mdx +++ b/content/400-pulse/250-database-setup/100-general-database-instructions.mdx @@ -9,7 +9,7 @@ toc: true -Prisma Pulse requires a publicly accessible PostgreSQL (**version 12+**) database with logical replication enabled. To configure specific database providers for Prisma Pulse, visit [here](/pulse/database-setup#provider-specific-instructions). +Prisma Pulse requires a PostgreSQL (**version 12+**) database with logical replication enabled. To configure specific database providers for Prisma Pulse, visit [here](/pulse/database-setup#provider-specific-instructions). diff --git a/content/400-pulse/250-database-setup/index.mdx b/content/400-pulse/250-database-setup/index.mdx index cdc4b59460..0886f3a0df 100644 --- a/content/400-pulse/250-database-setup/index.mdx +++ b/content/400-pulse/250-database-setup/index.mdx @@ -12,7 +12,7 @@ Prisma Pulse requires your database to be configured in a specific way. To get y -Prisma Pulse requires a publicly accessible PostgreSQL (**version 12+**) database with [logical replication](/pulse/database-setup/general-database-instructions#enable-logical-replication) enabled. +Prisma Pulse requires a PostgreSQL (**version 12+**) database with [logical replication](/pulse/database-setup/general-database-instructions#enable-logical-replication) enabled. diff --git a/content/400-pulse/275-static-ip.mdx b/content/400-pulse/275-static-ip.mdx new file mode 100644 index 0000000000..16487b34b8 --- /dev/null +++ b/content/400-pulse/275-static-ip.mdx @@ -0,0 +1,38 @@ +--- +title: "Static IP" +metaTitle: "Enable Static IP for Prisma Pulse" +metaDescription: "Learn enabling Static IP for Prisma Pulse." +--- + +You can enable static IP for Pulse when your security setup requires IP allowlisting or if you're implementing firewalls that only permit access from trusted IPs, ensuring controlled and secure database connections. + +![Result of enabling static IP Pulse with a database using IP allowlisting](/img/pulse/result-of-adding-static-ip-to-pulse.png) + +:::info + +To enable static IP support for Pulse within a new project environment, your workspace will need to be on our Pro or Business plans. Take a look at the [pricing page](https://www.prisma.io/pricing#pulse) for more information. + +::: + +## Enable static IP for Pulse + +You can opt-in to use static IP for Pulse when enabling it for a project environment: + +1. Insert the database connection string and the closest region to the database. +2. Toggle the **Static IP** switch in the **Network restrictions** section. This will provide you with a list of static IPv4 and IPv6 addresses. + Example IPv4 address range: + ``` + 52.86.207.46/32 + 100.29.164.162/32 + 54.211.230.107/32 + 18.235.169.169/32 + 54.209.237.70/32 + 44.221.111.173/32 + ``` + Example IPv6 address range: + ``` + 2600:1f18:51ce:b00::/64 + 2600:1f18:5acb:9a00::/56 + ``` +3. Once you have these addresses, configure your database firewall to allow incoming connections only from these IPs and any other trusted IPs that need access to your database. +4. Click on the **Enable Pulse** button. diff --git a/content/400-pulse/500-known-limitations.mdx b/content/400-pulse/500-known-limitations.mdx index c2a50fa10c..eee2ec7214 100644 --- a/content/400-pulse/500-known-limitations.mdx +++ b/content/400-pulse/500-known-limitations.mdx @@ -56,3 +56,6 @@ Note that database events are base64 encoded for transmission. The size limit ap If your events exceed the size limit, they will be rejected by Prisma Pulse and won't arrive on the receiver side. You can see how many events have been rejected by Prisma Pulse in the Pulse Dashboard in the [Console](https://console.prisma.io/login). +## Static IP cannot be enabled for existing Pulse-enabled environments + +Currently, static IP cannot be enabled for an existing Pulse-enabled environment. To use static IP, you must opt-in to use static IP when enabling Pulse in a new environment. As a workaround, create a new environment in your project with the same database connection string as your current Pulse-enabled environment in order to gain static IP support for Pulse. diff --git a/content/400-pulse/600-faq.mdx b/content/400-pulse/600-faq.mdx index 381594634c..b45e85cf45 100644 --- a/content/400-pulse/600-faq.mdx +++ b/content/400-pulse/600-faq.mdx @@ -123,4 +123,26 @@ If you encounter issues with SSL/TLS encryption while using Pulse, ensure your d postgres://username:password@hostname:port/database?sslmode=require ``` -This [setting](/orm/overview/databases/postgresql#configuring-an-ssl-connection) will enforce SSL/TLS encryption and accept self-signed certificates. \ No newline at end of file +This [setting](/orm/overview/databases/postgresql#configuring-an-ssl-connection) will enforce SSL/TLS encryption and accept self-signed certificates. + +## When should I enable static IP for Prisma Pulse? + +Enable static IP for Pulse when your security setup requires IP allowlisting or if you're implementing firewalls that only permit access from trusted IPs, ensuring controlled and secure database connections. + +![Result of enabling static IP Pulse with a database using IP allowlisting](/img/pulse/result-of-adding-static-ip-to-pulse.png) + +Learn more on [how to enable static IP for Pulse in the Platform Console](/pulse/static-ip). + +> ℹ️ To enable static IP support for Accelerate within your existing or new project environment, your workspace will need to be on our **Pro** or **Business** plans. Take a look at the [pricing page](https://www.prisma.io/pricing#accelerate) for more information. + +:::info +**What is a static IP?** + +A static IP address is an IPv4 or an IPv6 address that is fixed. Unlike dynamic IP addresses, which can change unpredictably, traffic from static IP addresses can be easily identified. + +![What is a static IP](/img/accelerate/static-ip.png) +::: + +## Do the static IP ranges for Accelerate and Pulse differ? + +No, if you have static IP enabled for both Accelerate and Pulse using the same database URL, the generated static IP ranges will be the same for both products. \ No newline at end of file diff --git a/content/500-platform/10-about.mdx b/content/500-platform/10-about.mdx index 31b2e65f7c..70b29cd654 100644 --- a/content/500-platform/10-about.mdx +++ b/content/500-platform/10-about.mdx @@ -69,9 +69,21 @@ In each environment, you can: - set your database connection string (of a [Pulse-compatible database](/pulse/database-setup)). - configure the _region_ where Pulse is running. - configure database replication. + - enable static IP. The number of environments you can create in a project depends on the [subscription plan](https://www.prisma.io/pricing?utm_source=docs&utm_medium=platform-docs) configured in your workspace. +## Database connection management + +The **Database** tab in the left panel of a project environment lets you configure and manage connections to your remote database. Within this tab, the **Connections** section displays a table with the following columns: + +| Column Name | Description | +|-------------|-------------| +| **Hint** | Provides the URL structure for the database in use. | +| **Static IP** | Indicates whether static IP is enabled for the database and associated products. | +| **Products** | Lists the products that are enabled using the database URL. | +| **Action** | Allows you to disable all active products and remove the connection. | + ## Billing The [subscription plan](https://www.prisma.io/pricing?utm_source=docs&utm_medium=platform-docs) you select in your workspace determines how many projects and environments you can create in that workspace: diff --git a/content/300-accelerate/images/result-of-adding-static-ip-to-accelerate.png b/static/img/accelerate/result-of-adding-static-ip-to-accelerate.png similarity index 100% rename from content/300-accelerate/images/result-of-adding-static-ip-to-accelerate.png rename to static/img/accelerate/result-of-adding-static-ip-to-accelerate.png diff --git a/content/300-accelerate/images/static-ip.png b/static/img/accelerate/static-ip.png similarity index 100% rename from content/300-accelerate/images/static-ip.png rename to static/img/accelerate/static-ip.png diff --git a/static/img/pulse/result-of-adding-static-ip-to-pulse.png b/static/img/pulse/result-of-adding-static-ip-to-pulse.png new file mode 100644 index 0000000000..2d87ce8065 Binary files /dev/null and b/static/img/pulse/result-of-adding-static-ip-to-pulse.png differ