-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Connection Pooling/Management #35
Comments
Request FlowPrisma Edge DB Request -> Express -> ApolloServer - Reslover -> PrismaClient -> DB The prisma-data-proxy-alt/src/helpers/makeServerConfig.ts Lines 12 to 13 in 0444bd9
Example: import { ApolloServer } from '@apollo/server';
import { startStandaloneServer } from '@apollo/server/standalone';
import gql from 'graphql-tag';
const typeDefs = gql` // types base on Prisma Schema
type Query {
me: User
}
type User {
id: ID!
username: String
}
`;
const resolvers = {
Query: {
me() {
return { id: '1', username: '@ava' }; // Use Prisam Client to query db
},
},
};
const server = new ApolloServer({
typeDefs,
resolvers,
});
// Note the top-level await!
const { url } = await startStandaloneServer(server);
console.log(`🚀 Server ready at ${url}`); About Connection Poolhttps://www.prisma.io/docs/data-platform/data-proxy#reduced-bundle-size By default, Prisma Client bundles the query engine that includes the connection logic for all databases that Prisma supports. PerformanceI think the Prisma Metric, Prisma OpenTelemetry Tracing, Apollo OpenTelemetry, should be enable by default. We can use Crane and metrics to control the data-proxy instance on k8s. |
Does this library provide external connection polling/management functionality?
On prisma: [https://www.prisma.io/docs/data-platform/data-proxy#connection-pooling-and-connection-management](data proxy docs):
After a quick look through the code, I don't see anything explicit about connection pooling/management, but perhaps this is handled under the hood?
If I self-host this prisma data proxy, will I have to use it in conjunction with https://www.prisma.io/docs/guides/performance-and-optimization/connection-management/configure-pg-bouncer as an external connection pooler?
The text was updated successfully, but these errors were encountered: