Hi Arnaud,

On Wed, May 03, 2017 at 01:54:13PM +0200, Arnaud B. wrote:
> Hi there,
> 
> I'm currently wondering, based on
> https://www.haproxy.com/blog/use-geoip-database-within-haproxy/ and
> related notes, is there a more convenient way now ? I've created
> mapfiles for latitude, longitude, accuracy radius, country code, cities
> names etc. 
> 
> Right now, my process is based on Maxmind's databases scraping and
> generating mapfiles for each added header.
> 
> Now my HAProxy is around 10GB ram and takes about 70secs to reload.

Why does it take that long ? That seems totally abnormal. Do you use
your maps at many places, possibly causing them from being loaded
multiple times maybe ? In theory even with this they should be merged.

Now regarding the size, do you think your maps could be aggregated
so that you have all fields at once on a line ? If so you could set
a variable based on a single lookup of the source address in the
map, then use the "word" converter to split it depending on the
field you're interested in. The risk is to end up with an even larger
map but I think that most entries can be merged.

Willy

Reply via email to