On 02/13/2014 11:54 AM, Dr.x wrote:
> hi all ,
> assume have
> 4 workers ( i used worker 4 in squid.conf)
> 2 disker ( i used two rock dir )
> 1 coordinator 
> 
> assume that google website has been cached on hardisks (disk1 and disk2
> which are represent by diskers process)
> 
> 
> assume that that userx is pumped to squid and requesting google.com
> now ,
> who  will answer the user ??
> the worker ? or the disker ?

The worker. Diskers do not speak HTTP.


> well i will answer this question and need make sure that my answer is
> correct .
> 
> as i understand , the responsible of answer the request are the workrers not
> the disker , the worker will try to solve it by memory , if it failed  it
> will go  to diskers ( responcilbe of disk caching and rock ) and try to
> server it from hardisks.

Yes.


> it will go to one of disker and if not found in one of them it will go to
> the 2nd disker and so on.

The worker does not exactly iterate diskers in search for a disk cache
hit. Instead, the worker uses disk indexes to check whether a disk cache
has the requested object. Those indexes are stored in shared memory so
the check is relatively fast. If the worker detects a hit, it sends the
corresponding read request(s) to the disker responsible for the
disk/index where the hit was found.


> if not found on memory or disker , squid will try to cache it if its size
> less or equal 32 kbit !

Approximately 32 KBytes (not 32 Kbits), provided you are using small
rock and the response is cachable based on HTTP rules and other factors.


HTH,

Alex.

Reply via email to