Thanks Per. I guess the other part of this was to make the config more scalable so we are not constantly adding if/else blocks. Would by nice to have a way to just do something like
call(custom_ + req.hostname) On Mon, Mar 7, 2011 at 1:35 PM, Per Buer <[email protected]> wrote: > Hi, > > On Sun, Mar 6, 2011 at 11:39 PM, AD <[email protected]> wrote: > >> >> 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? >> > > 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. > > It might not make sense to optimize this. > > -- > Per Buer, Varnish Software > Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer > Varnish makes websites fly! > Want to learn more about Varnish? > http://www.varnish-software.com/whitepapers > > > _______________________________________________ > varnish-misc mailing list > [email protected] > http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >
_______________________________________________ varnish-misc mailing list [email protected] http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
