josephluck / internote

:heart: Beautiful web-based note editor with a focus on distraction-free content creation.
https://internote.app
28 stars 0 forks source link

Use connection pooling for db #143

Closed josephluck closed 5 years ago

josephluck commented 5 years ago

A la https://spotinst.com/blog/best-practices-serverless-connection-pooling-database/

Should be as simple as moving the await connection above the handler declaration in https://github.com/josephluck/internote/blob/master/api/lambda.ts

Also consider orphaned database connection management using the advice written here https://stackoverflow.com/questions/56013578/is-it-possible-to-intercept-kill-signals-to-close-db-connections-right-before-a

josephluck commented 5 years ago

Closing in favour of aurora