[MapServer-users] Can MapServer cache directly to AWS S3?

Rob Dennett Rob.Dennett at twdb.texas.gov
Thu Mar 6 14:13:19 PST 2025


Does MapCache have to be built from source?  Also, does it have to be it's own server?  It's not clear to me how it connects with MapServer.  Is it the case that MapServer renders tiles as necessary based on requests and then MapCache serves those files if requested again?

As mentioned, MapServer is currently storing tiles in a directory mapped to S3 which is specified by IMAGEPATH.  These tiles are not pre-seeded, so I can't specify a particular raster or vector file to serve from S3.  I don't think I understand how caching is supposed to work with S3 in the way we're doing it.  Can you simply specify a folder in S3 where cached data lives and have MapServer render anything that doesn't exist yet?

Thanks,
Rob
________________________________
From: MapServer-users <mapserver-users-bounces at lists.osgeo.org> on behalf of Scott via MapServer-users <mapserver-users at lists.osgeo.org>
Sent: Wednesday, March 5, 2025 11:50 AM
To: mapserver-users at lists.osgeo.org <mapserver-users at lists.osgeo.org>
Subject: Re: [MapServer-users] Can MapServer cache directly to AWS S3?

External: Beware of links/attachments.



You can store any raster/vector file format supported by GDAL on S3 and
use it via MapServer. Note the /vsis3 virtual connection:

Raster:
DATA "/vsis3/myS3Bucket/raster.tif"

Vector:
CONNECTION "/vsis3/myS3Bucket/vector.fgb"

MapServer is definitely a WMS server. Any OGC compliant WMS url can be
parsed and processed. Using MapCache along MapServer is highly desirable
as all subsequent WMS requests are cached. Further, you can seed any
cache directly with MapCache.

Scott


On 3/5/25 07:57, Rob Dennett via MapServer-users wrote:
> Is it possible to cache tiles  to and serve them from S3 buckets?  We
> currently mount S3 folders in EC2 instances one of which is the
> directory we specify in MAP/IMAGEPATH, but it requires us to use s3fs-
> fuse and that means we have to use EC2 as opposed to Fargate, which we
> would prefer.  Can MapServer act as a client to S3?
>
> I have been looking at MapCache, and as far as I can tell, it's a
> separate server that works alongside a WMS server, although I am not
> sure that MapServer counts as a WMS server.  We use it to serve geoJSON,
> UTF grid, etc.  Is it what we want to use for this?
>
> Thanks,
> Rob
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
MapServer-users mailing list
MapServer-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20250306/ec537045/attachment.htm>


More information about the MapServer-users mailing list