fzaninotto / uptime

A remote monitoring application using Node.js, MongoDB, and Twitter Bootstrap.
http://fzaninotto.github.com/uptime/
MIT License
3.62k stars 706 forks source link

Multiple webapp for availability #333

Open bviswana101 opened 9 years ago

bviswana101 commented 9 years ago

Is it possible to run multiple app.js instances using the same MongoDB instance. Each monitor would have a different name but also connect to a different api server. This is primarily for a HA deployment, were each server is running both app and monitor and there is a shared mongodb replicaset among them.

I understand that having multiple monitors is supported where average response times is obtained. But in that case all monitors use the same API server. Here, i am planning to run multiple api/webapp server for availability as well.

bviswana101 commented 9 years ago

I tried the above and noticed that the checks get divided between the monitors, not equally but there seems to be some stickiness associated with which checks run on which monitors. This might be an artifact of /api/checks/needsPolling REST api which is called by monitor. However, i am not sure if all checks are run and no checks are repeated etc. Also, the aggregation runs on all instances of app.js.

Again, my question is, is this valid or are there inherent race conditions. I have only 15 or so checks currently.