将 Quartz 添加到 Web API 项目。性能问题

Add Quartz to a Web API project. Performance question

我需要使用 Quartz 来完成一项耗时的任务来更新我的项目中的数据,我担心将 workers 添加到网络 API 会限制网络的性能 API 当任务在后台 运行 时。我在 Amazon 托管我的网站 API,这样我就可以加强它,或者我将这个项目部署到另一台服务器以处理另一项服务中的后台作业。

在同一台服务器上托管 Workers 和 WebApi 可能会更便宜。但我知道单独部署它们会使修复更容易部署。

I'm afraid that adding the workers to the web API will limit the performance of the web API when the tasks are running in the background. I'm hosting my web API in Amazon so I can just beef it up or I deploy this project to another server to handle the background jobs in another service.

如果您的后台任务将执行 CPU-intensive 或 I/O-intensive 等作业,将 Workers 和 WebApi 应用程序托管在同一台服务器上,这可能会导致资源争用并导致性能低下.

另一方面,将您的应用程序(或工作人员)隔离到亚马逊的单独服务器(或服务)中,这将需要额外收费。您可以先监控 CUP、内存等使用指标,然后确定当前的托管方式是否正常。