N
Neon4mo ago
graceful-blue

Is the neon serverless driver stateless and suitable for AWS Lambda

I am running up to 1000 concurrent lambda's which need to update various tables in neon - I am looking for best practice way to handle this without getting into connections and connections pooling. Is the neon serverless driver stateless and the way to go? Also some of these lambdas are python based, not node. What is the recommendation for python based lamda usage/setup? thanks
3 Replies
fascinating-indigo
fascinating-indigo4mo ago
@Mahmoud any suggestions here?
fascinating-indigo
fascinating-indigo4mo ago
without getting into connections and connections pooling
Do you mind sharing more details? Using the Neon serverless driver + the pooled connection should work We don't have an official python version of the serverless driver
graceful-blue
graceful-blueOP4mo ago
I could be running anywhere from 1-1000 lambda concurrently where the I will checking a table and update a single row in neon. This is a backend process using a shared neon with a nextjs front end If I have 1000 lambda and 1000 users logged in all querying and doing DML I’m concerned I will hit some sort of connection limit @Mahmoud thanks for responding I've landed on using sqlalchemy with python then with engine.connect() as conn: do something, then SQLAlchemy automatically returns the connection to the pool when the block exits Also got my head around stuff, if you use pooled url then you effectively have a connection pool of 10K which is ample for 1000 concurrent lamdbas

Did you find this page helpful?