CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@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.

4.8k views

Related Posts

@Ankita Katdare · Jul 25, 2013

Skoda India, the Czech automaker is all set to announce the all new Skoda Octavia vRS, the fastest Octavia ever to come out of the company's production house. Featuring two...
3k views

@sookie · Aug 24, 2009

Hi all programmers here! Problem Statement : A positive integer is called a palindrome if its representation in the decimal system is the same when read from left to right...
2.2k views

@Ankita Katdare · Oct 17, 2013

Samsung Group India has launched two new Android smartphones in the market with Samsung Galaxy Star Pro and Samsung Galaxy Trend. Bringing forth these new mid-segment smartphones, Samsung India has...
9.4k views

@Shailaja Tiwari · Dec 12, 2013

Actually we have been told to do a project for our software engineering subject and for that ,we have to think of some system for example: online admission system ,library...
6.1k views

@optimystix · Jul 16, 2011

Every country in the world is under loan from IMF and World Bank. If that is so, from where does IMF and World Bank get so much of money? Money...
3.3k views