Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side scalability across hundreds of devices on same IP address #81

Closed
8bit-echo opened this issue Oct 22, 2020 · 1 comment
Closed

Comments

@8bit-echo
Copy link

I'd love to be able to use is-online in my application, however I want to ask a question to make sure that it will be a good fit with regards to scalability.

Please consider the following use case:

This package runs on an IoT device. When the device starts up the application, it runs a check to determine if the internet is reachable. The way I understand this package to work is that it runs 3 http requests and returns true if any of the requests succeed. Now imagine that at any given physical location, there are 100 devices that all start the application at the same time every morning.

I'm worried that any of those 3 urls could see 100 requests coming from the same IP and treat the traffic as a DDoS attack and blacklist said IP address. Then this package would, understandably, return a false negative.

Have there been any reports of this kind of issue happening in similar environments?

@sindresorhus
Copy link
Owner

I assume you're going to use it in Node.js/Electron. There are actually 5 checks, and all of them would have to fail to cause a false negative. One of the checks uses the same endpoint as iOS, which means it should be scalable as there are millions of iOS devices. I doubt the Apple captive check nor the DNS checks would blacklist the devices, as they're used to handling a huge amount of requests.

However, if this is still not good enough for you:

  1. You could assign a unique IP to each device.
  2. You could fix Is it possible to pass URL in config? #61
  3. You could do your own backup check using https://github.com/sindresorhus/public-ip#fallbackurls, even host your own https://github.com/rdegges/ipify-api server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants