shukriadams/arewedown

Limit of monitoring?

notflip opened this issue · 6 comments

This looks really interested, is there a limit to the amount of sites that can be monitored?

Interesting question. I'm pretty sure there is some sort of practical upper limit given that NodeJS is single-threaded and I don't think I went out of my way to avoid non-blocking calls, but that limit is probably hundreds if you're doing simple HTTP calls. Custom lookups, like those using SSH, would probably be more resource-demanding. How many could you think of trying?

I would like to watch over 300 domains in total, Would spinning up 3 node processes with each a 100 items be a better solution then to try and run 300 items in a single node instance?

Interesting. I never thought about scaling up to this level, but it seems like quite a feasible real-life scenario. I'm going to test and get back to you. AWD? like a lot of standard NodeJS apps is single threaded under the hood, so that's an obvious bottleneck, but multithreading doesn't help much anyway when you're hitting a network. That said, I can think of ways of better spreading out the call from each watcher so they don't collide unnecessarily. Good feature request, I'll try to get something into the next release.

Thanks, that would be amazing!

I added a feature to spread out tests, the amount of "spread" is user configurable, by default each test is offset 500ms from the previous test. This might not even be strictly necessary, but it seems like a good idea to not have every test fire at exactly the same time. d59700 should be in the next major release.

I also loaded up 200 tests at once on my beefy dev machine, and AWD? has no problem with these. I still haven't tested it on a Raspberry Pi 3, but on decent hardware I can't see why you couldn't run hundreds of tests simultaneously.

Note that AWD's send alerts per watcher, so the biggest risk with running hundreds of tests will likely be alert flooding if for some reason many test targets fail simultaneously. I should add a feature to bunch alerts together if they occur within a window.

There's now a minor code tweak that spaces watchers out, so there's less chance they will dogpile finite resources like a net connection.