Here's my first-pass at a very basic connection scheduler:
There are two connection queues: eager and lazy (think of better names). All peers-to-be-dialed start in the eager queue and one peer is dialed every n seconds. If a connection attempt fails, the peer is moved to the lazy queue. One peer from the lazy queue is dialed every n x 10 seconds (or similar). If a connection attempt succeeds, the peer is moved back to the eager queue.
Combine (address, public_key) data from replication.toml with connection data passed via --connect CLI option
Here's my first-pass at a very basic connection scheduler:
There are two connection queues:
eager
andlazy
(think of better names). All peers-to-be-dialed start in theeager
queue and one peer is dialed everyn
seconds. If a connection attempt fails, the peer is moved to thelazy
queue. One peer from thelazy
queue is dialed everyn x 10
seconds (or similar). If a connection attempt succeeds, the peer is moved back to theeager
queue.(address, public_key)
data fromreplication.toml
with connection data passed via--connect
CLI option