Problem I have a imgproxy server instance to resize cloud image on-demand using signed url then saving response cache to disk. To the day I want to move to another domain point to another server instance, then I remember the last time I changed immediately to new domain, my websites lost many images because it needs to resize all the images in a short period of time (my server is crash). So this time, I need another strategy :) Probability First try : random (looks okay) $is_new = rand(1, 4) == 1; $domain = $is_new ? 'new_domain' : 'old_domain'; This strategy looks okay but it has loophole when you have high traffic websites.