{"repo":"MatteoGioioso/serverless-pg","free":true,"listed":false,"github":"https://github.com/MatteoGioioso/serverless-pg","clone":"git clone https://github.com/MatteoGioioso/serverless-pg.git","description":"A package for managing PostgreSQL connections at SERVERLESS scale","language":"JavaScript","stars":324,"topics":["serverless-postgres","postgres","postgresql","aws","aws-lambda","nodejs","javascript","serverless"],"license":"MIT","category":"databases-storage","readme_excerpt":"\\ --- Slow query? Check Pgex, PostgreSQL query explainer --- What is serverless-pg? Serverless-postgres is a wrapper for node-pg Node.js module. It is heavily inspired by Jeremy Daly's serverless-mysql package. Why I need this module? In a serverless application a function can scale almost \"infinitely\" by creating separate container instances for each concurrent user. Each container can correspond to a database connection which, for performance purposes, is left opened for further re-utilization. If we have a sudden spike of concurrent traffic, the available connections can be quickly maxed out by other competing functions. If we reach the max connections limit, Postgres will automatically reject any frontend trying to connect to its backend. This can cause heavy disruption in your application. What does it do? Serverless-postgres adds a connection management component specifically for FaaS based applications. By calling the method .clean() at the end of your functions, the module will constantly monitor the status of all the processes running in the PostgreSQL backend and then, based on the configuration provided, will garbage collect the \"zombie\" connections. If the client fails to connect with \"sorry, too many clients already\" error, the module will retry using trusted backoff algorithms. NOTE: This module should work with any PostgreSQL server. It has been tested with AWS's RDS Postgres, Aurora Postgres, and Aurora Serverless. Feel free to request additional features and ","default_branch":null,"files":null,"tree":[],"storefront":"/r/MatteoGioioso","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/MatteoGioioso/serverless-pg/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}