GeoIP Targeting
Posted: Wed Jan 16, 2008 9:34 am
Hello,
Well, I've been dealing with a dilemma for the past week... I've been trying to do geoip targeting using MaxMind's City database. No matter what I try, it always VERY slow... I've tried doing it in MySQL using one table, from a CSV they provide. I've tried using two tables, from 2 CSV's they provide, I've tried using mod_geoip which is an apache module that uses a binary .dat file as the source and allows apache to handle ip detection using variables such as apache_note('REGION_CODE'), I've tried using a php API they provide to read the binary .dat file... When using apache, it caused apache to jump from about 1% memory utilization to 35% utilization and naturally cause everything to just creep along. I've had the best results so far with it being in two tables in MySQL, but even that was very very sluggish, we're talking about 4-5 seconds to load.
I'm on a dual processor dual core optiplex w/ 12GB memory... but no matter what I do I can't get this to speed up. If it's a matter of purchasing a new server, solely for handling ip detection, I will do that, however I'm still not sure that would fix it.
If anyone has experience dealing with geoip detection, I would LOVE to hear any feedback or suggestions... Ideally this would all run through MySQL (as apache just killed utilization)... and yes, I had everything index'ed appropriately.
Thank you!
Well, I've been dealing with a dilemma for the past week... I've been trying to do geoip targeting using MaxMind's City database. No matter what I try, it always VERY slow... I've tried doing it in MySQL using one table, from a CSV they provide. I've tried using two tables, from 2 CSV's they provide, I've tried using mod_geoip which is an apache module that uses a binary .dat file as the source and allows apache to handle ip detection using variables such as apache_note('REGION_CODE'), I've tried using a php API they provide to read the binary .dat file... When using apache, it caused apache to jump from about 1% memory utilization to 35% utilization and naturally cause everything to just creep along. I've had the best results so far with it being in two tables in MySQL, but even that was very very sluggish, we're talking about 4-5 seconds to load.
I'm on a dual processor dual core optiplex w/ 12GB memory... but no matter what I do I can't get this to speed up. If it's a matter of purchasing a new server, solely for handling ip detection, I will do that, however I'm still not sure that would fix it.
If anyone has experience dealing with geoip detection, I would LOVE to hear any feedback or suggestions... Ideally this would all run through MySQL (as apache just killed utilization)... and yes, I had everything index'ed appropriately.
Thank you!