简体   繁体   English

哪种 GCP 服务最适合我的用例?

[英]Which GCP service(s) is the best for my use case?

I have an image in Artifact Registry that does a unit of work:我在 Artifact Registry 中有一个图像,它执行一个工作单元:

  • it expects input files inside a certain directory (let's call it main_input)它需要某个目录中的输入文件(我们称之为 main_input)

  • runs them, does some sequences of computation, and outputs results into an output folder in Google Storage运行它们,执行一些计算序列,并将结果输出到 Google Storage 中的 output 文件夹中

The run time of each does not exceed 30 minutes, but I have thousands of such runs to perform.每个的运行时间不超过 30 分钟,但我有数千次这样的运行要执行。

Inside a single VM, I can create various containers from this image by mounting the main_input directory inside the container to the correct ones on the host, and run.在单个 VM 中,我可以通过将容器内的 main_input 目录挂载到主机上的正确目录来从该映像创建各种容器,然后运行。

However, I wonder if Cloud Run is a more scalable solution for this?但是,我想知道 Cloud Run 是否是一个更具可扩展性的解决方案? or shall I look at other services/strategies?还是我应该看看其他服务/策略?

Managing thousands of runs is not an easy task, you can use a scheduler like airflow or argo worfkflows to run the tasks and restart them if needed.管理数千次运行并非易事,您可以使用 airflow 或 argo worfkflows 之类的调度程序来运行任务并在需要时重新启动它们。

For the containers environment, I propose Kubernetes (GKE) over Cloud Run, for some reason:对于容器环境,出于某种原因,我建议在 Cloud Run 上使用 Kubernetes (GKE):

  • you have more permissions than Cloud Run您拥有比 Cloud Run 更多的权限
  • to be agnostic from GCP (your code can work on other platforms like AWS)与 GCP 无关(您的代码可以在 AWS 等其他平台上运行)
  • better management for apps configurations and secrets, and supported with all the CI/CD tools更好地管理应用程序配置和机密,并支持所有 CI/CD 工具
  • less expensive: you can create scalable preemptible node pools to reduce the cost and add a lot of resources when needed更便宜:您可以创建可扩展的抢占式节点池以降低成本并在需要时添加大量资源
  • you can use the same cluster to run other applications for your company您可以使用同一个集群为您的公司运行其他应用程序
  • you can use open source tools for log collections, monitoring, HTTP reverse proxy, ...您可以使用开源工具进行日志 collections、监控、HTTP 反向代理、...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IAM S3 服务角色用例 - IAM S3 Service Role Use Case 使用 GCP 代理请求的最佳方式是什么? - What's the best way to proxy requests with GCP? GCP - 编排工具 Workflows 或 Composer 的最佳选择是什么? - GCP - What's the best option of orchestration tool Workflows or Composer? 使用哪个 GCP 组件从 API 中获取数据 - which GCP component to use to fetch data from an API Kinesis 与 SQS,哪个最适合这种特殊情况? - Kinesis vs SQS, which is the best for this particular case? 如何在 Docker 中使用 GCP 服务帐号 json 文件 - How to use GCP service account json files in Docker 无法将 GCP IAM API 与服务帐户一起使用 - Can't use GCP IAM API with a service account GCP:HTTP(S) 负载平衡后端服务区域选择 - GCP: HTTP(S) Load Balancing backend service region select Firestore - 什么是最适合我的案例的数据结构(性能/价格)? - Firestore - what is best data structure for my case(performance/price)? 如何在 Prometheus 中从我的 GCP 组织导出 SLO? - How to export SLO's from my GCP organization in Prometheus?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM