You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Anil Jangam <an...@gmail.com> on 2013/03/06 06:25:46 UTC

[users@httpd] Apache Forward Proxy with App Server Integration.

Hi,

I am trying to understand how can I setup a Apache httpd instance with
proxy functionality addition to an integration of a Application Server.

I am looking for is that Proxy should be able to forward the HTTP Requests
and Response messages coming from client to this Application Server. At the
same time, any HTTP Responses coming from Origin server should also be able
to route to Application Server if any processing is required. The network
diagram looks like below.

+-------+
| Orig |
 | Server|
+-------+
  |  |
  |  |
 +-------+ +-------+
|Proxy |------>|App |
 |Server |<------|Server |
 +-------+ +-------+
  |  |
  |  |
+-------+
 |Client |
| |
 +-------+

Technically speaking, I can as well implement the App Server logic in the
httpd as another module, but I do not want to do that. I want to leverage
the flexibility of Java, and this App Server is essentially is a Tomcat
instance.

What I learned so far is we can use mod_proxy, mod_jk, mod_proxy_ajp etc.
However, these combinations are either providing the functionality of a
load balancer or reverse proxy functionality.

As stated above, my requirement is to intercept both the HTTP traffic path,
and have them processed by App Server via Proxy. Can you please provide me
the solution options for this requirement?

Please also point me to any references/tutorials/how-to guides if available.

Thanks,
/anil.

Re: [users@httpd] Apache Forward Proxy with App Server Integration.

Posted by Anil J <an...@gmail.com>.
Hello,

After some more search, I found this reference to ICAP protocol, which
exactly is the use case I am trying to solve.

Please see: http://tools.ietf.org/html/rfc3507#section-3.2

In my case, I can not use ICAP client as the server I've to interact with
does not support ICAP; it is HTTP based.

So in this case, I was trying to understand how existing modules -
mod_proxy & mod_proxy_http -  functions in this context. Will they serve my
purpose if I have to use HTTP interface to connect with an external server.

/anil.


On Thu, Mar 7, 2013 at 12:50 PM, Anil J <an...@gmail.com> wrote:

