Skip to content

Queue an aged exit identity for rotation once nothing is using it - #17

Open
dipu-bd wants to merge 1 commit into
mainfrom
claude/tor-rotation-scheduling-venf7r
Open

dipu-bd wants to merge 1 commit into
mainfrom
claude/tor-rotation-scheduling-venf7r

Conversation

@dipu-bd

@dipu-bd dipu-bd commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
  • EXIT_TTL (default 30m) queues an instance for a new circuit once it has
    held one exit identity that long, which is the only thing that pre-empts a
    site quietly scoring an IP: an exit that is unwelcome rather than broken
    never reaches the failure ladder, so the instance keeps it indefinitely.
  • A queued instance rotates only when no session is pinned to it, active or
    idle. The clock must not change the exit IP under a caller that asked to be
    sticky, so EXIT_TTL is a floor on an identity's age and SESSION_TTL is what
    frees an abandoned instance.
  • One rotation per tick, and none while a pool-wide sweep runs: instances all
    start their clocks together at boot, so a batch is exactly what a naive
    sweep would do on the first tick past the TTL.
  • The clock restarts in endRotation, whether the rotation succeeded or not, so
    an attempt against a wedged control port waits another EXIT_TTL rather than
    retrying every tick. Restarts reset it separately, having handed back an
    identity the clock was not measuring.
  • Instances report rotate_pending, and the dashboard tags them "rotate
    queued", so a queue held up by its sessions explains itself.

@dipu-bd
dipu-bd force-pushed the claude/tor-rotation-scheduling-venf7r branch from 1892e8d to 535d271 Compare August 4, 2026 09:45
- EXIT_TTL (default 3h) queues an instance for a new circuit once it has held
  one exit identity that long, which is the only thing that pre-empts a site
  quietly scoring an IP: an exit that is unwelcome rather than broken never
  reaches the failure ladder, so the instance keeps it indefinitely.
- A queued instance rotates only when no session is pinned to it, active or
  idle. The clock must not change the exit IP under a caller that asked to be
  sticky, so EXIT_TTL is a floor on an identity's age and SESSION_TTL is what
  frees an abandoned instance.
- One rotation per tick, and none while a pool-wide sweep runs: instances all
  start their clocks together at boot, so a batch is exactly what a naive
  sweep would do on the first tick past the TTL.
- The clock restarts in endRotation, whether the rotation succeeded or not, so
  an attempt against a wedged control port waits another EXIT_TTL rather than
  retrying every tick. Restarts reset it separately, having handed back an
  identity the clock was not measuring.
- Instances report rotate_pending, and the dashboard tags them "rotate
  queued", so a queue held up by its sessions explains itself.
@dipu-bd
dipu-bd force-pushed the claude/tor-rotation-scheduling-venf7r branch from 535d271 to 31f2821 Compare August 4, 2026 10:00

This branch has not been deployed

No deployments
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.

2 participants