I want to propose to add sctp network protocol to backend and frontend code.

Light Sctp description:

Sctp is a layer 3 network protocol over ip networks, similar to tcp, udp and 
others. It's message oriented protocol, unlike tcp and udp that are data stream 
oriented, and it ensures that a message reach its destination, as tcp does with 
packets. Each sctp packet can have multiple messages or parts of messages 
inside. It provides multihoming, dinamically bind and unbind network devices 
(eth0, eth1, wifi...), mix ipv4 and ipv6, congestion control algorithms similar 
to tcp, message reliability and administration (message time to live, retries 
on failure...). A connection between server and client is called association.

Sctp support exists in Linux since 2.4+, FreeBSD 7+, Solaris10+ and Cisco, 
Juniper, F5 and others routers. Windows and MacOSX needs (AFAIK) third-party 


Dynamic multihoming, modifiable at run time, don't need aggregate links at OS 
level or shutdown servers/clients for a hardware or topology network change.
Message oriented connection.
Message reliability.
Inmune to SYN floods that affect tcp.
Assimetric multihoming, a client with 4 links(3x 1GbEth + wifi) can connect to 
a server with 1 link (10GbEth).
Metadata connection messages.


Windows and MacOSX needs a third-party drivers.
Can't use TLS, encryption of tls record n depends on previous record. In sctp 
order and reliability of packets is not assured and packet content may change. 
As sctp is message oriented it needs DTLS-SCTP (not in this proposal) where 
encryption of packet n is independent from any other. See RFC 6083
Some network cards and drivers don't support hardware acceleration, cpu does 
crc check/calculation.
Firewalls needs sctp rules.


The tcp code resides in src/backend/libpq/pqcomm.c (unix/windows sockets and 
SSL socket portion) and src/backend/libpq/ip.c (ipv6). Similar in frontend. 
Need new GUCs for sctp configuration, and a way to modify them at runtime.

I don't know how you want it, if you accept this proposal:

a) replicate pqcomm.c replacing tcp code with sctp in a new file pqcommsctp.c 
(full sctp, not compatibility tcp hack),
b) inside pqcomm.c and ip.c,
c) other

My main develop environment is FreeBSD10 and my contractor uses FreeBSD10 too 
but I'll check it works on some Linux distros.

Useful links:



---   ---
Eduardo Morras <emorr...@yahoo.es>

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to