3 ms·
> there is no good reason to change the URL unless the URL is excessively coupled to the implementation. Here's one: It provides an easy means of making a sys
by vidarh 14y ago
> there is no good reason to change the URL unless the URL is excessively coupled to the implementation.
Here's one: It provides an easy means of making a system more resilient and scalable, by allowing the implementation to tell you "now go talk to this cluster over here" instead of using e.g. anycast (which is complicated) or still being dependent on your main load balancers.
Now, you can do that "wholesale" for the whole application. E.g. Yahoo Mail will redirect you to a specific mail cluster on login. But indirection on the resource level gives you more flexibility.
The URL might in other words be user specific, or even dependent on other factors such as which access rights the user have, or what service level they've paid for.
You can of course do that by encoding it in your client app. But then you will need to duplicate it, since you'll need to authorize the access on the server side for enforcement too, instead of encoding the information in some sort of policy on the server side that can both be used to generate the right links, and authorize access from a single source (of course you can do this to generate a custom client for each user login too, at the cost of blowing all your caching and CDN benefits out of the water).