草庐IT

4990695959542

全部标签

node.js - 如何使用内部 IP 从 Google Cloud Functions 连接到我的 Compute Engine MongoDB 实例?

我的GoogleCloudFunctions与在ComputeEngineVM实例上运行的MongoDB数据库完美配合,但前提是我在Function的MongoClient连接字符串中使用实例的外部IP地址。如果我使用内部IP,我希望将其用于延迟和安全性,它会在30秒后超时并显示:document-create4990695959542DocumentCreateerror:failedtoconnecttoserver[10.*.*.*:27017]onfirstconnect[MongoError:connection1to10.*.*.*:27017timedout]docume

node.js - 如何使用内部 IP 从 Google Cloud Functions 连接到我的 Compute Engine MongoDB 实例?

我的GoogleCloudFunctions与在ComputeEngineVM实例上运行的MongoDB数据库完美配合,但前提是我在Function的MongoClient连接字符串中使用实例的外部IP地址。如果我使用内部IP,我希望将其用于延迟和安全性,它会在30秒后超时并显示:document-create4990695959542DocumentCreateerror:failedtoconnecttoserver[10.*.*.*:27017]onfirstconnect[MongoError:connection1to10.*.*.*:27017timedout]docume