using short-term connection and locking for routing and purging to avoid startup race conditions