God vs. Monit [closed]

不问归期 提交于 2019-11-29 18:59:33

Both solutions are good, and there are some pros and cons for both of them.

God config file is written in Ruby, so you can do basically everything Ruby allows you to do, and it's a lot of stuff. Monit has to be configured using its own syntax, it's usually OK but more restrictive. Anyway, you can also generate monit config with Ruby (as a part of your deployment strategy).

Also, monit uses less resources, so if you're on VPS or just don't have any spare memory, monit could be a better choice. Personally, I prefer god, as it's more configurable.

Here's a very good screencast on god. There's also a lot of feedback in comments to this screencast.

God leaks memory pretty badly so I chose Monit for my VPS. Monit runs at about 2MB of RAM constantly, whereas my god install running on Ruby 1.8.6 leaked out to about 60MB of RAM in about 36 hours. I didn't want to monitor my system monitoring tool so I scrapped God and went over to Monit and have had absolutely no problems.

God has a lot of problems including:

  1. It leaks memory
  2. It has trouble stopping and restarting processes

I did a write-up about it at http://blog.bradgessler.com/use-monit-with-rails-not-god

The only real problem with monit (if its a problem) is that the configuration files can get a bit verbose if you're running large clusters, but this could be solved with a templating system.

I had a ton of problems even getting God to run at all on my dedicated Ubuntu server. I eventually just gave up. Monit may not be Ruby, but it's largely hassle-free.

To anyone finding this post going forward, you might also consider bluepill as an alternative to God. While I'd hope that God has addresses its memory issues in the past two years, I know bluepill was set out from the beginning to run on a small footprint. While still not as small as monit, bluepill's footprint is very reasonable (~16 MB VIRT, 13 MB RES for me).

Monit has its own issues:

  • Empty PID files cause issues.
  • If you have multiple levels of dependencies it starts up top level apps when lower level dependencies are started. This might be great for some use-cases, but its not particularly flexible.

At the moment I find it pretty annoying. Fortunately you can kinda kludge your way through the dependencies with their 'groups' feature, but its not particularly satisfying. Anyway, thats my take on v5.1.1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!