AWS lambda architectural question

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?

1 Like

Client libraries use GRPC, only dgraph-js-http uses HTTP. GRPC is more efficient, because it transfers less data and also avoids some parsing steps.

With AWS Aurora, they say that the data api (http), removes the need for connection pooling

From Aurora Data 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.

Is it the case with Dgraph http api too?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.