Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 3:52 PM, Enno van Amerongen <span dir="ltr"><<a href="mailto:enno@tty.nl" target="_blank">enno@tty.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<div><font face="Tahoma, Verdana, sans-serif">Hi List,</font></div><div><font face="Tahoma, Verdana, sans-serif"><br></font></div><div><font face="Tahoma, Verdana, sans-serif">My coworkers and I are working on a sharding VMOD and we got to the point</font></div>
<div><font face="Tahoma, Verdana, sans-serif">it's actually working (woohoo!).</font></div><div><font face="Tahoma, Verdana, sans-serif"><br></font></div><div><font face="Tahoma, Verdana, sans-serif">Now, our implementation is pretty straightforward:</font></div>
<div><font face="Tahoma, Verdana, sans-serif"><br></font></div><div><font face="Tahoma, Verdana, sans-serif"> - get id from url</font></div><div><font face="Tahoma, Verdana, sans-serif"> - do a "id mod n" to pick correct shard ( = director)</font></div>
<div><font face="Tahoma, Verdana, sans-serif"> - set req.backend = shardN</font></div></div></blockquote><div> </div><div><br></div><div>Any particular reason you didn't use the client director? This is more or less exactly what it does.</div>
<div><br></div><div>You would set client.identity to the ID you pick and Varnish will use a hash algorithm to consistently pick a backend from the backends in the director.</div><div><br></div></div><div><br></div>-- <br>
<div style="font-size:12.727272033691406px;margin:5px 15px 0px 0px;padding-bottom:5px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><table border="0" cellpadding="0" cellspacing="0" style="text-align:start;font-size:12px;line-height:1.5em;font-family:'Helvetica Neue',Arial,sans-serif;color:rgb(102,102,102);width:550px;border-top-width:1px;border-top-style:solid;border-top-color:rgb(238,238,238);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);margin-top:20px;padding-top:5px;padding-bottom:5px">
<tbody><tr><td width="100" style="font-family:arial,sans-serif;margin:0px"><a href="http://www.varnish-software.com/" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.varnish-software.com/static/media/logo-email.png" style="float:left;margin-left:10px"></a></td>
<td style="font-family:arial,sans-serif;margin:0px"><b style="font-size:14px;color:rgb(34,34,34)">Per Buer</b><br>CEO | Varnish Software AS<br>Phone: +47 958 39 117 | Skype: per.buer<br><span style="font-weight:bold">We Make Websites Fly!<br>
<br></span></td></tr></tbody></table><div></div></div><div style="font-size:12.727272033691406px;margin:15px 0px;clear:both;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"></div><br>
</div>