Re: I have read and worked since 2 weeks ago

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Mon, 18 Jul 2011 13:17:33 +0200

mån 2011-07-18 klockan 12:42 +0430 skrev Mohsen Pahlevanzadeh:

> > a) How do I fetch content via Squid?
> I don't want to squid fetch pages, But also i have 2 machine A and B.B
> is squid-box and A get pages from Internet and send to squid.Squid
> "must" cache them and doesn't any response.

What is the difference?

Are you trying to solve an actual problem in the bast manner possible,
or are implementing a fixed design even if there is simpler and much
more maintainable ways of solving the same problem?

What I am trying is to explain to you how you most easily solve the
problem you described (how to push arbitrary content into the Squid
cache), while keping full control of how the content enters the squid
cache.

The Squid cache is an HTTP cache, and the most convenient way of
entering content into the cache is by using HTTP.

What you need for this to work is to write a small HTTP client reading
the list of URLs and make your 'A' box implement a small HTTP server
allowing Squid to fetch the content from there when requested by your
HTTP client. This effectively pushes the content into the Squid cache
and requires no modifications to any version of Squid.

I have implemented exactly this scheme in the past for a satellite
provider pushing a stream of HTTP objects over a one-way satellite link
and it worked out quite nicely.

Yes there is some extra overhead involved as Squid do forward the
response to your http client while it is cached, but thats just local
either within the squid server bix or between the Squid server and the
content pushing server depending on where you locate the http client
component.

Regards
Henrik
Received on Mon Jul 18 2011 - 11:17:38 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 18 2011 - 12:00:03 MDT