pub struct ConnectionPooler {
pub enabled: Option<bool>,
pub pooler: Option<Box<PgBouncer>>,
}Expand description
ConnectionPooler : A connection pooler is a tool used to manage database connections, sitting between your application and Postgres instance. Because of the way Postgres handles connections, the server may encounter resource constraint issues when managing a few thousand connections. Using a pooler can alleviate these issues by using actual Postgres connections only when necessary Example: A typical connection pooler configuration yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: connectionPooler: enabled: true pooler: poolMode: transaction # Valid parameter values can be found at https://www.pgbouncer.org/config.html parameters: default_pool_size: \"50\" max_client_conn: \"5000\" resources: limits: cpu: 200m memory: 256Mi requests: cpu: 100m memory: 128Mi
Fields§
§enabled: Option<bool>Enable the connection pooler Default: false.
pooler: Option<Box<PgBouncer>>Implementations§
Source§impl ConnectionPooler
impl ConnectionPooler
Sourcepub fn new() -> ConnectionPooler
pub fn new() -> ConnectionPooler
A connection pooler is a tool used to manage database connections, sitting between your application and Postgres instance. Because of the way Postgres handles connections, the server may encounter resource constraint issues when managing a few thousand connections. Using a pooler can alleviate these issues by using actual Postgres connections only when necessary Example: A typical connection pooler configuration yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: connectionPooler: enabled: true pooler: poolMode: transaction # Valid parameter values can be found at https://www.pgbouncer.org/config.html parameters: default_pool_size: \"50\" max_client_conn: \"5000\" resources: limits: cpu: 200m memory: 256Mi requests: cpu: 100m memory: 128Mi
Trait Implementations§
Source§impl Clone for ConnectionPooler
impl Clone for ConnectionPooler
Source§fn clone(&self) -> ConnectionPooler
fn clone(&self) -> ConnectionPooler
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more