A
A
AntohaRomaha2015-10-15 08:57:31
FreeBSD
AntohaRomaha, 2015-10-15 08:57:31

Traffic distribution + Squid caching proxy, how to competently, without restrictions, take objects from the cache?

Good afternoon.
FreeBSD 10.2 + caching Squid 3.5.10 - Internet gateway for local network. Channel provider 2Mbps outgoing and incoming (separate). If I make queues "fairly" (no VIPs, etc.), then everything works fine, as it should. But here's the problem - the proxy is caching, and cached objects are also pulled out of it, falling under the restriction.
re0 - interface to LAN; alc0 (tun0) - interface to the Internet.
Here is my IPF:

#PIPES DUMMYNET
${fwcmd} pipe 1 config bw 2Mbit/s
${fwcmd} pipe 11 config bw 2Mbit/s
${fwcmd} queue 1 config pipe 1 mask dst-ip 0xffffffff
${fwcmd} queue 2 config pipe 11 mask src-ip 0xffffffff
${fwcmd} add 20 queue 1 ip from any to 192.168.1.0/24{2-255} via re0
${fwcmd} add 30 queue 2 ip from 192.168.1.0/24{2-255} to any via re0

Tell me, please, where to dig. It is necessary that an object be taken from the cache instantly, without any pipe-queues.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mace-ftl, 2015-10-15
@mace-ftl

wiki.squid-cache.org/Features/DelayPools is to regulate "web servers <-> squid"
habrahabr.ru/post/57085
and maybe https://serverfault.com/questions/79824/limiting-b.. .

A
athacker, 2015-10-15
@athacker

The firewall has no idea where the squid got the object from - from the cache or downloaded from the Internet. And he will never know it - he does not have such mechanisms.
If you want objects to be returned from the cache quickly, set the speed limit to delay pools in the squid. And only for those users who do not use a squid, limit the speed with a firewall.

A
AntohaRomaha, 2015-10-15
@AntohaRomaha

Dynamic shaping - perhaps this is what I need. I read an article about Masha with buckets, a long time ago. But everything is too complicated there. :) Not for my tasks. There are different groups, different files.. I won't have vips. Everyone is equal. And even me :) Here, according to my ipfw listing, how can you tell me the simplest way to implement then on a squid, an equal distribution ..
? :) Yes, you look, I'll translate everything to squid..:)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question