All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Alger <lartc@mm.quex.org>
To: lartc@vger.kernel.org
Subject: [LARTC] Prioritizing based on HTTP Content-Type header
Date: Tue, 24 Apr 2007 09:05:32 +0000	[thread overview]
Message-ID: <20070424090532.GA29737@morose.quex.org> (raw)

I'm setting up a reverse-proxy on a limited-bandwidth pipe. The
system is Debian "etch" on Linux 2.6, using squid as the proxy.

As we've only got 5mbit to play with, what I'd really like to do is
set up priority levels based on the Content-Type of the (outgoing)
response:

  1. text/* gets highest priority (along with
     application/x-javascript).
  2. image/* gets middle priority.
  3. */* gets lowest priority.

Today I tried just using tc, with netfilter's "string" match module
to select matching packets, with limited success: while it does
match the packet containing the response header, additional packets
in the same stream don't retain the fwmark (unsurprisingly).

Does anyone have any ideas of -- or even better, experience with --
a stack which can achieve this? squid's built-in rate limiting
doesn't have the concept of borrowing bandwidth, so that's out.

I'm open to pretty much anything: userspace proxies (either in front
of or replacing squid) are fine.

Another option is simply to "punish" bandwidth hogs: the primary
goal is to ensure downloads of large files don't slow down users
that are browing webpages. Possibly just using SFQ will work for
this, but I'm not sure.

Any suggestions would be appreciated. I'm even open to changing
platform (e.g. FreeBSD), but I'd prefer to stick with Debian as it's
what I'm most comfortable with.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

             reply	other threads:[~2007-04-24  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24  9:05 Michael Alger [this message]
2007-04-24  9:13 ` [LARTC] Prioritizing based on HTTP Content-Type header Alexandre J. Correa - Onda Internet
2007-04-26 12:35 ` Michael Alger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070424090532.GA29737@morose.quex.org \
    --to=lartc@mm.quex.org \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.