I’m trying to find best practices for Couchbase usage alongside with AWS Lambda.
Is there a way how we can reuse the connection to Couchbase in case of lambda cold start?
Also, I’m wondering if should I disconnect from the cluster each time when lambda execution is performed.
Make sure that every Cluster object that is created gets disconnected. Otherwise those cluster objects will live for ever.
Theoretically, the SDK cluster object should be reusable over a freeze/thaw. But you might be happier if you explicitly create a cluster and disconnect each time.