4 ms·
I worked on a project that did this very thing to determine if the software was online. It’s a very common way of doing it, even if it’s not the best way, becau
by BizarreByte 4y ago
I worked on a project that did this very thing to determine if the software was online. It’s a very common way of doing it, even if it’s not the best way, because it’s reliable, simple, and cheap.
- megous 4y agoWell, just connect to your own service, then? If it's offline, then you will not be able to "sync data" or whatever anyway, even if the device is connected to "The Internet". These connectivity checks sound completely pointless.
- lesuorac 4y agoDo you know how many ovens there are? The AWS lambda fees are going to be insane! So much cheaper just to ping google.com instead.
- megous 4y agoLet's see: ping packet size is say 64 bytes so 128B both ways My $3 VPS has 1TiB/mo bandwidth limit. So that's 2^40 / 128 / 24 / 60 / 30 = ~200k ovens pinging once every minute (which is ridiculous frequency) for $3 I guess if manufacturer can't afford $3 per 200k ovens sold, he should go out of business or stop stuffing ovens with IoT shit. :)
- skellera 4y agoHopefully no one is using lambda for connection health checks. An empty static page on a CDN is probably a better use of resources. But yeah, at that point just ping google since they’ve spent millions on availability.
- Tobani 4y agoI worked for a Company that was a vendor for Lenovo. They had some sort of "News about Lenovo" app on all of their commercial grade machines. The content and translations were managed in our system and each computer would pull down the feed from our servers. It was decent traffic, but nothing crazy... Until they made a change and all of the sudden every machine was pulling every hour at zero minutes and zero seconds. We had one minute of DDoS every day at noon for about a week until that was mitigated.
- MagnumOpus 4y agoIt is always better for debugging purposes to be able to distinguish if the problem is with the client's connection (if google/baidu/yandex all are not reachable) or with the vendor server (if those former are reachable but the vendor server isn't).
- andrewmunsell 4y agoThen ping your own server, and if there’s a failure then fallback to pining another public service with known high availability to determine if it’s an Internet issue. Pinging Yandex by default every 5 minutes is not necessary
- skellera 4y agoWhy pay for bandwidth when you can make Google take the cost? I don’t agree with it but I’m sure it saves a few dollars.
- megous 4y agoYou don't pay anything. You either complete whatever you intended, or if there's no connection to your server, no request hits your server. It doesn't save anything.
- BizarreByte 4y agoThe devices would reach out to other third party services as well. The check would ensure they didn’t pointlessly do so. Knowing whether there was internet or not was used for a lot more than talking to our own servers. > Well, just connect to your own service, then? When you’re pinching pennies as a startup there’s a real cost associated with that. Several thousand devices checking in every few minutes isn’t expensive, but abusing Google was free. Fwiw I’m not defending this, I’m just saying it’s common even if bad practice. There’s a reason IoT devices have a bad reputation.
- distances 4y agoI can't imagine this passing code review on any project I've worked on.
- BizarreByte 4y agoIt was a startup, things weren’t super strict.