When connecting from cloudfunctions/cloudflareworkers: Should I use gRPC JS Client, HTTP JS Client, or cURL http API

Hi,
I am using Cloudflare Workers to access dgraph cloud.
What’s the best most performant way to do that?

Should I use gRPC JS Client, HTTP JS Client, or cURL http API?

Of course every option of these 3 work fine, but I ask in terms of optimization, which of these 3 will give me the best results.

I think it will be gRPC because it’s faster due it operating on the binary level, but are there really no drawbacks?

thanks a lot

The advantage of grpc is using protobufs which will help with decoding times on larger messages, but since all the endpoints are unary, there is not a big difference in operation.

I would say, do whatever feels right in your code. Probably not the raw http API as it will be harder to maintain in case of changes.

1 Like