VideoCache

CacheHIT and cachevideo

by Anonymous on 23 Feb 2009

Hi. I want to mark the traffic HIT of my squid, i have TOS then is HIT from squid, but i want to know if there any way to detect the hit from videocache:

CACHE_HIT YOUTUBE Video was served from cache.

I want to detect when the video is hit with layer7 or iptables

Rergards

Max

2 Answers

by Kulbir Saini on 24 Feb 2009

Max,

Videocache is in no way capable of marking packets or I should say that squid doesn't allow plugins to do that.

If you want to mark packets using custom iptables rules, you can set them for IP address that you set for cache_host in your /etc/videocache.conf . The cached videos are always served via http from that IP (cache_host).

Thank You!

by imriz on 24 Feb 2009

I'm guessing that you want to mark the packets the APACHE server serves.

Well, if you use Apache 1.3 (which I doubt), you can use mod_iptos. If you use Apache 2.X, you might want to look at http://mail-archives.apache.org/mod_mbox/apr-dev/200701.mbox/%3CPine.LNX.4.64.0701131809560.6312@twinlark.arctic.org%3E

If that doesn't do the trick, you will have to use iptables like Kulbir said.

I think you might be able to mark the packets based on the Apache uid/gid.

You need to sign in. Please sign in to add answer to this question.