Hi Andrew,

On Mon, Nov 23, 2015 at 12:19:22PM -0600, Andrew Hayworth wrote:
> That said, the difference between one and two map lookups is
> negligible, so I don't think you're saving much this way and it'll
> make configuration harder in some ways if you keep adding IPs. I can
> vouch from personal experience in production that we run 2+ map
> lookups on every request at Braintree (hundreds of req/s) and it adds
> no noticeable latency. Food for thought. :)

I agree, depending on the map size, you'll see something between 1 and 10
million lookups per second, it's quite cheap. I do abuse them as well and
I don't bother about the number of lookups. Sure if I have to match a
country among a few tens, I'll certainly use a variable first, but otherwise
I don't care.

Willy


Reply via email to