Hi Brett,

Thanks for the heads up! Looks pretty lightweight and the db is only loaded
on init, which is also preferable in my case to avoid the numerous syscalls.


On Mon, Nov 28, 2016 at 6:41 AM, Brett Fitzgerald <
[email protected]> wrote:

> Hi Andrel and Thomas,
>
> I also wrote an implementation of ip2location as a vmod:
> https://github.com/controversy187/libvmod-ip2location
>
> I'm not well versed in C, and this is my first vmod, but maybe it could be
> helpful. And I'm also open to suggestions for improvement :)
>
> Brett
>
> On Mon, Nov 28, 2016 at 3:38 AM Andrei <[email protected]> wrote:
>
>> This change would definitely help! From what I'm seeing both ip2loc and
>> maxmind are just as accurate when it comes to country tags, which is what
>> we're aiming for.
>>
>> On Mon, Nov 28, 2016 at 9:41 AM, Thomas Lecomte <
>> [email protected]> wrote:
>>
>> On Mon, Nov 28, 2016 at 8:34 AM, Andrei <[email protected]> wrote:
>> > 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.
>>
>> Indeed it would make more sense. If you are interested in ip2location
>> and plan to use this vmod, I can change the its behavior as you
>> suggested, it should be pretty straightforward.
>>
>> --
>> Thomas Lecomte | Sysadmin @ Virtual Expo
>>
>>
>> _______________________________________________
>> varnish-misc mailing list
>> [email protected]
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to