Thanks.
forward.c contains the logics for connecting to the peers. It first
tries the first one, if this one refuses the connecttion, gives an
error, or if there is a connection timeout it retries the request using
the next peer in the list. When the end of the list is reached it starts
with the first one again.
At most 10 tries to forward the request is attempted.
See fwdServerClosed() for the bulk of the inner guts of the retries.
Regards
Henrik
ons 2003-03-19 klockan 18.43 skrev atit_ldce:
> Mr. Henrik.
> Thanks for Reply
> I got yr point.., and I think squid developer has take into count even very
> small things into count...
> great analysis effort and development effort.......
>
> Can u give me direction in following scenario:
> this is related to yr previous reply
> I have got Peer Cache P as the one where i have to forward request.
> and for fault talerance purpose i added P1,P2,P3 into list of forward
> servers
> so my request can go to P, or P1, or P2 or P3
> assume P is not up.
> so We may send request to P1 ,P2 or P3.
> can u tell me at which place in squid this decision (to select P1 or P2 or
> P3)is made?
>
> regards
> atit jariwala
>
> ----- Original Message -----
> From: Henrik Nordstrom <hno@squid-cache.org>
> To: atit_ldce <atit_ldce@icenet.net>
> Cc: squid-dev@squid-cache.org
> Sent: Wed Mar 19 17:26:09 GMT+05:30 2003
> Subject: Re: Re : Re: about peerGetSomeParent()
>
>
> peerGetAllParent is only used if never_direct is true (DIRECT_NEVER).
> It then adds all your parents as secondary paths after the selected
> parent, in case the selected parent does not really work.
>
> The reason to this is that when never_direct is true Squid MUST NOT go
> direct. Because of this we want Squid to automatically retry on your
> other parents if you have more than one and the parent Squid first
> selected did not work.
>
> Regards
> Henrik
>
>
>
> ons 2003-03-19 klockan 17.26 skrev atit_ldce:
> > Mr. Henrik
> > thanks for reply
> > I got yr point.
> >
> > but if we have parent in functin peergetSomeParent()
> > we have added it to the forward server list...
> > flow backs to peerSelectFoo()
> > and from here we call peerGetAllParent()
> > i think call of peerGetAllParent() is unneccesary()
> > does it true?
> > or it servers some other purpose?
> >
> > regards
> > atit jariwala
> >
> > ----- Original Message -----
> > From: Henrik Nordstrom <hno@squid-cache.org>
> > To: atit_ldce <atit_ldce@icenet.net>
> > Cc: squid-dev@squid-cache.org
> > Sent: Wed Mar 19 13:56:58 GMT+05:30 2003
> > Subject: Re: about peerGetSomeParent()
> >
> >
> > atit_ldce wrote:
> > >
> > > i have confusion in following code...
> > >
> > > if ((p = getDefaultParent(request))) {
> > > code = DEFAULT_PARENT;
> > > } else if ((p = getRoundRobinParent(request))) {
> > > code = ROUNDROBIN_PARENT;
> > > } else if ((p = getFirstUpParent(request))) {
> > > code = FIRSTUP_PARENT;
> > > } else if ((p = getAnyParent(request))) {
> > > code = ANY_OLD_PARENT;
> > > }
> > > if (code != HIER_NONE) {
> > > debug(44, 3) ("peerSelect: %s/%s\n", hier_strings[code], p->host);
> > > peerAddFwdServer(&ps->servers, p, code);
> > > }
> > >
> > > stmt p = getDefaultParent(request) are assignment stmt
> > > so outcome of if cond is definately 0
> >
> > The if is a long chain of if ... else if ... else if ... else if ...,
> > and the order of the ifs tell the priority of these different parent
> > selection algorithms.
> >
> > 1. default (by cache_peer default option)
> > 2. round-tobin (by cache_peer round-robin option)
> > 3. first alive parent (by order of your cache_peer lines)
> > 4. any parent
> >
> > I don't think 4 ever happens in the current code.
> >
> >
> > > in this case
> > > code will be HIER_NONE.
> > >
> > > does it indicate error in code or it has any other purpose?
> >
> > HIER_NONE here just indicates that no parent has been selected.
> >
> > Regards
> > Henrik
> >
> >
> >
> > _____________________________________________________________________
> > Get your internet connection from the fastest growing digital network.
> > ICENET
> > visit our site www.icenet.net
-- Henrik Nordstrom <hno@squid-cache.org> MARA Systems AB, SwedenReceived on Wed Mar 19 2003 - 06:07:42 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:34 MST