使用Google Cloud Functions的Google Cloud Endpoints

23

我找不到有关如何连接GCF和Google Cloud Endpoints的文档。据我了解,Google Cloud Endpoints可以配置访问内部云资源。但是如何将负载均衡器与Endpoints服务一起使用并不清楚。

用Cloud Datastore构建可扩展Web应用程序文章中指出,您应该能够从Cloud Endpoints直接配置到Cloud Functions的连接。没有迹象表明您需要在它们之间拥有任何Compute Engine或其他基础架构。是否有关于如何连接Cloud Endpoints和Cloud Functions的文档或教程?是否有人成功连接了这两个服务?


可能可以使用ESP(可扩展服务代理)来实现。它基本上是一个自定义的Nginx服务器,可以使用LUA和子请求来触发云函数。https://github.com/cloudendpoints/esp - optimalisatie
2个回答

8

目前还没有办法将GCF与Endpoints连接起来。非常抱歉!


7
这让我不想使用GCF。授权不应该成为我的函数本身的一部分。我也不希望我的GCF遭受DDoS攻击,导致我为无法保护的东西付出巨额费用。 - Igor Soloydenko
3
谷歌有类似于 AWS API Gateway 来管理其云函数的工具吗? - Divya Galla
Cloud Endpoints for GCF 正在启动 EAP;请参阅 https://groups.google.com/d/msg/google-cloud-endpoints/gwmuJNEgfAI/SIgtjv9VBgAJ 了解更多详情。 - Rose Davidson
现在可以了。 - Supersharp

3

Google Cloud Endpoints 和 Google Cloud Functions 以及 AWS API Gateway 和 AWS Lambda 并不相同。

Google Cloud Endpoints 可以监控您现有的 API 统计信息并通过 API 凭据限制其使用。

因此,要将您的 Google Cloud Endpoints 和 Google Cloud Functions 关联起来,您必须使用 Google App Engine 或 Google Compute Engine 进行连接。


1
这是我们完成的方式。通过使用Compute Engine和nginx。 - Artsiom Miksiuk
3
在Cloud Functions的理念中,为了面向Cloud Functions,启动一个Compute Engine或App Engine实例似乎是相悖的。 - SacWebDeveloper

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接