-
-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Related to #649 (comment). The current flow works fine for reporting "it works" case, but wouldn't work for reporting "it no longer works" case (if a request times out and the IP was previously registered, it won't be removed).
Here's an idea for an alternative approach that fixes this and also seems more reliable than what we do now:
- A probe makes a POST request to our API endpoint. There is no token in the request. Instead, there's a token + IP in the response. The API doesn't add the alt IP at this step, it simply stores the token + IP pair in redis.
- The probe then reports via its existing websocket connection that either a) the IP worked, and sends the token to prove it b) the IP didn't work.
- The API adds/removes the IP based on the WebSocket message.
This way, we also don't need any "synced list remote updates" because the writes are always done by the node that owns the probe, and step 1 doesn't need probe info at all.
alexey-yarmosh
Metadata
Metadata
Assignees
Labels
No labels