[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Apache using SCTP streams
From:       Preethi Natarajan <nataraja () cis ! udel ! edu>
Date:       2005-10-25 13:36:34
Message-ID: Pine.GSO.4.62.0510250925370.9746 () stimpy ! eecis ! udel ! edu
[Download RAW message or body]

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).

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

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 recv) in a heap bucket and the caller takes
the responsibility of retrieving this. (apr_buckets_socket.c, 
apr_brigade.c,
core_input_filter - core.c).
o core_input_filter stores the stream id in a field in the core_net_rec,
which is used by core_output_filter 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic