Skip to content

detect half-open reverse proxy workers with control message ack - #3856

Open
Qusic wants to merge 3 commits into
v2fly:masterfrom
Qusic:fix/portal-health-check
Open

Qusic wants to merge 3 commits into
v2fly:masterfrom
Qusic:fix/portal-health-check

Conversation

@Qusic

@Qusic Qusic commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

recently i have been debugging an issue with reverse on an unreliable network. some requests stall without reaching the final destination on bridge side. the analysis shows that sometimes the bridge starts a new reverse worker when the old one is lost. however the portal continues selecting the old half-open worker even if there's a new worker in healthy state.

the first commit is a in-process unit test repro which fails on master but passes with the proposed fix. half open connection simulated by dropping all written data.

the second commit is my proposed fix to add acknowledgement message for the existing control message. it only enforces ack timeout check after at least one valid ack is received, which helps keep compatibility with older version deployment, at the cost of not being able to detect issues happening very early and even before the first ack.

and the third commit is just tests added for this change. made them separate for easier review for the fix commit.

im open to discuss what is the desired solution so feel free to debug the test failure yourself. i also have a minimal repro python script which involves 2 real v2ray instances running locally but i suppose that's more difficult to debug than this. i can share that too if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant