What is the best way to manage multiple interconnected services for a web applications like:
So that, if one is stopped or started, others get stopped/started too.
Usually a monitoring tool is used for this purpose. One such good tool is God.
The basic idea is to run God
as a system service, and configure your sidekiq
to be watched by God. When your server restarts, God runs as a service and it will start your sidekiq
workers.
You have more benefits by using God, to name just a few:
Update: just read an article this morning which might be very helpful: Create, run and manage your Ruby background processes with upstart.