> Thanks Jim,
>
> I did listen to some of the videos (
> http://www.youtube.com/watch?v=yNuuoQLw0tA) available on the net before
> writing to the list. However, I was not completely sure if it the solution
> to my problem.
>
> I have given some more elaboration to my problem on the list (its another
> email). Can you please check it one more time?
>
> Thanks,
> Anil.
>
> On Thu, Mar 7, 2013 at 10:16 AM, Jim Jagielski <ji...@jagunet.com> wrote:
>
>> There are a number of webinars and preso's on the reverse proxy capability
>> of Apache... I would suggest you review those to get a basic
>> understanding, at which point we'd be better able to answer
>> your questions.
>>
>> On Mar 6, 2013, at 10:16 PM, Igor Cicimov <ic...@gmail.com> wrote:
>>
>> >
>> >
>> >
>> > On Thu, Mar 7, 2013 at 10:53 AM, Anil J <an...@gmail.com>
>> wrote:
>> > Hello Jim,
>> >
>> > Note that Proxy will also be communicating with Origin Server (OS)
>> where the content is going to come from. At AS, I am just expecting to
>> process the content received from OS. So in this context, I am looking at
>> this AS as an extension of Proxy server.
>> >
>> > Mind to explain what exactly this Origin Server is? Another apache or
>> something else? On the same box with the proxy or a different one? What
>> kind of application are we talking about here?
>> >
>> >
>> > On other words, theoretically I can implement a module and put all the
>> logic in the AS, but I can't do that. So I offloading the task to AS. So I
>> need this module in between which will talk to the AS (HTTP Servlet on the
>> Tomcat).
>> >
>> > Once the message is processed by AS, I can then send it either to OS or
>> to Client depending on the type of message. I am not sure  how does
>> mod_proxy and mod_proxy_http works in this scenario.
>> >
>> > What do you mean by message? Is it a http client request or something
>> else? Maybe explaining in details what are you trying to build will make it
>> possible for someone to give you more specific help.
>> >
>> >
>> > I am new to the Apache HTTP architecture. So having all the basic
>> doubts.
>> >
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>

Re: [users@httpd] Apache Forward Proxy with App Server Integration.

Posted by Anil J <an...@gmail.com>.
Thanks Jim,

I did listen to some of the videos (
http://www.youtube.com/watch?v=yNuuoQLw0tA) available on the net before
writing to the list. However, I was not completely sure if it the solution
to my problem.

I have given some more elaboration to my problem on the list (its another
email). Can you please check it one more time?

Thanks,
Anil.

On Thu, Mar 7, 2013 at 10:16 AM, Jim Jagielski <ji...@jagunet.com> wrote:

> There are a number of webinars and preso's on the reverse proxy capability
> of Apache... I would suggest you review those to get a basic
> understanding, at which point we'd be better able to answer
> your questions.
>
> On Mar 6, 2013, at 10:16 PM, Igor Cicimov <ic...@gmail.com> wrote:
>
> >
> >
> >
> > On Thu, Mar 7, 2013 at 10:53 AM, Anil J <an...@gmail.com> wrote:
> > Hello Jim,
> >
> > Note that Proxy will also be communicating with Origin Server (OS) where
> the content is going to come from. At AS, I am just expecting to process
> the content received from OS. So in this context, I am looking at this AS
> as an extension of Proxy server.
> >
> > Mind to explain what exactly this Origin Server is? Another apache or
> something else? On the same box with the proxy or a different one? What
> kind of application are we talking about here?
> >
> >
> > On other words, theoretically I can implement a module and put all the
> logic in the AS, but I can't do that. So I offloading the task to AS. So I
> need this module in between which will talk to the AS (HTTP Servlet on the
> Tomcat).
> >
> > Once the message is processed by AS, I can then send it either to OS or
> to Client depending on the type of message. I am not sure  how does
> mod_proxy and mod_proxy_http works in this scenario.
> >
> > What do you mean by message? Is it a http client request or something
> else? Maybe explaining in details what are you trying to build will make it
> possible for someone to give you more specific help.
> >
> >
> > I am new to the Apache HTTP architecture. So having all the basic doubts.
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache Forward Proxy with App Server Integration.

Posted by Jim Jagielski <ji...@jaguNET.com>.
There are a number of webinars and preso's on the reverse proxy capability
of Apache... I would suggest you review those to get a basic
understanding, at which point we'd be better able to answer
your questions.

On Mar 6, 2013, at 10:16 PM, Igor Cicimov <ic...@gmail.com> wrote:

> 
> 
> 
> On Thu, Mar 7, 2013 at 10:53 AM, Anil J <an...@gmail.com> wrote:
> Hello Jim,
> 
> Note that Proxy will also be communicating with Origin Server (OS) where the content is going to come from. At AS, I am just expecting to process the content received from OS. So in this context, I am looking at this AS as an extension of Proxy server. 
> 
> Mind to explain what exactly this Origin Server is? Another apache or something else? On the same box with the proxy or a different one? What kind of application are we talking about here?
>  
> 
> On other words, theoretically I can implement a module and put all the logic in the AS, but I can't do that. So I offloading the task to AS. So I need this module in between which will talk to the AS (HTTP Servlet on the Tomcat). 
> 
> Once the message is processed by AS, I can then send it either to OS or to Client depending on the type of message. I am not sure  how does mod_proxy and mod_proxy_http works in this scenario. 
> 
> What do you mean by message? Is it a http client request or something else? Maybe explaining in details what are you trying to build will make it possible for someone to give you more specific help.
>  
> 
> I am new to the Apache HTTP architecture. So having all the basic doubts. 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Forward Proxy with App Server Integration.

Posted by Anil J <an...@gmail.com>.
Thanks Igor. I have provided comments inline.

On Wed, Mar 6, 2013 at 10:16 PM, Igor Cicimov <ic...@gmail.com> wrote:

>
>
>
> On Thu, Mar 7, 2013 at 10:53 AM, Anil J <an...@gmail.com> wrote:
>
>> Hello Jim,
>>
>> Note that Proxy will also be communicating with Origin Server (OS) where
>> the content is going to come from. At AS, I am just expecting to process
>> the content received from OS. So in this context, I am looking at this AS
>> as an extension of Proxy server.
>>
>
> Mind to explain what exactly this Origin Server is? Another apache or
> something else? On the same box with the proxy or a different one? What
> kind of application are we talking about here?
>

Origin server is my content server, some web site (e.g. www.youtube.com).
All three servers I am talking about Proxy, OS and AS are physically
different servers. Proxy and AS are co-located   The application in the
context is say content filtering or content adaptation. The AS I am taking
about is that server.

>
>
>>
>> On other words, theoretically I can implement a module and put all the
>> logic in the AS, but I can't do that. So I offloading the task to AS. So I
>> need this module in between which will talk to the AS (HTTP Servlet on the
>> Tomcat).
>>
>> Once the message is processed by AS, I can then send it either to OS or
>> to Client depending on the type of message. I am not sure  how does
>> mod_proxy and mod_proxy_http works in this scenario.
>>
>
> What do you mean by message? Is it a http client request or something
> else? Maybe explaining in details what are you trying to build will make it
> possible for someone to give you more specific help.
>

Message is HTTP Request and Response messages. Typically, when I receive
response from www.youtube.com containing a video, I want to transcode it to
suite the requirements of client (e.g. mobile device) so that it can play
it.

Now in this set up, I want to intercept the HTTP response, and send the
content in the response message (e.g. video) to the AS for transcoding.
After the video is transcoded, I will put it back to the Response message
that is held at Proxy, and send it back to Client.

So I am tryig to understand, what interface I should be using between Proxy
server and AS. Is there any module which I can use or do I have to write my
own module to build the above behavior in Proxy.

Hope this is more clear.


>
>>
>> I am new to the Apache HTTP architecture. So having all the basic doubts.
>>
>
>
>
>
>

Re: [users@httpd] Apache Forward Proxy with App Server Integration.

Posted by Igor Cicimov <ic...@gmail.com>.
On Thu, Mar 7, 2013 at 10:53 AM, Anil J <an...@gmail.com> wrote:

> Hello Jim,
>
> Note that Proxy will also be communicating with Origin Server (OS) where
> the content is going to come from. At AS, I am just expecting to process
> the content received from OS. So in this context, I am looking at this AS
> as an extension of Proxy server.
>

Mind to explain what exactly this Origin Server is? Another apache or
something else? On the same box with the proxy or a different one? What
kind of application are we talking about here?


>
> On other words, theoretically I can implement a module and put all the
> logic in the AS, but I can't do that. So I offloading the task to AS. So I
> need this module in between which will talk to the AS (HTTP Servlet on the
> Tomcat).
>
> Once the message is processed by AS, I can then send it either to OS or to
> Client depending on the type of message. I am not sure  how does mod_proxy
> and mod_proxy_http works in this scenario.
>

What do you mean by message? Is it a http client request or something else?
Maybe explaining in details what are you trying to build will make it
possible for someone to give you more specific help.


>
> I am new to the Apache HTTP architecture. So having all the basic doubts.
>

Re: [users@httpd] Apache Forward Proxy with App Server Integration.

Posted by Anil J <an...@gmail.com>.
Hello Jim,

Note that Proxy will also be communicating with Origin Server (OS) where
the content is going to come from. At AS, I am just expecting to process
the content received from OS. So in this context, I am looking at this AS
as an extension of Proxy server.

On other words, theoretically I can implement a module and put all the
logic in the AS, but I can't do that. So I offloading the task to AS. So I
need this module in between which will talk to the AS (HTTP Servlet on the
Tomcat).

Once the message is processed by AS, I can then send it either to OS or to
Client depending on the type of message. I am not sure  how does mod_proxy
and mod_proxy_http works in this scenario.

I am new to the Apache HTTP architecture. So having all the basic doubts.

/anil.


On Wed, Mar 6, 2013 at 3:17 PM, Jim Jagielski <ji...@jagunet.com> wrote:

> > Hello Nick,
> >
> > Thanks for your reply. I am trying to understand what could be the
> interface between Proxy Server (PS) and App Server (AS) given that App
> Server is a Tomcat based HTTP Servlet. Proxy Server is going to be a
> mod_xxx written in C.
> >
> > So my question is, what interface will be used between PS and AS? I read
> about mod_proxy, mod_proxy_ajp, but they mainly provide the load balancer
> or reverse proxy functionality. I want this PS to route the HTTP traffic
> between Client and OS to this AS for processing.
> >
>
> Anil,
>
> The protocol used between PS and AS can either be HTTP
> or AJP, depending on what listener you have setup on Tomcat.
> Obviously, if you are using the AJP listener on AS, you'd
> need to ProxyPass ajp; if using HTTP, then it would be
> ProxyPass http:. Proxying ajp requires mod_proxy_ajp and
> proxying http requires mod_proxy_http
>
> > I hope this makes my question more clear. Sorry for it not being very
> specific earlier.
> >
> > Thanks,
> >
> > /anil.
> >
> > On Wed, Mar 6, 2013 at 1:28 PM, Nick Kew <ni...@webthing.com> wrote:
> >
> > On 6 Mar 2013, at 18:11, Anil J wrote:
> >
> > > Hi, can anyone comment on this?
> >
> > You haven't told us where the problem is.  The things you describe
> > are just standard applications.
> >
> > --
> > Nick Kew
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache Forward Proxy with App Server Integration.

Posted by Jim Jagielski <ji...@jaguNET.com>.
> Hello Nick,
> 
> Thanks for your reply. I am trying to understand what could be the interface between Proxy Server (PS) and App Server (AS) given that App Server is a Tomcat based HTTP Servlet. Proxy Server is going to be a mod_xxx written in C. 
> 
> So my question is, what interface will be used between PS and AS? I read about mod_proxy, mod_proxy_ajp, but they mainly provide the load balancer or reverse proxy functionality. I want this PS to route the HTTP traffic between Client and OS to this AS for processing. 
> 

Anil,

The protocol used between PS and AS can either be HTTP
or AJP, depending on what listener you have setup on Tomcat.
Obviously, if you are using the AJP listener on AS, you'd
need to ProxyPass ajp; if using HTTP, then it would be
ProxyPass http:. Proxying ajp requires mod_proxy_ajp and
proxying http requires mod_proxy_http

> I hope this makes my question more clear. Sorry for it not being very specific earlier. 
> 
> Thanks,
> 
> /anil.
> 
> On Wed, Mar 6, 2013 at 1:28 PM, Nick Kew <ni...@webthing.com> wrote:
> 
> On 6 Mar 2013, at 18:11, Anil J wrote:
> 
> > Hi, can anyone comment on this?
> 
> You haven't told us where the problem is.  The things you describe
> are just standard applications.
> 
> --
> Nick Kew
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache Forward Proxy with App Server Integration.

Posted by Anil J <an...@gmail.com>.
Hello Nick,

Thanks for your reply. I am trying to understand what could be the
interface between Proxy Server (PS) and App Server (AS) given that App
Server is a Tomcat based HTTP Servlet. Proxy Server is going to be a
mod_xxx written in C.

So my question is, what interface will be used between PS and AS? I read
about mod_proxy, mod_proxy_ajp, but they mainly provide the load balancer
or reverse proxy functionality. I want this PS to route the HTTP traffic
between Client and OS to this AS for processing.

I hope this makes my question more clear. Sorry for it not being very
specific earlier.

Thanks,

/anil.

On Wed, Mar 6, 2013 at 1:28 PM, Nick Kew <ni...@webthing.com> wrote:

>
> On 6 Mar 2013, at 18:11, Anil J wrote:
>
> > Hi, can anyone comment on this?
>
> You haven't told us where the problem is.  The things you describe
> are just standard applications.
>
> --
> Nick Kew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Apache Forward Proxy with App Server Integration.

Posted by Nick Kew <ni...@webthing.com>.
On 6 Mar 2013, at 18:11, Anil J wrote:

> Hi, can anyone comment on this?

You haven't told us where the problem is.  The things you describe
are just standard applications.

-- 
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache Forward Proxy with App Server Integration.

Posted by Anil J <an...@gmail.com>.
Hi, can anyone comment on this?

/anil.

On Wed, Mar 6, 2013 at 12:25 AM, Anil Jangam <an...@gmail.com>wrote:

> Hi,
>
> I am trying to understand how can I setup a Apache httpd instance with
> proxy functionality addition to an integration of a Application Server.
>
> I am looking for is that Proxy should be able to forward the HTTP Requests
> and Response messages coming from client to this Application Server. At the
> same time, any HTTP Responses coming from Origin server should also be able
> to route to Application Server if any processing is required. The network
> diagram looks like below.
>
> +-------+
> | Orig |
>  | Server|
> +-------+
>   |  |
>   |  |
>  +-------+ +-------+
> |Proxy |------>|App |
>  |Server |<------|Server |
>  +-------+ +-------+
>   |  |
>   |  |
> +-------+
>  |Client |
> | |
>  +-------+
>
> Technically speaking, I can as well implement the App Server logic in the
> httpd as another module, but I do not want to do that. I want to leverage
> the flexibility of Java, and this App Server is essentially is a Tomcat
> instance.
>
> What I learned so far is we can use mod_proxy, mod_jk, mod_proxy_ajp etc.
> However, these combinations are either providing the functionality of a
> load balancer or reverse proxy functionality.
>
> As stated above, my requirement is to intercept both the HTTP traffic
> path, and have them processed by App Server via Proxy. Can you please
> provide me the solution options for this requirement?
>
> Please also point me to any references/tutorials/how-to guides if
> available.
>
> Thanks,
> /anil.
>
>
>