searching for the maximum speed I can get from our mapcache service, I'm going to make some test in a new server (AWS EC2) with Nginx as a reverse proxy and Apache before to update the live system.
our Mapcache uses the SQLite cache as we run out of inodes if we try to cache the whole UK with disk cache.
At the moment our Mapcache service is set up in Apache in http/1 and apache default config. I've just added apache compression and cache
this is the map service.
we use it to seed about 60 websites (the project it's a map-based app, so it require a map that we seed with the previous service) and around 15000 connections a month.
I'm using 128 x 128 tile size and the map requires a lot of images to be displayed.
How stable is Mapcache 1.6.1 with Nginx and how should I setup Mapcache?
I know there are instructions but I don't understand some points.
these are the steps to build my actual setup
... cd mapcache-1.6.1 mkdir build cd build cmake -DCMAKE_PREFIX_PATH="usr/bin/sqlite3" \ -DWITH_SQLITE=1 \ -DWITH_BERKELEY_DB=0 \ -DWITH_TIFF=0 \ -DWITH_GEOTIFF=0 \ -DWITH_FCGI=0 \ -DWITH_PCRE=0 \ ../ ...
I add this to the httpd.conf:
LoadModule mapcache_module modules/mod_mapcache.so <IfModule mapcache_module> <Directory /usr/local/src/mapcache-1.6.1> Require all granted </Directory> MapCacheAlias /mapcache "/usr/local/src/mapcache-1.6.1/build/mapcache.xml" </IfModule>
If I want to use Nginx as a reverse proxy (in Http/2) and speed up the cache I need to build it from scratch as in the instructions and change the configuration to use Mapcache with Nginx? Or still, I will use both of them? Can I use yum install Nginx and then add the module?
The part about The basic configuration without any proxying.... Where should be put? In the mapcache.xml?
Is there any particular apache and Nginx config that I should use?
I'm using apache MPM event in the live system but in the test server I'm using MPM prefork, they told me that it's better and probably will be implemented also in the live system.
I'm also having a lot of problem at the time to seed the map, it takes ages. In the test server I'm seeding a small portion of UK but still it requiring a lot of times.
I'm using these resolutions
280 140 70 28 14 7 6.16 2.8 1.4 0.7 with this script
su -s /bin/sh apache -c "/usr/local/bin/mapcache_seed -c /usr/local/src/mapcache-1.6.1/build/mapcache.xml -t bccache -g bcgrid -n 400"
I know the rule of the
-n parameter but if I use
-n 4 it simply takes even more time and when I check the CPU load is not even in use.
Below the square I'm using to make tests.