Skip to content

alexanderwink/lambda-multi-tenant-connection-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A multi tenant connection pool for your lambdas

A simple connection pool for multi tenant lambas using the silo or bridged model. Used correctly this pool will persist between invokations of lambas to reuse the database connections.

The intented use is for those that are stuck with RDS and not able to use RDS Proxy for various reasons.

Usage

import cpool "github.com/alexanderwink/lambda-multi-tenant-connection-pool"

// --- //

db, err := cpool.Pool.GetConnection(databaseName)

Defaults

MaxSize 100 Max total number of connections for the pool
MaxConnectionsPerDatabase 5 Max connections in pool for each database
TTL 300 Connections will be removed from the pool when their TTL has been exceeded

Custom configuration

cpool.Pool.Init(100, 5, 300)

About

A multi tenant connection pool for your lambdas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages