I want to connect to dgraph running on ec2, from lambda functions. Lambda functions can scale to up to 1000 functions in parallel (scaling lambda). Since connection pooling is not possible in lambda, this can lead to 1000 connections to dgraph at the same time.
Is creating a new db connection expensive in dgraph? Will using http api (using dgraph-js-http) solve the issue, assuming the api takes care of creating connection pools behind the api?
This API frees you from the complexity and overhead that come along with traditional connection management, and gives you the power to quickly and easily execute SQL statements that access and modify your Amazon Aurora Serverless Database instances.
The Data API is designed to meet the needs of both traditional and serverless apps.