caas-team/sparrow

Feature: Automatic Central Registration of Instances

y-eight opened this issue · 0 comments

Is there an existing feature request for this?

  • I have searched the existing issues

Problem Description

Sparrow instance can be spawned automatically. Other instances need to be configured (runtime config for checks) to know about this newly spawned instance.

Solution Description

Not 100% defined yet. A list needs to be available with all running sparrow instances incl. domain names. The checks should perform health & latency checks to all instances.

After a brainstorming session we came to the following conclusion:

  • Use git to manage a centralized targets configuration, which the Sparrow will read & update (registration & liveness update) periodically. Those will serve as a list of globalTargets for each Check.
    • This will eventually make the Sparrow only able to do DNS, TCP, UDP, ICMP, gRPC, HTTP protocols
    • There shouldn't be any merge conflicts, if each sparrow pushes a file with its health report/ registration info
    • possible format {"url": "pipapo", "lastSeen": "goland timestamp UTC"}
    • The pull & push procedure should be resilient & not deadlock the Sparrow. It should just fail after a few retries and try again later.
  • The Sparrow will either pass the globalTargets periodically down to the Check instances, OR the Check instances will get the globalTargets from the Sparrow themselves (possibly before running the check).
  • The Sparow should decide whether a globalTarget is healthy/not and remove it from the in-memory list it has.
  • The repository with the global targets should be maintained by a simple pipeline, that removes old targets, which haven't updated their registration in a while.
  • The Check instances should still define extraTargets, to add more targets to themselves.

Who can address the issue?

Devs

Additional Context

No response