Implemented dynamic instance_url.

It is still not correctly mounted with max_retries=MAX_RETRIES,
otherwise it works.