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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectionPooler
impl Debug for ConnectionPooler
Source§impl Default for ConnectionPooler
impl Default for ConnectionPooler
Source§fn default() -> ConnectionPooler
fn default() -> ConnectionPooler
Source§impl<'de> Deserialize<'de> for ConnectionPooler
impl<'de> Deserialize<'de> for ConnectionPooler
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ConnectionPooler
impl PartialEq for ConnectionPooler
Source§fn eq(&self, other: &ConnectionPooler) -> bool
fn eq(&self, other: &ConnectionPooler) -> bool
self and other values to be equal, and is used by ==.