2

I have a Rails application deployed with Puma in one EBS instance. All tutorials I've read deploys Sidekiq to the same instance as the web server.

How do I deploy Sidekiq( using the same application ) to a different instance? Can I specify a config file for a specific instance?

Jirico
  • 1,242
  • 1
  • 15
  • 29
  • 2
    Possible duplicate of [Worker "dyno" in AWS Elastic Beanstalk](https://stackoverflow.com/questions/25214876/worker-dyno-in-aws-elastic-beanstalk) – Marcus Ilgner Jan 31 '19 at 20:21
  • @Jirico why do you need it? – NeverBe Jan 31 '19 at 20:27
  • 1
    Take a look at https://github.com/ThoughtWorksStudios/eb_deployer - personally I couldn't get Rails to work smoothly on Beanstalk due to a number of reasons but maybe things have improved since then. – Marcus Ilgner Jan 31 '19 at 20:29
  • @NeverBe Because it's safer to use Sidekiq separately. If some job eats all memory webserver keeps working. – Jirico Jan 31 '19 at 21:58
  • 1
    run 2 envs maybe, 1st - balancer + n instaces, 2nd - single instance for sidekiq (no migrations/no assets compilation) – NeverBe Feb 01 '19 at 01:09
  • Have you tried capistrano? It can make this kind of deployment pretty easy. Plus @NeverBe comment is on point. – Ravi Feb 01 '19 at 05:56
  • 1
    I use a variation of [this gist](https://gist.github.com/ssaunier/44bbebb9c0fa01953860) to run Sidekiq on an EB worker for my projects. I modified the script to only boot sidekiq when a particular environment variable is present on the worker environment (so it won't run on the webserver). – littleforest Feb 01 '19 at 07:11
  • Looks like Sidekiq on EBS can not be configured and work smoothly as a by hand configuration. So for now, I'll configure my own EC2 instance to run Sidekiq. – Jirico Feb 02 '19 at 01:12
  • Hi @Jirico, are you running Sidekiq server on same instance or separate one? – Vieenay Siingh Jan 23 '22 at 10:14

0 Answers0