0

We are building a web application where we are following SAAS model using RESTful services for internal communication between modules.

There is a scenario where we want to resolve the host name of the server for RESTful service through one of the parameter value passed in the URL of service. In our architecture, each server instance wants to provide it's service for a set of values of a particular parameter in the URL.

In a dynamic environment, such responsibility can change from server to server. How can the client resolve dynamically which IP address it should contact to get a particular request served? Is there some sort of URL service registration and resolution facility similar to DNS, which can take into consideration some metadata like parameter's value in the resolution procedure? Any links to some existing solution or ideas for implementing such thing are welcome.

Atharva
  • 6,711
  • 5
  • 31
  • 39
  • 1
    You should use a reverse-proxy as front-end of your service (all worker servers). It must be capable of directing request to appropriate back-end server based on some knowledge about application-level semantics in URLs, including parameters. If it helps, I can post the answer, but I can't provide much details on implementation except for I did similar thing on Delphi. – Stan Nov 12 '12 at 15:37
  • Thanks for pointing me to the term reverse proxy. I was in plan to implement some sort of "query handler" module, good that you gave me an impressive real world conceptual name for that : ) – Atharva Nov 12 '12 at 16:16

1 Answers1

1

You can use a reverse-proxy as front-end of your service (all worker servers). It must be capable of directing request to appropriate back-end server based on some knowledge about application-level semantics in URLs, including parameters.

Here is the list of the most commonly used reverse-proxies:

The main thing to note is that these general purpose products may not meet your needs well, in the sense of how flexible they can be congifured. This is why I wrote a custom reverse-proxy for a similar web-service myself (the project was implemented in Delphi, and I can provide some further details on this if needed).

Stan
  • 8,683
  • 9
  • 58
  • 102