如何在Amazon EC2上为Rails应用程序设置延迟作业?

时间:2023-01-26 12:56:10

When I need to set up the delayed job on Heroku, I need to buy there also the another worker dyno. How does it work on Amazon EC2? I am using the small EC2 instance.

当我需要在Heroku上设置延迟工作时,我还需要在那里购买另一个工人dyno。它如何在Amazon EC2上运行?我正在使用小型EC2实例。

Do I need to buy a higher instance or what is needed for successful set up of delayed job on Amazon EC2?

我是否需要购买更高的实例或在Amazon EC2上成功设置延迟工作所需的内容?

Thank you

谢谢

3 个解决方案

#1


1  

On EC2, you're basically buying infrastructure, so it basically depends on the workload that you're having if you need a higher instance or not. If you're not saturating the CPU on your current EC2 instance, all you have to do is use a gem like delayed_job (https://rubygems.org/gems/delayed_job) or resque (https://rubygems.org/gems/resque). Personally, I didn't need a higher EC2 instance for delayed jobs, as they didn't use up a lot of resources (also small EC2).

在EC2上,你基本上都在购买基础设施,所以它基本上取决于你需要更高实例时的工作量。如果您没有在当前EC2实例上使CPU饱和,那么您所要做的就是使用像delayed_job(https://rubygems.org/gems/delayed_job)或resque(https://rubygems.org/gems)这样的gem。 / resque)。就个人而言,我不需要更高的EC2实例来延迟工作,因为他们没有耗尽大量资源(也是小EC2)。

#2


1  

First of all welcome to delayed_job club. I agree with the previous answer, I was running delayed_job on a ec2 micro instance. But chances of delayed_job consuming more memory is high. I suggest you to have a separate instance for running delayed_jobs. Minimum a small instance would do. I am using https://github.com/collectiveidea/delayed_job version of delayed since 2 years. Matured a lot over period. Quite stabilized compared to previous version. It also gives the web interface too.

首先欢迎来到delayed_job俱乐部。我同意之前的回答,我在ec2微实例上运行delayed_job。但是delayed_job消耗更多内存的可能性很高。我建议你有一个单独的实例来运行delayed_jobs。最小的实例可以做到。我使用的https://github.com/collectiveidea/delayed_job版本延迟了2年。成熟了很多时期。与之前的版本相比相当稳定。它也提供了Web界面。

#3


1  

i have recently started using EC2(micro instance because its free and because i need a staging env) with delayed job for ActiveRecord. EC2 is same like a fresh machine with minimum configuration. You need to install all the necessary stuff like RVM, ruby, rubygems, git etc that you install on your local machine. I am using mina deployment and have specified there to manipulate nginx, passenger and delayed_job.

我最近开始使用EC2(微实例,因为它是免费的,因为我需要一个暂存环境),延迟了ActiveRecord的工作。 EC2与具有最小配置的新机器相同。您需要安装在本地计算机上安装的所有必要的东西,如RVM,ruby,rubygems,git等。我正在使用mina部署并指定那里操纵nginx,passenger和delayed_job。

#1


1  

On EC2, you're basically buying infrastructure, so it basically depends on the workload that you're having if you need a higher instance or not. If you're not saturating the CPU on your current EC2 instance, all you have to do is use a gem like delayed_job (https://rubygems.org/gems/delayed_job) or resque (https://rubygems.org/gems/resque). Personally, I didn't need a higher EC2 instance for delayed jobs, as they didn't use up a lot of resources (also small EC2).

在EC2上,你基本上都在购买基础设施,所以它基本上取决于你需要更高实例时的工作量。如果您没有在当前EC2实例上使CPU饱和,那么您所要做的就是使用像delayed_job(https://rubygems.org/gems/delayed_job)或resque(https://rubygems.org/gems)这样的gem。 / resque)。就个人而言,我不需要更高的EC2实例来延迟工作,因为他们没有耗尽大量资源(也是小EC2)。

#2


1  

First of all welcome to delayed_job club. I agree with the previous answer, I was running delayed_job on a ec2 micro instance. But chances of delayed_job consuming more memory is high. I suggest you to have a separate instance for running delayed_jobs. Minimum a small instance would do. I am using https://github.com/collectiveidea/delayed_job version of delayed since 2 years. Matured a lot over period. Quite stabilized compared to previous version. It also gives the web interface too.

首先欢迎来到delayed_job俱乐部。我同意之前的回答,我在ec2微实例上运行delayed_job。但是delayed_job消耗更多内存的可能性很高。我建议你有一个单独的实例来运行delayed_jobs。最小的实例可以做到。我使用的https://github.com/collectiveidea/delayed_job版本延迟了2年。成熟了很多时期。与之前的版本相比相当稳定。它也提供了Web界面。

#3


1  

i have recently started using EC2(micro instance because its free and because i need a staging env) with delayed job for ActiveRecord. EC2 is same like a fresh machine with minimum configuration. You need to install all the necessary stuff like RVM, ruby, rubygems, git etc that you install on your local machine. I am using mina deployment and have specified there to manipulate nginx, passenger and delayed_job.

我最近开始使用EC2(微实例,因为它是免费的,因为我需要一个暂存环境),延迟了ActiveRecord的工作。 EC2与具有最小配置的新机器相同。您需要安装在本地计算机上安装的所有必要的东西,如RVM,ruby,rubygems,git等。我正在使用mina部署并指定那里操纵nginx,passenger和delayed_job。