<div dir="ltr"><div><div><div><div><div>Hi Guys,<br><br></div>I'm trying to load-balance requests between two servers. i have the following config.<br><br>backend website {<br>    .host = "<a href="http://xxx.com">xxx.com</a>";<br>
    .port = "8080";<br>   .probe = {<br>    .url = "/favicon.ico";<br>    .timeout = 60ms;<br>    .interval = 60s;<br>    .window = 5;<br>    .threshold = 3;<br>}<br>}<br>backend api {<br>    .host = "<a href="http://yyy.com">yyy.com</a>";<br>
    .port = "8080";<br>   .probe = {<br>    .url = "/favicon.ico";<br>    .timeout = 60ms;<br>    .interval = 60s;<br>    .window = 5;<br>    .threshold = 3;<br>}<br>}<br><br>sub vcl_recv {<br>if ( req.url ~ "/api/") {<br>
set req.backend = api;<br>set req.http.host = "<a href="http://yyyy.com">yyyy.com</a>";<br>} else {<br>set req.backend = website;<br>}<br>}<br><br>director clust round-robin {<br>{ .backend = website; }<br>{ .backend = api; }<br>
}<br><br></div>but this is giving the following error.<br><br>Unused backend clust, defined:<br>('input' Line 39 Pos 10)<br>director clust round-robin {<br>---------#####--------------<br><br></div>then i was tyring to add set req.backend = clust (then it is giving the error, <br>
<br>Symbol not found: 'clust' (expected type BACKEND):<br><br></div>am i missing something here. <br><br></div>Cheers,<br>Tharanga<br></div>