0

I'm running uWSGI with PHP and Python support through Nginx. All of this is compiled from source. I want GeoIP support.

Both Nginx and uWSGI can be compiled with their own GeoIP plugins/modules. Are there any practical differences between the two I should be aware of in terms of performance or resource usage? The uWSGI docs say using the GeoIP plugin can increase memory usage by upwards of 40mb.

If I compile GeoIP support into uWSGI I'm assuming I wouldn't need to use the uwsgi_param lines in my nginx config? This sounds more efficient to me, but I'm not sure.

  • First, you need to know _why_ you want GeoIP support. Then it should be obvious whether to use it in nginx, or your application, or both. – Michael Hampton Jan 29 '14 at 21:20
  • Mainly analytics. Now that I think about it though, it could be valuable in the future to block countries which would make it valuable at the Nginx level. – HittingSmoke Jan 29 '14 at 22:18
  • I don't think you want to do any significant _programming_, such as developing an analytics feature, in nginx's configuration file. And blocking countries is much more efficient when done by nginx instead of your application. See? – Michael Hampton Jan 29 '14 at 22:20

1 Answers1

0

there is no need to compile something. Always use packages, please. GeoIP module appeared in nginx version 0.7.63 and 0.8.6. and of course give to Nginx this job.

Ilja
  • 432
  • 2
  • 9
  • What? There are absolutely reasons to compile things. Telling people to "always use packages" is ignorant of use cases that are not your own. Compiling is extremely simple to do for even novice admins and for Nginx very fast. – HittingSmoke Feb 08 '14 at 19:00