You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Preethi Natarajan <na...@cis.udel.edu> on 2005/10/25 16:14:58 UTC

Apache with SCTP streams.

Hello,

I've been working on this patch to make apr and httpd work with SCTP streams.

Stream Control Transmission Protocol (SCTP - RFC2960) is a transport layer
protocol capable of providing reliable (in-order, no loss, no duplicates,
  no error) message oriented service to application.
Other interesting features of SCTP include multistreaming (many logical pipes
in 1 SCTP association to transfer independent data like web objects without
head of line blocking problem) and multihoming (ability to support more than
1 interface/IP address at a SCTP endpoint).

The idea was to enable httpd to receive HTTP request on a particular SCTP 
stream and send the HTTP response on the same stream. Using different SCTP 
streams for independent objects might improve performance (preventing HOL 
as mentioned above).

apr-0.9.2 included recognition and support for SCTP from Randall Stewart.
I did my changes on top of this.

To give an outline of the implementation with the files involved:

APR:

o I created apr_socket_send_sctp and apr_socket_recv_sctp which take an 
extra parameter - SCTP stream id. The recv function uses recvmsg function 
call and gets the SCTP stream id on which the request came in. Similarly, 
sendmsg call is used in apr_socket_send_sctp (sendrecv.c in 
network_io/unix).
o I didnt want to change the signature of any other 
function so I decided to use buckets to pass the stream id info to and 
fro. The socket bucket read puts the stream id (from socket recv) in a 
heap bucket and the caller takes the responsibility of retrieving this. 
(apr_buckets_socket.c, apr_brigade.c).

HTTPD:

o core_input_filter retrieves and stores the stream id in a field in the 
core_net_rec, which is used by core_output_filter->APR while sending 
response.
o Also, I changed Listen directive to take the transport layer protocol
as an extra argument so that web admin can choose SCTP or TCP.

Currently, I have this patch working for httpd-2.0.55/apr-0.9.6.

Would appreciate any feedback,
Preethi

PS: Should I send this mail to apr dev mailing list as well or will that 
be spamming?

Re: Apache with SCTP streams.

Posted by Preethi Natarajan <na...@cis.udel.edu>.
On Tue, 25 Oct 2005, Ruediger Pluem wrote:

>
> As Joe mentioned in its bugzilla comment, these changes must be done to the trunk
> first. So I would propose the following approach:
>
> 1. Provide your httpd part of the patch as a patch against trunk.
> 2. For the apr part of the patch I would suggest that you check if there is
>   a released version of apr which handles your requirements without further patches.
>   If there is no such released version of apr I guess the next step depends:
>
>     If there is a version which should work (provides all features that you need) but
>     actually does not work, I would regard this as a bug that should be fixed in this
>     apr branch. So you should file an apr bug report including the fix patch.
>
>     If you find no apr version that contains the features you need, I guess the apr
>     patches should be also done against the trunk. I guess this would also require
>     further discussion on the apr dev list.
>

I discussed with APR developers list and :
1. I will patch my changes to APR against the main APR trunk.
2. Given that, I will patch changes to httpd against the trunk.

Hope this is fine. Let me know if otherwise,
Preethi

Re: Apache with SCTP streams.

Posted by Ruediger Pluem <rp...@apache.org>.
On 10/25/2005 04:14 PM, Preethi Natarajan wrote:
> Hello,
> 
> I've been working on this patch to make apr and httpd work with SCTP
> streams.

Thanks for bringing this to the dev list.
Thanks to Joe for making a full stop comment in buzilla to end the discussion there.
For all that are interested in the (short) history on bugzilla:
http://issues.apache.org/bugzilla/show_bug.cgi?id=37202

[..cut..]


> 
> Currently, I have this patch working for httpd-2.0.55/apr-0.9.6.

As Joe mentioned in its bugzilla comment, these changes must be done to the trunk
first. So I would propose the following approach:

1. Provide your httpd part of the patch as a patch against trunk.
2. For the apr part of the patch I would suggest that you check if there is
   a released version of apr which handles your requirements without further patches.
   If there is no such released version of apr I guess the next step depends:

     If there is a version which should work (provides all features that you need) but
     actually does not work, I would regard this as a bug that should be fixed in this
     apr branch. So you should file an apr bug report including the fix patch.

     If you find no apr version that contains the features you need, I guess the apr
     patches should be also done against the trunk. I guess this would also require
     further discussion on the apr dev list.

[..cut..]

Regards

RĂ¼diger