可以在图书馆内容纳Cron工作吗?

发布于 2025-01-19 10:16:08 字数 149 浏览 3 评论 0原文

我们目前正在将单体应用程序拆分为一组微服务。这个整体应用程序包含某些功能,是成为库的良好候选者。该库将被其他几个微服务使用。

解耦功能还需要有 cron 作业来进行定期监控。

您认为将这些 cron 作业分布在库内而不是分布在单独的存储库中是一个好主意吗?

We’re currently splitting monolithic app into a set of microservices. This monolithic app contains certain functionality which is a good candidate to become a library. This library will be consumed by several other microservices.

Decoupled functionality also requires having cron jobs for regular monitoring.

Do you think it’s a good idea to have these cron jobs to be distributed inside the library and not in a separate repository?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

多情癖 2025-01-26 10:16:08

在做出这一决定之前,我会考虑许多方面:

  • 将要进口的LIB的服务将从这些Cron工作中受益?还是对于其中一些人来说,可能不需要Cron工作?
  • 这些Cron工作的开销是什么?它们是否可能在资源使用方面影响微服务功能?

根据这两个方面,我相信您可以很容易地做出决定。

I would think about a number of aspects before taking that decision:

  • The services where this lib will be imported, are going to benefit from those cron jobs? Or is there a chance that for some of them, the cron jobs might not be needed?
  • What is the overhead of those cron jobs? Are they likely to impact the microservice functionality in terms of resource usage?

Based on those 2 aspects, I believe you can take the decision pretty easily.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文