我的工作涉及持续监听一个或多个 websocket/mqtt 提要并将这些数据转发到事件队列。这项工作是用 javascript 编写的,并且会 24/7 连续循环运行。
最明显的解决方案是在带有 Compute Engine 的 VM 上运行此作业,但我想知道是否有更优雅的解决方案。例如,Azure 拥有非常适合此类任务的 WebJobs。如果出现错误,它甚至会重新启动脚本。
GCP 上是否有其他组件可以以“托管”方式运行此作业?
Google Cloud 目前没有类似于 Azure WebJobs 的产品。Google Cloud App Engine 的标准环境和灵活环境目前都不支持 websocket。为了使用 websockets,您可以使用Compute Engine或Kubernetes Engine。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句