-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.1.8
-
Component/s: Lambda, MongoDB 3.2
-
Empty show more show less
For some reason, probably because of filling connection pool, it takes 700-1000 ms to connect to mongodb replica set. While it's not a very big problem for general purpose node application (still problem though), when you can connect once and then re-use MongoClient instance, in Amazon Lambda environment it doesn't make any sense.
I'd say, this effectively prevents us from using MongoDB with amazon Lambda, which is kind of sad. And I'm not the only person who has this problem so far:
http://stackoverflow.com/questions/31728414/mongodb-connections-from-aws-lambda
The proposed in the thread way to work around this problem doesn't look like right thing to do. Also, we use python driver as well, and it doesn't seem to have anything like that. In fact, it takes up to 70 milliseconds to connect to replica set deployed on Amazon EC2 instance from my local machine.
Any thoughts?