On Wed, Jan 22, 2014 at 10:18:45AM -0200, Alex Garz?o wrote: > Hello, > > Ticket: https://issues.apache.org/jira/browse/TS-2520. > > I am a newbie in ATS, but I would like to contribute. Can I implement > a patch to solve this?
if you want to implement tcp fast open listening in traffic server, i've got a really hackish kludge to http_load to support tcp fast open, and it doesn't look as hard as it probably is in the main trafficserver. without tcp fast open: <ben@amethyst:/src/trafficserver-svn/tools/http_load> zsh/2 3093 (git)-[master]-% ./http_load -parallel 2 -fetches 50 /tmp/urlfile 50 fetches on 50 conns, 1 max parallel, 8850 bytes, in 0.66447 seconds 177 mean bytes/fetch 75.2479 fetches/sec, 13318.9 bytes/sec msecs/connect: 13.0597 mean, 16.855 max, 11.127 min msecs/first-response: 13.4596 mean, 17.641 max, 11.97 min HTTP response codes: code 200 -- 50 with tcp fast open: [Thu 14/01/23 20:15 NZDT][pts/40][x86_64/linux-gnu/3.13.0-rc7ice][5.0.5] <ben@amethyst:/src/trafficserver-svn/tools/http_load> zsh/2 3094 (git)-[master]-% ./http_load -parallel 2 -fetches 50 /tmp/urlfile 50 fetches on 50 conns, 1 max parallel, 8850 bytes, in 0.355519 seconds 177 mean bytes/fetch 140.639 fetches/sec, 24893.2 bytes/sec msecs/connect: 0.00864 mean, 0.018 max, 0.002 min msecs/first-response: 14.0743 mean, 15.28 max, 11.833 min HTTP response codes: code 200 -- 50 i don't really know how the parallel command is meant to work. and that's a near empty page and against lighttpd with my local modifications for tcp fast open listening. i dunno the best way to go about it, i'm forcing doublechecking code in handle_connect and moving all the connecting logic there, as that simplifies And basically doing: #ifdef TCP_FASTOPEN if (sendto (connections[cnum].conn_fd, urls[url_num].buf, urls[url_num].buf_bytes, MSG_FASTOPEN, (struct sockaddr *) &connections[cnum].sa, connections[cnum].sa_len) < 0) { #else if (connect(connections[cnum].conn_fd, (struct sockaddr *) &connections[cnum].sa, connections[cnum].sa_len) < 0) { #endif And then skipping the sending of that data later... Ben.