Oops, I guess you can't reference the backend like I said. In that case just check req.backend.healthy because you already assigned the backend to the request.
Raul -----Original Message----- From: Marco Felettigh [mailto:[email protected]] Sent: Wednesday, June 12, 2013 8:40 AM To: Rangel, Raul Cc: '[email protected]' Subject: Re: Questiona about req.backend.healthy Ok thanks but if i write sub vcl_recv { set req.backend = be1; if (be1.healthy) { set req.grace = 30s; std.log("###################### Grace 30s"); } else { std.log("###################### Grace 1h"); set req.grace = 1h; } ... and restart Varnish the compiler fails. Message from VCC-compiler: Symbol not found: 'be1.healthy' (expected type BOOL): ('input' Line 125 Pos 9) if (be1.healthy) { --------###############--- Running VCC-compiler failed, exit 1 I'm missing something ? Thanks On Wed, 12 Jun 2013 07:15:11 -0700 "Rangel, Raul" <[email protected]> wrote: > req.backend is the default backend you have selected. If you want your > request to go to a specific backend just set req.backend = be1; > > You can reference each individual backend by name. So be1.healthy, or > be2.healthy. > > Raul > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] > On Behalf Of Marco Felettigh Sent: Wednesday, June 12, 2013 6:49 AM > To: [email protected] Subject: Questiona about > req.backend.healthy > > Hi , > i'am new about Varnish and i need help understanding > req.backend.healthy . > > req.backend.healthy is a state for all the backends or i can check the > healthy of a single backend ? How can i grace only the content from a > single backend ? > > site1 -> be1 > site2 -> be2 > > example: > backend be1 { > .host = "x.x.x.x"; > .port = "80"; > .probe = { > .url = "/index.php"; > .interval = 5s; > .timeout = 1 s; > .window = 5; > .threshold = 3; > } > } > > backend be2 { > .host = "y.y.y.y"; > .port = "80"; > .probe = { > .url = "/index.php"; > .interval = 5s; > .timeout = 1 s; > .window = 5; > .threshold = 3; > } > } > > > thanks > Marco > -- ---- Cordiali saluti Marco Felettigh Nucleus S.r.l. Tel. 0432526336 _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
