<div>Hi,</div><div><br></div>On Sun, Mar 6, 2011 at 11:39 PM, AD <span dir="ltr"><<a href="mailto:straightflush@gmail.com">straightflush@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><div> what is the best way to run an instance of varnish that may need different vcl configurations for each hostname. This could end up being 100-500 includes to map to each hostname and then a long if/then block based on the hostname. Is there a more scalable way to deal with this?</div>
</blockquote><div><br></div><div>CPU and memory bandwidth is abundant on modern servers. I'm actually not sure that having a 500 entries long if/else statement will hamper performance at all. Remember, there will be no system calls. I would guess a modern server will execute at least a four million regex-based if/else per second per CPU core if most of the code and data will be in the on die cache. So executing 500 matches should take about 0.5ms.</div>
<div><br></div><div>It might not make sense to optimize this. </div><div><br></div></div>-- <br>Per Buer, Varnish Software<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br>Varnish makes websites fly!<br>
Want to learn more about Varnish? <a href="http://www.varnish-software.com/whitepapers" target="_blank">http://www.varnish-software.com/whitepapers</a><br><br>