Skip to content

Throttle wg_exit locally when balance is low.  #930

@jkilpatr

Description

@jkilpatr

One of the major user complains is that when a users balance is low it takes a long time for them to experience enforcement and then once they add funds it can be difficult for the actual payment to be made by the router (because their neighbor has throttled the connection, resulting in poor quality, which is what is causing the users to pay).

We should restructure this so that a router first throttles itself when it's balance becomes low. Becuase this will provide quick feedback to the user, and then if they add funds in any reasonable amount of time an instant resolution to 'enforcement' because their neighbor never had to take any action.

We already have a function to check if we have outstanding payments higher than the current balance in debt keeper, when that is true exit_manager should setup a different qdisc to throttle traffic on the wg_exit interface. We'll need to throttle ingress rather than egress, but modern cake has an easy way to do that by specifying 'ingress' when creating the qdisc.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions