Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PDP concepts overview #5970

Merged
merged 60 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e18bd30
remove top block component
nikolasburk May 2, 2024
74729ca
Optimised images with calibre/image-actions
github-actions[bot] May 2, 2024
ffcfe5f
add concrete instructions for changing the connection pool size
nikolasburk May 3, 2024
e601f2e
Merge branch 'pdp-concepts' of github.com:prisma/docs into pdp-concepts
nikolasburk May 3, 2024
89b3d0d
refactor platform console concepts
nikolasburk May 3, 2024
170d0c5
Update content/300-accelerate/250-connection-pooling.mdx
nikolasburk May 3, 2024
36c0207
better overview of billing
nikolasburk May 3, 2024
d6aa3ae
Merge branch 'pdp-concepts' of github.com:prisma/docs into pdp-concepts
nikolasburk May 3, 2024
779fbe7
Update content/500-platform/10-about.mdx
nikolasburk May 3, 2024
f38d08d
Update content/300-accelerate/250-connection-pooling.mdx
nikolasburk May 3, 2024
8084f34
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
3c1a576
Update content/500-platform/50-support.mdx
nikolasburk May 6, 2024
e8bab84
Update content/300-accelerate/250-connection-pooling.mdx
nikolasburk May 6, 2024
0403ece
Update content/300-accelerate/250-connection-pooling.mdx
nikolasburk May 6, 2024
9615544
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
324eb5a
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
bc8e573
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
bb21890
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
1ce7bd6
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
b0e0f42
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
1ecdb5a
incorporate feedback
nikolasburk May 6, 2024
94ca6f6
incorporate feedback
nikolasburk May 6, 2024
1d39b76
Optimised images with calibre/image-actions
github-actions[bot] May 6, 2024
e39c952
incorporate feedback
nikolasburk May 6, 2024
a7f84a1
Merge branch 'pdp-concepts' of github.com:prisma/docs into pdp-concepts
nikolasburk May 6, 2024
3c5001e
incorporate feedback
nikolasburk May 6, 2024
e24468d
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
59a8c99
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
def1e5d
incorporate feedback
nikolasburk May 6, 2024
fce7dd2
 resolve merge conflict
nikolasburk May 6, 2024
7002a72
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
9e4e116
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
67279d4
incorporate feedback
nikolasburk May 6, 2024
ed87a69
Merge branch 'pdp-concepts' of github.com:prisma/docs into pdp-concepts
nikolasburk May 6, 2024
e75f7e8
incorporate feedback
nikolasburk May 6, 2024
43aa66d
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
8d7debc
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
31f4663
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
c13e860
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
f691528
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
8e891b9
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
bd752a9
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
3e0e296
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
95e1671
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
9b4eeba
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
fd323a9
Update content/500-platform/10-about.mdx
nikolasburk May 6, 2024
04b1709
update pricing plan to subscription plan
nikolasburk May 6, 2024
c7dc10b
resolve merge conflict
nikolasburk May 6, 2024
a30a893
Update content/500-platform/10-about.mdx
nikolasburk May 7, 2024
70f9f53
Update content/500-platform/10-about.mdx
nikolasburk May 7, 2024
f93ca84
incorporate feedback
nikolasburk May 7, 2024
083f087
incorporate feedback
nikolasburk May 7, 2024
5d1dee3
incorporate feedback
nikolasburk May 7, 2024
0328967
incorporate feedback
nikolasburk May 8, 2024
a28d470
update illustration
nikolasburk May 10, 2024
8f83e2a
update illustration
nikolasburk May 10, 2024
3d780a8
Optimised images with calibre/image-actions
github-actions[bot] May 10, 2024
565c106
resolve merge conflict
nikolasburk May 13, 2024
a674911
Merge branch 'pdp-concepts' of github.com:prisma/docs into pdp-concepts
nikolasburk May 13, 2024
a4c6461
fix build errors
nikolasburk May 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions content/300-accelerate/250-connection-pooling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ metaTitle: 'Accelerate: Connection Pooling'
metaDescription: "Learn about everything you need to know to use Accelerate's connection pooling."
---

<TopBlock>

