node-red-nodes/social
guzba ff9d21827d
Attempt to mitigate stream server connect feedback loop
Pushbullet dev here. Around 36 hours ago we started receiving around 750 additional requests per second to connect to our stream server. I blocked around 50 - 100 IP addresses to mitigate the spam. This spam traffic has continued unchanged since then.

I don't know for sure what caused this, but one user came forward reporting issues with their Node-Red setup after I banned the IPs (status code is my banned IP status code which is pretty compelling evidence). I can't be sure what is causing the issue since no User-Agent is included in the requests, but it for sure is at least partly Node-Red API users. I'd like to work on mitigating this since mitigating the spam traffic costs money.

My first theory here is in this PR. I am not aware of any guarantees that you'll never get multiple 'error' events, so it makes sense to clear the timeout before setting a new one to reconnect. Even if it is just defensive, it may not have much cost? If you do get multiple error events without this change, it is possible to trigger many connect() requests which can error out and then trigger many more connect() requests with lots of timeouts, which is not good.

Another thing to consider is that this library's dependency for PB (https://github.com/alexwhitman/node-pushbullet-api) already has code to reconnect if a websocket connection is lost without having been properly closed. I think an even better solution is verifying this works and then deleting the reconnect logic from here.

I'm not an expert on Node-Red though so I am only trying to offer suggestions to ensure everyone is a good citizen when using our API :) Thanks!
2020-10-13 16:27:30 -05:00
..
dweetio fix tweet.io links 2017-06-13 00:11:30 +01:00
email email - show valid folders in error if fetch fails 2020-09-23 23:54:09 +01:00
feedparser bump lib 2020-05-05 19:36:48 +01:00
irc Re-lint a load of nodes 2017-01-29 17:45:44 +00:00
nma Deprecate NMA node prior to deletion 2018-06-02 13:41:22 +01:00
notify A whole bunch of whitespace linting - no functional changes 2019-08-11 13:37:15 +01:00
prowl Use latest release of node-prowl (#624) 2020-02-17 22:12:23 +00:00
pushbullet Attempt to mitigate stream server connect feedback loop 2020-10-13 16:27:30 -05:00
pusher update pusher nodes to later api 2017-08-27 14:00:20 +01:00
pushover Fix not shown error (#692) 2020-09-27 12:57:09 +01:00
twilio bump email, feed parser, twilio, sqlite, rbe packages 2018-03-29 09:34:31 +01:00
twitter bump sentiment, rbe, email, feedparser, twitter, tail nodes 2019-12-05 21:36:59 +00:00
xmpp bump xmpp node package version 2020-07-16 10:15:49 +01:00