Loading ...
Sorry, an error occurred while loading the content.

19241Re: [rest-discuss] API versioning

Expand Messages
  • Mike Kelly
    Jan 7, 2013
      If you have to do it, you may want to look at versioning using a subdomain i.e:


      that'll let you take advantage of DNS, should you need to split the traffic in the future.

      Cheers,
      M


      On Mon, Jan 7, 2013 at 11:39 PM, erewh0n <keith.hassen@...> wrote:
       

      When versioning an API a common approach is to specify version information in the URI. I'm curious how others have solved (or would solve) this problem from a RESTful perspective. I'm aware of the recommendation to use the content-type header for specifying version information, however I am concerned that routing and load balancing features would suffer. So for example if we versioned an API with api.example.com/orders/v1 and api.example.com/orders/v2, it is straightforward to route requests for v1 to one set of web servers and route requests for v2 to another set of web servers. Facilitating this based on HTTP headers is more complex and requires more "plumbing". This is also true in-code, where URI mapping semantics are first-order concerns for many libraries (e.g. using Web API or ServiceStack, etc, it is straightforward to map URIs to controllers or contracts).

      Anyway, it would be interesting to hear other people's feedback on this issue.

      Thanks.




      --
      Mike

      http://twitter.com/mikekelly85
      http://github.com/mikekelly
      http://linkedin.com/in/mikekelly123
    • Show all 13 messages in this topic