Geolocation vmods

Andrei lagged at gmail.com
Mon Nov 28 08:34:38 CET 2016


Thank you both for the awesome input. Running stat on a file each time a
request comes in is something I would like to avoid. Would it be possible
to go by the varnishd uptime instead, and trigger database checks every N
seconds instead? We're looking to push around 5k req/s on average which is
why I'm trying to avoid the added syscalls.

On Mon, Nov 28, 2016 at 9:16 AM, Thomas Lecomte <
thomas.lecomte at virtual-expo.com> wrote:

> On Sat, Nov 26, 2016 at 3:22 PM, Andrei <lagged at gmail.com> wrote:
> > Hello all,
> >
> > I was wondering if there were any preferences among the community on
> which
> > vmod (from https://varnish-cache.org/vmods) to use for geolocation, and
> why.
> > My main concerns are of course speed, resources and accuracy. The ones
> I'm
> > looking over from the vmods page are:
> >
> > ip2location - https://github.com/thlc/libvmod-ip2location
>
> Hello Andrei,
>
> I will talk only about ip2location since I'm the developer behind it.
> As it only implements some bindings to the C library provided by
> ip2location, the overhead is pretty minimal.
>
> The accuracy depends on the freshness of you IP2location database. Its
> UNIX mtime is checked at each call and the database is reloaded on the
> fly if the file has been updated. Our varnish servers don't handle a
> lot of requests per second so I can't say wether it is able to cope
> with more than 1000 req/s without increasing the CPU load.
>
> I only implemented the bindings we needed, that's why I don't provide
> full bindings to the whole library yet. I can add some if you need
> them.
>
> Thanks,
>
> --
> Thomas Lecomte | Sysadmin @ Virtual Expo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20161128/d7a1d642/attachment.html>


More information about the varnish-misc mailing list