A [connection pool](https://en.wikipedia.org/wiki/Connection_pool#:~:text=In%20software%20engineering%2C%20a%20connection,executing%20commands%20on%20a%20database.) is a storage of database connections that can be reused for future requests to the database. When a new connection is requested, it is retrieved from the pool if one is available. Once the connection is no longer needed, it is returned to the pool for reuse.

[Connection pooling](https://www.prisma.io/dataguide/database-tools/connection-pooling) is important as it allows you to reuse existing connections instead of creating new ones, which can be an expensive operation.
Expand All @@ -20,8 +18,6 @@ For more information about connection pooling in Prisma, see the documentation [

</Admonition>

</TopBlock>

### Default connection pool size

By default, Accelerate calculates a default connection pool size using the formula `num_physical_cpus * 2 + 1`.
Expand All @@ -36,21 +32,23 @@ This means that Accelerate will create a maximum of 5 connections to the databas

### Configuring the connection pool size

The connection pool size can be configured to a value other than the default via the _database connection string_.
The connection pool size can be configured via the _database connection string_ in your Platform project (_not_ the Accelerate connection string in your Prisma schema) via the `connection_limit` parameter. For example, set a connection pool size of `10` like this: `postgresql://USER:PASSWORD@HOST:PORT/DATABASE?connection_limit=10`.

![Update database connection string in Accelerate](/img/accelerate/accelerate-update-database-connection-string.png)
If nothing is configured, a default value will be used.

To adjust the connection pool size, you can add the `connection_limit` parameter to the database connection string. The value of `connection_limit` is the maximum number of connections that Accelerate will open against your database.
To change the size of the connection pool:
1. Open the [Console](https://console.prisma.io/).
1. Select the _project_ in which you're using Accelerate. You might need to select a different _workspace_ if you can't see your project.
1. Select the _environment_ where you want to configure Accelerate's connection pool size.
1. Update the connection string by appending the `connection_limit` argument.

![Update database connection string in Accelerate](/img/accelerate/accelerate-update-database-connection-string.png)

For example, here is how you can set a connection pool size of 10:

```env no-copy
postgresql://user:password@localhost:5432/db?connection_limit=10
```

### Configuring the connection pool timeout

The connection pool timeout is the duration, measured in seconds, during which the query engine must process a specific query; failing to do so within this timeframe results in an exception being thrown, and the system proceeds to the next query in the queue.
The connection pool timeout is the duration, measured in seconds, during which the query engine must process a specific query; failing to do so within this time frame results in an exception being thrown, and the system proceeds to the next query in the queue.

Similar to the connection pool size, you may also configure the connection pool timeout via the _database connection string_. To adjust this value, you may add the `pool_timeout` parameter to the database connection string.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ You can learn more about the PostgreSQL's `CREATE PUBLICATION`, supported versio

#### Submit your publication slot

You can submit the publication name in the [Platform console](https://console.prisma.io/), before enabling Prisma Pulse:
You can submit the publication name in the [Console](https://console.prisma.io/), before enabling Prisma Pulse:

1. To view your [publications](https://www.postgresql.org/docs/current/view-pg-publication-tables.html), execute:

```sql
SELECT * FROM pg_publication_tables;
```

2. Then you can submit the desired publication name in the Platform console:
2. Then you can submit the desired publication name in the Console:

![](/img/pulse/replication-slot-submission.png)

Expand Down
4 changes: 2 additions & 2 deletions content/400-pulse/250-database-setup/300-railway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The template consists of three [services](https://docs.railway.app/reference/ser
2. On the **pulse-starter** service, locate and click the **Configure** button. Within the **Environment variables** section, you'll find an option to include the `PULSE_API_KEY` environment variable. Keep the `PULSE_API_KEY` field blank for the time being. Once you've set up the database and obtained the database URL from the [Prisma Data Platform](https://console.prisma.io/), you can then add the `PULSE_API_KEY` to the **pulse-starter** service. With the empty field for the Pulse API key, click **Save Config**.
3. Click on the **Deploy** button.
3. To set up the database and make it Pulse-ready, complete the steps outlined in the [previous section](#setup-with-template-prisma-pulse-db-only), starting from **step 2.** till **step 8.**, then follow the instructions below.
4. Go to the [Platform Console](https://console.prisma.io/) and select the project in which you want to activate Pulse. If you don't have a project yet, create a new project via the **New project** button.
4. Go to the [Console](https://console.prisma.io/) and select the project in which you want to activate Pulse. If you don't have a project yet, create a new project via the **New project** button.
5. Navigate to the project's environment in which Pulse should be activated. If you just created a new project, the only available environment is the **Production** environment.
6. Click **Enable Pulse** on the environment's page.
7. Paste the `DATABASE_URL` that you acquired before into the **Database connection string** field. Then, finish the process by clicking **Enable Pulse**.
Expand All @@ -78,7 +78,7 @@ The template consists of three [services](https://docs.railway.app/reference/ser
10. Back in the Railway UI, click on the **pulse-starter** service.
> **Note**: You'll likely find that the build failed for the **pulse-starter** service. This is because the Prisma Pulse API key wasn't provided. Do not worry, this is to be expected and not a problem for the next steps.
11. Click on the **Variables** tab.
12. Create your `PULSE_API_KEY` environment variable: Click the **New Variable** button, create the `PULSE_API_KEY` environment variable, and then paste the value of the `PULSE_API_KEY` that you obtained in the Platform Console. Then save the changes by clicking the **Add** button.
12. Create your `PULSE_API_KEY` environment variable: Click the **New Variable** button, create the `PULSE_API_KEY` environment variable, and then paste the value of the `PULSE_API_KEY` that you obtained in the Console. Then save the changes by clicking the **Add** button.
13. With the `PULSE_API_KEY` environment variable in place, you need to rebuild the **pulse-starter** service for the environment variable to take effect:
14. Click on the **Deployments** tab.
15. Click on the three-dots menu on the deployment that failed. Then click **Redeploy**.
Expand Down
2 changes: 1 addition & 1 deletion content/400-pulse/250-database-setup/400-neon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ After enabling logical replication on Neon, follow these steps:
You can also create a publication to subscribe to database events from *specific tables*. To learn more on managing publications refer to [this](/pulse/database-setup/general-database-instructions#manage-your-own-publication-slot) section.
</Admonition>

2. Before enabling Prisma Pulse, make sure to insert the publication name (e.g., `$PUBLICATION_NAME`) in the **Publication name** field in your project environment configuration for Pulse in the [Platform Console](https://pris.ly/pdp):
2. Before enabling Prisma Pulse, make sure to insert the publication name (e.g., `$PUBLICATION_NAME`) in the **Publication name** field in your project environment configuration for Pulse in the [Console](https://pris.ly/pdp):

![](/img/pulse/replication-slot-submission.png)

Expand Down
124 changes: 118 additions & 6 deletions content/500-platform/10-about.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,129 @@
---
title: 'About'
metaTitle: 'Platform Console: About'
metaDescription: 'Learn about the Platform Console to integrate the Prisma Data Platform products.'
metaTitle: 'Console: About'
metaDescription: 'Learn about the Console to integrate the Prisma Data Platform products.'
displayed_sidebar: platformSidebar
---

<TopBlock>
## Overview

Platform Console enables you to integrate the latest Prisma Data Platform products into your application
The [Console](http://console.prisma.io) enables you to manage and configure your projects that use Prisma Data Platform (PDP) products, and helps you integrate them into your application:

- [Accelerate](/accelerate/what-is-accelerate): Global database cache with scalable connection pooling
nikolasburk marked this conversation as resolved.
Show resolved Hide resolved
- [Pulse](/pulse/what-is-pulse): A managed Change Data Capture (CDC) service that enables real-time database subscriptions

[Go to Platform Console](https://console.prisma.io)

</TopBlock>
## Concepts

The Console workflows are based on four main concepts:

- [**User account**](#user-account): In order to use PDP products, you need to have a PDP user account. A _user_ will typically create one user account to manage all their workspaces, projects and environments. The _user_ can also be invited to join other workspaces to collaborate on the projects in that workspace.
- [**Workspaces**](#workspace): A user account can belong to multiple workspaces. A workspace typically represents a _team_ of individuals working together on one or more projects. **Billing is on a workspace level**, i.e. the invoice for a workspace at the end of the month captures all costs associated with the projects in a given workspace.
- [**Projects**](#project): A project belongs to a workspace. It typically represents the _application_ or _service_ a team is working on.
- [**Environments**](#environment): An environment belongs to a project. It typically maps to a _development stage_, like `Development`, `Staging` or `Production`. **API keys are provisioned on the environment level**, and products are configured per environment as well (e.g. the database connection string used for Accelerate).

Here is a visual illustration of how these concepts relate to each other:

![](/img/platform/pdp-concepts.png)
nikolasburk marked this conversation as resolved.
Show resolved Hide resolved

### User account

A user account is the prerequisite for any interactions with PDP products. You can use it to manage your workspaces (and their projects). A user account can be invited to collaborate on workspaces created by other users as well.

If you need to delete your user account, go [here](/platform/support#deleting-your-pdp-account).

### Workspace

You can create several workspaces. A workspace is an isolated space to host projects. A workspace can have multiple user accounts associated with it so that multiple users can collaborate on the the projects in the workspace.

In each workspace, you can:

- view and manage all projects (and their environments) in that workspace.
- manage billing, i.e. select a [subscription plan](https://prisma.io/pricing?utm_source=prisma-docs&utm_medium=docs-site), configure payment methods, or view the invoice history.
Copy link
Contributor

@meletj meletj May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikolasburk when you fix the redirects, can you also update the UTM here to have source=docs so we're consistent and medium=platform-docs? Thank you

- view the usage of your enabled PDP products across all projects in that workspace.
- invite other users to collaborate in the workspace.

### Project

In each workspace, you can create several projects. A project typically represents an application (a product or service). You typically have one [Prisma schema](/orm/prisma-schema/) per project.

In each project, you can:

- view and manage all environments in that project.

The number of project you can create in a workspace depends on the [subscription plan](https://prisma.io/pricing?utm_source=prisma-docs&utm_medium=docs-site) configured in that workspace.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above re: UTM


### Environment

An environment is an isolated space to provision PDP products for a given project. Environments typically map to development stages, like `Development`, `Staging` or `Production`. When a new project is created, it will have a _default_ environment called `Production`.

In each environment, you can:

- enable, disable and configure PDP products (Pulse, Accelerate, ...).
- generate API keys.
- for **Accelerate**:
- set your database connection string.
- configure the _region_ where Accelerate's connection pool is running.
- change the connection pool size.
- enable static IP.
- for **Pulse**:
- set your database connection string (of a [Pulse-compatible database](/pulse/database-setup)).
petradonka marked this conversation as resolved.
Show resolved Hide resolved
- configure the _region_ where Pulse is running.
petradonka marked this conversation as resolved.
Show resolved Hide resolved
- configure database replication.

The number of environments you can create in a project depends on the [subscription plan](https://prisma.io/pricing?utm_source=prisma-docs&utm_medium=docs-site) configured in your workspace.

## Billing

The [subscription plan](https://prisma.io/pricing?utm_source=prisma-docs&utm_medium=docs-site) you select in your workspace determines how many projects and environments you can create in that workspace:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above re UTM


| | **Starter** | **Pro** | **Business** | **Enterprise** |
nikolasburk marked this conversation as resolved.
Show resolved Hide resolved
| ---------------- | :---------- | ----------- | ------------ | -------------- |
| **Projects** | 5 | 10 | 15 | Custom |
| **Environments** | 2 / project | 6 / project | 12 / project | Custom |

### Per-workspace billing

Billing is set up on a per-workspace basis:

- A subscription plan is selected per workspace. That means, a user account can belong to multiple workspaces where each workspace uses a different plan.
- A payment method is selected per workspace. That means, a user account can belong to multiple workspaces where each workspace has a different payment method.

At the end of a billing period, your selected payment method will be charged with the incurred costs of products across _all_ projects (and their environments) in that workspace.

You can configure all billing details in the **Billing** section of your workspace.

### Prorated billing

All base plan prices are prorated, which means you're only billed for the duration of your subscription to a specific plan. In addition, you're also billed for any usage costs you've incurred during your subscription.

For example:

- if you subscribe to our **Pro** plan on the 15th day of a month, you'll only be charged the base plan price for the days left in that month.
- if you downgrade your subscription plan (e.g. from **Business** to **Pro**) after 10 days of a 30-day month, you'll be charged for 10 days of the base price of the **Business** plan and 20 days for the base price of the **Pro** plan.

Visit our [pricing page](https://prisma.io/pricing?utm_source=prisma-docs&utm_medium=docs-site) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same re: UTM


### Downgrading a subscription plan

If you downgrade a subscription plan, you may need to delete some of your projects and/or their environments in order to adhere to the [limits](#environment) of the newly selected plan.

For example, if your workspace is on a **Business** plan and currently has 14 (out of 15) projects, you will need to delete at least 4 projects to adhere to the project limit of the **Pro** plan. Additionally, you need to make sure that the remaining projects don't have more than 6 environments per project to adhere to the environment limit of the **Pro** plan.

## Programmatic access via the Platform CLI

In addition to the web interface of the Console, the Prisma CLI provides another way to interact with your PDP account and manage PDP products.

This can be useful if you need programmatic access, e.g. for integrating it into CI workflows.

Read more about the [Prisma CLI](/platform/platform-cli).

## API keys

An API key is required to authenticate requests from your Prisma Client to products such as Prisma Accelerate and Prisma Pulse.

APIs keys are _not_ product-specific, meaning you can use the same API key for both Accelerate and Pulse when used in the same environment.

You may generate multiple API keys per environment and manage those via the **API Keys** section in an environment.


20 changes: 0 additions & 20 deletions content/500-platform/20-concepts/10-workspaces.mdx

This file was deleted.

14 changes: 0 additions & 14 deletions content/500-platform/20-concepts/20-projects.mdx

This file was deleted.

40 changes: 0 additions & 40 deletions content/500-platform/20-concepts/30-environments.mdx

This file was deleted.

15 changes: 0 additions & 15 deletions content/500-platform/20-concepts/index.mdx

This file was deleted.

Loading
Loading