SYSTEM AND METHOD OF HANDLING REQUESTS IN A MULTI-HOMED REVERSE PROXY
Cloud service providers provide resources on a plurality of hosts some of which furthermore reside in different domains. An enhanced Reverse Proxy server is described which is configured to access hosts of multiple domains, handling client requests transparently. A request from a client to any of the supported service provider target hosts is addressed to a path in the domain of the reverse proxy server, and is formatted to include the target host domain coded as a short form name which is inserted in the path component of the request. Arguments in JavaScript calls of the response from the target host to the client are modified to ensure that future JavaScript operations generate similarly formatted requests. The enhanced Reverse Proxy translates Universal Resource Locators (URLs) of traffic between hosts of the service provider and the client in both directions accordingly.
1 . A method for providing a resource from one of a plurality of service provider hosts to a client device through a reverse proxy computer, comprising:
employing at least one processor for:
receiving a request from the client device in the reverse proxy computer, the request including a header comprised of:
a domain name of the reverse proxy computer;
a short form domain name representing a selected service provider domain (domain);
a short form host name representing a selected service provider host (host) in the t selected domain; and
a path name for locating the resource on the host;
translating the short form domain name into a domain name of the host;
translating the short form host name into a host name of the host; and
generating a modified request for transmission to the server provider host, the modified request including:
the host name, the domain name, and the path name.
2 . The method of claim 1 , wherein the short form domain name is an alphanumeric string preceded by a forward slash character (“/”), and the short form host name is another alphanumeric string preceded by another forward slash character (“/”).
3 . The method of claim 1 , further comprising:
modifying a document, received in the reverse proxy from the host computer, into a modified document, including:
finding a reference to the domain name of the host in the document; and
replacing the reference to the domain name of the host, with the domain name of the reverse proxy, followed by a forward slash character (“/”) and the short form name of the host;
transmitting the modified document to the client device.
4 . The method of claim 1 , wherein the request from the client device is a Hypertext Transfer Protocol (HTTP) GET message.
5 . The reverse proxy computer of claim 1 , wherein the request from the client device is contained in a Hypertext Transfer Protocol (HTTP) POST message.
6 . The method of claim 3 , wherein the document is a Hypertext Markup Language (HTML) document.
7 . The method of claim 6 , further comprising:
finding within the document a subroutine call having as arguments a Universal Resource Locator (URL) of one of the plurality of the service provider hosts and a path name; and
replacing said subroutine call with a modified subroutine call, comprising:
replacing said URL with the URL of the reverse proxy; and
generating a modified path name by inserting another forward slash character (“1”) followed by the short form name of said one of the plurality of the service provider hosts in front of the path name.
8 . The method of claim 7 , further comprising repeating the steps finding and replacing said subroutine for all subroutine calls in the document.
9 . The method of claim 7 , wherein the subroutine call is a JavaScript function call.
10 . The method of claim 1 , further comprising:
receiving a request from the client in the reverse proxy, the request including a header which does not correspond to any pattern found in a configuration file of the reverse proxy;
resolving the request by performing the following steps until the selected domain and the selected host for obtaining the resource is determined, including:
searching a short form name in the header and translating the short form name into the selected domain name, and
provided said short form name is found in the configuration file, searching a path name in a content paths definitions file of the reverse proxy to determine the selected host, provided the path name is found in the content paths definitions file, thereby finding the selected domain and the selected host; and
generating a modified request for transmission to the server, the modified request including the selected domain name, the selected host name and the path name, provided the selected domain and the selected host have been determined.
11 . The method of claim 10 , wherein the resolving further comprises determining both the selected domain and the selected host from a referrer URL that is located in the request, thereby finding the selected domain and the selected host.
12 . The method of claim 11 , the resolving further comprises using a home domain of the service provider as the selected domain and a world wide web (www) server as the selected host, thereby determining the selected domain and the selected host.
13 . A reverse proxy computer for providing a resource from one of a plurality of service provider hosts to a client device, the reverse proxy computer comprising:
a processor; and
a memory having computer readable instructions stored thereon, causing the processor to:
receive a request from the client device in the reverse proxy computer, the request including a header comprised of:
a domain name of the reverse proxy computer;
a short form domain name representing a selected service provider domain (domain);
a short form host name representing a selected service provider host (host) in the selected domain; and
a path name for locating the resource on the host;
translate the short form domain name into a domain name of the host;
translate the short form host name into a host name of the host; and
generate a modified request for transmission to a service provider, the modified request including:
the host name, the domain name, and the path name.
14 . The reverse proxy computer of claim 13 , wherein the short form domain name is an alphanumeric string preceded by a forward slash character (“/”), and the short form host name is another alphanumeric string preceded by another forward slash character (“/”).
15 . The reverse proxy computer of claim 13 , further comprising computer readable instructions stored in the memory, causing the processor to:
modify a document, received in the reverse proxy from the host computer, into a modified document, including:
finding a reference to the domain name of the host in the document; and
replacing the reference to the domain name of the host, with the domain name of the reverse proxy, followed by a forward slash character (“/”) and the short form name of the host;
transmit the modified document to the client device.
16 . The reverse proxy computer of claim 13 , wherein the request from the client device is a Hypertext Transfer Protocol (HTTP) GET message.
17 . The reverse proxy computer of claim 13 , wherein the request from the client device is contained in a Hypertext Transfer Protocol (HTTP) POST message.
18 . The reverse proxy computer of claim 15 , wherein the document is a Hypertext Markup Language (HTML) document.
19 . The reverse proxy computer of claim 15 , wherein the document is an Extensible Markup Language (XML) document.
20 . The reverse proxy computer of claim 15 , wherein the document is a JavaScript Object Notation (JSON) document.
21 . The reverse proxy computer of claim 18 , further comprising computer readable instructions stored in the memory, causing the processor to:
find within the document a subroutine call having as arguments a Universal Resource Locator (URL) of one of the plurality of the service provider hosts and a path name; and
replace said subroutine call with a modified subroutine call, including:
replacing said URL with the URL of the reverse proxy; and
generating a modified path name by inserting another forward slash character followed by the short form name of said one of the plurality of the service provider hosts in front of the path name.
22 . The reverse proxy computer of claim 21 , wherein the subroutine call is a JavaScript function call.
23 . A reverse proxy computer for providing a resource from one of a plurality of service provider hosts to a client device, the reverse proxy computer comprising:
a processor;
a memory having computer readable instructions stored thereon for execution by the processor, forming:
a forward Universal Resource Locator (URL) translator module having instructions for:
receiving a request from the client device in the reverse proxy computer, the request including a header comprised of:
a domain name of the reverse proxy computer;
a short form domain name representing a selected service provider domain (domain);
a short form host name representing a selected service provider host (host) in the selected domain; and
a path name for locating the resource on the host;
translating the short form domain name into a domain name of the host;
translating the short form host name into a host name of the host; and
generating a modified request for transmission to the server provider host;
the modified request including:
the host name, the domain name, and the path name.
24 . The reverse proxy computer of claim 23 , wherein the short form domain name is an alphanumeric string preceded by a forward slash character (“/”), and the short form host name is another alphanumeric string preceded by another forward slash character.
25 . The reverse proxy computer of claim 23 , further comprising a content modifier module having computer readable instructions stored in the memory for:
modifying a document, received in the reverse proxy from the host computer, into a modified document, including:
finding a reference to the domain name of the host in the document; and
replacing the reference to the domain name of the host, with the domain name of the reverse proxy, followed by a forward slash character (“/”) and the short form name of the host;
transmitting the modified document to the client device.
26 . The reverse proxy computer of claim 23 , wherein the request from the client is a Hypertext Transfer Protocol (HTTP) GET message.
27 . The reverse proxy computer of claim 23 , wherein the request from the client is contained in a Hypertext Transfer Protocol (HTTP) POST message.
28 . The reverse proxy computer of claim 25 , wherein the document is a Hypertext Markup Language (HTML) document.
29 . The reverse proxy computer of claim 28 , the content modifier module further having instructions for:
finding within the document a subroutine call having as arguments a Universal Resource Locator (URL) of one of the plurality of the service provider hosts and a path name; and
replacing said subroutine call with a modified subroutine call by:
replacing said URL with the URL of the reverse proxy; and
generating a modified path name by inserting another forward slash character followed by the short form name of said one of the plurality of the service provider hosts in front of the path name.
30 . The reverse proxy computer of claim 29 , wherein the subroutine call is a JavaScript function call.
31 . The reverse proxy computer of claim 23 , the forward URL translator module further having instructions for:
receiving a request from the client in the reverse proxy, the request including a header which does not correspond to any pattern found in a configuration file of the reverse proxy;
resolving the request by performing the following steps until the selected domain and the selected host for obtaining the resource is determined, including:
searching a short form name in the header and translating the short form name into the selected domain name, and
provided said short form name is found in the configuration file,
searching a path name in a content paths definitions file of the reverse proxy to determine the selected host, provided the path name is found in the content paths definitions file, thereby finding the selected domain and the selected host; and
generating a modified request for transmission to the server, the modified request including the selected domain name, the selected host name and the path name, provided the selected domain and the selected host have been determined.
32 . The reverse proxy computer of claim 31 , the forward URL translator module further having instructions for determining both the selected domain and the selected host from a referrer URL that is located in the request, thereby finding the selected domain and the selected host.
33 . The reverse proxy computer of claim 32 , the forward URL translator module further having instructions for using a home domain of the service provider as the selected domain and a world wide web (www) server as the selected host, thereby determining the selected domain and the selected host.