DEV Community

Cover image for Sticky session duration: how long one IP holds, and why
proxymint
proxymint

Posted on Originally published at proxymint.com

Sticky session duration: how long one IP holds, and why

Originally published on proxymint.

Sticky session duration explained: what ends a session early, how to size the timer to the task, a script that measures hold time, and load balancer stickiness.

TL;DR

  • If your IP changed before the timer ran out, the device probably went offline. The timer is only the upper limit, and a home router or a phone on a carrier network can drop at any point, so the real hold time is whatever ends first.
  • Set the timer from your longest step, not from the menu. Time login to logout or cart to confirmation, add margin and round up to the next 5-minute step, which on proxymint goes from 5 to 60 minutes, or sticky while the device stays online.
  • Watch the site's own logout clock too. OWASP's common idle timeouts run 2-5 minutes on high-value apps, so a 60-minute sticky IP can easily outlast the login it was meant to protect.
  • Measure before you plan a big job around it. Sampling the exit IP every 30 seconds on a few ports tells you how many are still on their first IP at 10, 30 and 60 minutes, which beats guessing.

Key takeaways

  • Check the exit IP before the step that matters. One tiny request to an echo endpoint turns a dropped device into a clean retry instead of a forced re-login halfway through a flow.
  • Start each flow on a fresh session. A flow that starts late in a fixed window crosses the boundary, so a new port or session per query or per visit is the easy fix.
  • Pick the shortest window that covers the task. A longer window keeps you on a slow or flagged exit for longer, and it cannot keep the device online anyway.
  • Move identity that must last for days to a static ISP address. Sticky is borrowed from a rotating pool and always ends; tuning the timer will not change that.

Read the full guide on proxymint, with the commands, tables and sources.

Top comments (0)