[mapserver-users] Production mapserver

Andy Colson andy at squeakycode.net
Mon Mar 21 10:28:10 PDT 2011


On 3/21/2011 11:27 AM, Jeff Dege wrote:
> What do we need to do to get Mapserver running in a production
> configuration?

I guess that's up to you.  Do you need 100% uptime?  Mirrors and backups 
and redundancy?  You'll also need an ISP that lets you host data.  Many 
residential plans forbid it.  You'll need a commercial plan.  Or are you 
renting a VSP, or something?  Your question is a little vague.  Do you 
mean internet connections?  Hardware?  Just mapserver?


>
> There are packages out there to help new users get mapserver up and
> running in a development/playing-around-in mode, ms4w, etc. But these
> are designed for ease of installation, not performance on a production
> server.

Do you know the level of performance you'll need?  How many concurrent 
users?  Have you put a load on it?  Since you said the word 
"performance", I'd say go for FastCGI.  If you need more performance 
than that, well, that's another ballgame.

>
> I have a set of shapefiles, and some mapfiles I’ve built to display
> them. I have them running on a dev machine, just fine.
>
> So what do I need to do to go into production.

I have a test box, and a live box... and I try to keep them as exact as 
possible.  That way when you make changes, and do load tests, and what 
not, you know what to expect from the live site.  Need to test 
something?  The more identical your live and test boxes are, the more 
sure you can be about your testing.

(Note, however, my live box is running off raid 5, where as my test is 
just a single HD.  CPU's are close.  Software wise, they are the same 
though)

>
> I have a dedicated Ubuntu 10.04 box, that will be doing nothing but
> serving maps through WMS requests, using Mapserver. It currently has
> both Apache and MapServer installed, using the current apt-get packages.
>
> Should I be using Apache? Or should I use Lighttpd?

Use the one you are most comfortable with.  Speed wise it wont matter. 
You'll be spending all your time in mapserver code, not apache/lighty 
code.  (unless, of course, you have huge amounts of static files along 
with the maps... but those should all be marked as cacheable, so still, 
not gonna make a performance difference)

Cant answer anything about Ubuntu, never used it, run Slackware myself. 
  I prefer to build mapserver from source.  I'm also using mapscript 
(with perl), so I build that as well.

>
> Standard CGI? FastCGI? Some other alternative? (WSGI?)
>

CGI is slow.  FastCGI if you want performance.  Never used WSGI.

As background:  I run on a dual core amd64 3800, 4 green HD's in 
software raid 5, 6 gig of ram, running Slackware64.  I think the box 
cost me around $400 to build.  I get 100K hits a day (about 2 requests a 
second), and the box sits 75% idle.

I have about 350 gig of arial imagery, and 25 gig of shapefiles in PostGIS.

It's run on apache/mapscript/mod_perl.

-Andy




More information about the MapServer-users mailing list