@Kaustubh Katdare • 08 Jan, 2020

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? 

@Abhishek Rawal • 08 Jan, 2020 • 2 likes

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.

@Kaustubh Katdare • 08 Jan, 2020

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


@Abhishek Rawal • 08 Jan, 2020 • 1 like

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.

Related Posts

I thought of compiling a list of the coolest and the best whatsapp group names that you've been using for your respective groups. For the sake of convenience, we'll stick...
A simple good bye email or last working day mail ain't cool! We've some awesome templates that you can use. If you're looking for an amazing Last Working Day email...
Hello CEans, How to convert CGPA (10 Point Scale) to Percentage? Please help!
I heard many students are having a trouble registering on the TCS Portal, when it's quite straightforward actually. If you have problem in attaching photos or CV, Use internet explorer...
What is IES or Indian Engineering Services Exam? Union Public Services Commission (UPSC) conducts the Engineering Services Exam or ESE 2016 is an entrance exam for graduates who wish to...