You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mohit Anchlia <mo...@gmail.com> on 2011/01/06 23:58:41 UTC

Simple Question about reading http transmission using mod_jk

We are using mod_jk. My question is when apache receives a request
with http payload does it first read the entire payload and then
transfers it to tomcat or does it just sends the handle to the stream
and then tomcat reads from it. It's little confusing.

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


Re: Simple Question about reading http transmission using mod_jk

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mohit,

On 1/7/2011 2:54 PM, Mohit Anchlia wrote:
> I read through it and based on how I interpret that section is that it
> buffers some data and streams the remaining data if it wasn't
> completely transferred to server and server asks for it (GET_BODY). Am
> I reading it correctly? I know you will correct me :)

I believe the request will be buffered (and stall in mod_jk) until all
headers have been received from the client. After that, all is
streaming, though it might be buffered using ajp_packet_size so mod_jk
always waits for ajp_packet_size bytes (or EOF) before sending to the
backend.

The mod_jk heavy hitters on the list will have to comment.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0nd8QACgkQ9CaO5/Lv0PDAbgCeKeLW1ljr3aFZtzJx5T0LuS3R
Nr8An30UTjEalONkEx8vBLRoXNoGNACz
=4uDE
-----END PGP SIGNATURE-----

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


Re: Simple Question about reading http transmission using mod_jk

Posted by Mohit Anchlia <mo...@gmail.com>.
On Fri, Jan 7, 2011 at 7:22 AM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chuck,
>
> On 1/6/2011 6:01 PM, Caldarale, Charles R wrote:
>>> From: Mohit Anchlia [mailto:mohitanchlia@gmail.com]
>>> Subject: Simple Question about reading http transmission using mod_jk
>>
>>> does it just sends the handle to the stream and then tomcat
>>> reads from it. It's little confusing.
>>
>> Think about it: the connection between httpd and Tomcat is a comm
>> link; how could httpd give Tomcat a handle when Tomcat may well be
>> running on a completely different system?
>
> There's a legitimate questions hidden in this one: does mod_jk work on a
> streaming model or a buffering model?
>
> To answer /that/ question, one need only read
> http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html in the section
> "overview of the protocol" (hint to the OP).
>

I read through it and based on how I interpret that section is that it
buffers some data and streams the remaining data if it wasn't
completely transferred to server and server asks for it (GET_BODY). Am
I reading it correctly? I know you will correct me :)

> If the client (mod_jk) and the server (Tomcat) are on the same machine
> (localhost), then any respectable TCP/IP stack significantly optimizes
> such communication by playing wonderful shared memory tricks that
> increase performance significantly.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk0nL7wACgkQ9CaO5/Lv0PDy6gCgiKGPKiQnI/ytBQV0WY1ucvlM
> ngQAn1AkD4MIwVfIfwlBoZhE/wv4XG0p
> =TTvI
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Simple Question about reading http transmission using mod_jk

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 1/6/2011 6:01 PM, Caldarale, Charles R wrote:
>> From: Mohit Anchlia [mailto:mohitanchlia@gmail.com] 
>> Subject: Simple Question about reading http transmission using mod_jk
> 
>> does it just sends the handle to the stream and then tomcat 
>> reads from it. It's little confusing.
> 
> Think about it: the connection between httpd and Tomcat is a comm
> link; how could httpd give Tomcat a handle when Tomcat may well be
> running on a completely different system?

There's a legitimate questions hidden in this one: does mod_jk work on a
streaming model or a buffering model?

To answer /that/ question, one need only read
http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html in the section
"overview of the protocol" (hint to the OP).

If the client (mod_jk) and the server (Tomcat) are on the same machine
(localhost), then any respectable TCP/IP stack significantly optimizes
such communication by playing wonderful shared memory tricks that
increase performance significantly.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0nL7wACgkQ9CaO5/Lv0PDy6gCgiKGPKiQnI/ytBQV0WY1ucvlM
ngQAn1AkD4MIwVfIfwlBoZhE/wv4XG0p
=TTvI
-----END PGP SIGNATURE-----

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


RE: Simple Question about reading http transmission using mod_jk

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mohit Anchlia [mailto:mohitanchlia@gmail.com] 
> Subject: Simple Question about reading http transmission using mod_jk

> does it just sends the handle to the stream and then tomcat 
> reads from it. It's little confusing.

Think about it: the connection between httpd and Tomcat is a comm link; how could httpd give Tomcat a handle when Tomcat may well be running on a completely different system?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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