Wondering which is better option among supervisord and systemd. The systsemd is the default but it never works as expected for me.
I spent about 1.5 days trying to get filebeat working with app-search ( the system that powers the search on CrazyEngineers ) and couldn't get the logs to work.
Then out of frustration, I tried supervisord; configured it within 3 minutes and wow - it got everything working!
Reading through a few recommendations on the Internet - people seem to be divided. Some say that because systemd is default, stick to it. But if systemd is so awesome, why does supervisord exist? What problem does it solve?
... and finally - what exactly is the difference when I start a process / program with either of the two?
systemd is an init system ; while supervisord is a process control system.
Though it seems that their function in similar, and they do share some goals; but supervisord is not meant as substitute of an init system. (Your system wouldn't be able boot without an init system, PID 1 is the init process, it's the starting point of user-space)
init system is the standard interface, and I recommend using it rather than another process control applications like supervisor.
If you could elaborate your problem in detail, I would like to help you out for the same.
Thank you, Abhishek. I'm not sure how to describe the problem. I was trying to configure filebeat logging system to work with app-search. Logging didn't work when I initiated the app-search and filebeat with systemd. Then I decided to initiate the process using supervisord and it automatically initiated filebeat. I'm super newbie when it comes to server administration (despite working with servers for several years). I think we could discuss the problem in a separate discussion.
Coming back to the main topic, I get that systemd is an init system. However, supervisor is being widely used as a replacement and I wonder what's the deal.
Isn't systemd meant to control the processes as well? I guess that's what happens when I run systemctl start/stop something.service
I have used filebeat, and have configured custom systemd unit as per requirement. I am curious to know what is the issue are you facing. Let's keep that discussion for different thread.
Coming back to topic, If your multiple applications are running in single container (not as per best practice). This is where you are recommended to use supervisord. (systemd don't work in containers) I am not sure what other benefits supervisord provides over systemd for process management. (May be service status GUI?)
Yes, but systemd controls process in lot better way than supervisor does. I am not sure if supervisor supports zombie reaping, process inheritance and signal forwarding.
Just an example of one : Parent process fork() multiple child processes, somehow parent process dies. The orphan processes are inherited by init.
All features supervisord provides are there in systemd, plus many more which supervisord is not capable to provide. Supervisord would've been better alternative if sysVinit and upstart wasn't replaced by systemd.
@Ankita Katdare · Jul 25, 2013
@Ankita Katdare · Oct 17, 2013
@Shailaja Tiwari · Dec 12, 2013
@optimystix · Jul 16, 2011