trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Irmatov <irma...@gmail.com>
Subject Squid -> TrafficServer migration
Date Wed, 13 Jun 2012 11:26:10 GMT
Hi!

Recently I have discovered Apache Traffic Server. Project looks
interesting and performance figures are attractive.. We would like to
try to replace our Squid  server in transparent (TPROXY) mode with
ATS.

I have successfully compiled and installed ATS 3.0.5. But there is
some contradiction between mailing list archives and online
documentation on how to configure tproxy support.

Current docs (http://trafficserver.apache.org/docs/trunk/admin/transparent-proxy/index.en.html)
require following settings:

CONFIG proxy.config.http.server_port_attr INT 3128
CONFIG proxy.config.http.server_port_attr STRING =
CONFIG proxy.config.reverse_proxy.enabled INT 1

Mailing list posts
http://mail-archives.apache.org/mod_mbox/trafficserver-users/201205.mbox/%3C371609216.20120522194054@network-geographics.com%3E
(may be they are about unstable version, I cannot see exact versions
being mentioned) says to use:

CONFIG proxy.config.http.server_ports STRING 3128:tr-full

If use server_ports set to 3128:tr-full

(Note that I'm using 3128 port, same as squid). If I am using
server_ports directive ATS seems to ignore it and still listens on
8080. If I configure it as docs say then everything is ok. Also, it is
unclear whether I do need to set reverse_proxy.enabled to 1 or not.

So, my first question is:

How should I properly configure ATS for transparent (forward) proxying?

Second thing, during my first test (configured with server_port and
server_port_attrs =) simple internet browsing works normally. But I
have a problem with listening to internet radios (shoutcast streams).
This is how conversion goes when accessing radio directly (without
proxy):

GET /stream/1065 HTTP/1.1
User-Agent: Music Player Daemon 0.16.5
Host: scfire-ntc-aa03.stream.aol.com
Accept: */*
Icy-Metadata: 1
Via: http/1.1 peach[7F000101] (ApacheTrafficServer/3.0.5 [uScM])

ICY 200 OK
icy-notice1: <BR>This stream requires <a
href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2: Firehose Ultravox/SHOUTcast Relay Server/Linux v2.6.0<BR>
icy-name: Vocal Trance - DIGITALLY IMPORTED - a fusion of trance,
dance, and chilling vocals together!
icy-genre: Electronic Trance Pop
icy-url: http://www.di.fm/vocaltrance
content-type: audio/mpeg
icy-pub: 1
icy-metaint: 16384
icy-br: 96

Then there comes audio stream itself. Also, this conversion is the
same when going through Squid. With ATS response gets converted to
chunked encoding:

GET /stream/1065 HTTP/1.1
User-Agent: Music Player Daemon 0.16.5
Host: scfire-ntc-aa03.stream.aol.com
Accept: */*
Icy-Metadata: 1

HTTP/1.1 200 Connection Established
Date: Wed, 13 Jun 2012 09:34:26 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Server: ATS/3.0.5

1a4
ICY 200 OK
icy-notice1: <BR>This stream requires <a
href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2: Firehose Ultravox/SHOUTcast Relay Server/Linux v2.6.0<BR>
icy-name: Vocal Trance - DIGITALLY IMPORTED - a fusion of trance,
dance, and chilling vocals together!
icy-genre: Electronic Trance Pop
icy-url: http://www.di.fm/vocaltrance
content-type: audio/mpeg
icy-pub: 1
icy-metaint: 16384
icy-br: 96

Unfortunately, this chunked encoding upsets MPD (Music Player Daemon)
and Rhythmobox (both running on Ubuntu 12.04) - I hear some artifacts
(like skipping or something like that). Disabling chunking on ATS does
not help, response still gets extra HTTP response header and I still
get skipping/audio defects when listening to radio.

So my second question: Is it possible to configure ATS to be "more"
transparent with such streams? I understand that original response
from Shoutcast server is not HTTP-compliant but may be ATS could just
forward it to client as-is and skip/ disable caching of it?

Are things different with development version? Should I try it?

-- 
Timur Irmatov, xmpp:irmatov@jabber.ru

Mime
View raw message