Functions retrieving data from Fauna are super slow

Hey I’ve developed myself a lambda function that retrieves products from FAUNA DB - For some reason these product GET requests are super slow.

Basically they contain of BASE64 small image and some metadata about the product.

an example of 0.2mb request taking 3.16seconds.

Hi @kristjanreinhold,

By default, lambda functions are deployed in the us-east-1 AWS Lambda region. Do you happen to know where your fauna DB is hosted? Perhaps your database instance in not very near. Let me know if that makes sense.

Thx for the reply. I think fauna has to be located in THE US somewhere. Otherwise 300kb wouldn’t take that long. Im located in Estonia. I think any EU region would be OK for me (us-east-1 eg.). Gonna try and figure out where and how can i move my fauna instance closer. Or maybe use another service provider. (not sure which)

Actually when reading about fauna - it kind of looks as if they’re the ones solving this problem

Added 3 time measurements… looks as if the time spent after recieving entities is also quite long
Improved version of the initial image with output below



Ref(Collection(“products”), “278205778927550981”),
Ref(Collection(“products”), “278205815209329153”),
Ref(Collection(“products”), “278205823103009281”),
Ref(Collection(“products”), “278205828766368261”)

------TIME after entities loaded------ 218

Response with status 200 in 429 ms.

Request from ::1: GET /getproducts?size=4

Am i doing some extra work based on the inital image?

If you could provide the url of your function, I can check the logs on our end. Those logs typically have a timing attribute so that should give us some idea if the extra time is in your code or in our system.

Couldnt wait that long. Moved to

No prob. Let us know if you have any other questions.