如何在 openshift 中自动缩放 spring 批处理应用程序? [英] how to autoscale the spring batch application in openshift?

查看:81
本文介绍了如何在 openshift 中自动缩放 spring 批处理应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 spring 批处理应用程序,它将触发作业,通过 API 调用将批量数据从一个数据库传输到另一个数据库.所有作业都配置为在并行处理(主/从步骤)分区中工作,并在 openshift 中部署此应用程序.需要根据作业执行期间的负载自动缩放应用程序.即使我使用了 openshift 自动缩放功能,我仍然找不到作业性能的效率.POD 只是在创建,但只有一个 POD 被使用.如何解决这个问题?如何在 PODS 之间拆分作业?

I have a spring batch application which will trigger the job to transfer bulk data from one database to another database through API call.All jobs are configured to work in parallel processing(Master/slave step)partition and deployed this application in openshift. Need to autoscale the application based on the load during the job execution.Even though i have used the openshift autoscale feature still i couldn't find the efficiency in performance of the job. PODs are simply creating but only one POD is getting utilized.How to fix this issue?How to split jobs among PODS?

推荐答案

在远程分区设置中,主步骤将 StepExecutionRequest 发送到可配置队列(我们称之为 requests代码>).工作步骤是此队列上的侦听器.主步骤可以配置为:

In a remote partitioning setup, the master step sends StepExecutionRequests to a configurable queue (let's call it requests). Worker steps are listeners on this queue. The master step can be configured to either:

  • 聚合来自可配置队列上的工作人员的回复(我们称之为回复)
  • 轮询作业存储库以检查工作人员的状态

考虑到这一点,自动缩放此类设置取决于您如何定义 POD.例如,如果您在同一个 POD 中运行一个或多个工作程序,您可以随着 requests 队列大小的增长自动扩展此部署.

With this in mind, autoscaling such a setup depends on how you define your PODs. For example, if you run one or multiple workers in the same POD, you can autoscale this deployment as the size of the requests queue grows.

希望这会有所帮助.

这篇关于如何在 openshift 中自动缩放 spring 批处理应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