Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does anyone have experience with running Web maps (tile server + client JS scripting) on Amazon Web Services (S3, EC2 etc...)? What kind of AWS configuration is needed for running a low-to-medium bandwidth Web map app, covering a small(-ish) area (city to small-country size)?

All of the tiles would be pre-rendered and uploaded to S3. Ideally I would need a tile serving app on the web server that could serve MBTiles (instead of uploading hundreds of thousands of tile bitmaps individually). So some kind of EC2 instance would be needed, but what kind?

Thanks for any hints.

UPDATE: just to elaborate on my question. What I'm basically looking for is some feedback about how viable AWS is for hosting your own web maps as an individual (which means it shouldn't cost too much, say up to $30/month). I've been hosting my web maps for some time through "ordinary" hosting providers, but these have their own limitations (upload bandwidth is one, speed is another). I'm also looking for any good alternatives to AWS and anything to watch out for when using cloud services for web maps.

share|improve this question
3  
One Project "Building a National Tile Server" Mapserver+MapProxy+AWS (EC2) Postgres on ubuntu speakerdeck.com/u/walkermatt/p/building-a-national-tile-server –  Mapperz Sep 27 '12 at 14:22
1  
@Mapperz thanks for the link. Their setup is a bit more ambitious, with tile rendering pipeline running entirely on the AWS, so this (I imagine) could be quite expensive. But one revelation is MapProxy, since it supports MBTiles. –  Igor Brejc Sep 27 '12 at 15:26
1  
using the small sized server and serving about 500 MB of gis data I have been getting notified by amazon that I qualify for the free tier. just saying –  Brad Nesom Sep 27 '12 at 19:56
add comment

4 Answers

I've been using WebFaction for hosting GIS data in a Postgresql/PostGIS database with MapServer and I think the service is unrivaled for the cost of <$10 per month. If you want to use PostGIS 2.0 you need to install it yourself which is a bit tricky, but they provide PostGIS 1.5 by default (you need to open a support ticket). This is a shared hosting service on CentOS where you have full flexibility to install anything in your own portion of the server.

I have not been using Webfaction for serving tiles, but they do provide 100GB of space; I'm not sure if the RAM would be too costly as the default is 256 MB (and each 256 block costs an additional $7 per month)

share|improve this answer
    
Incidentally, is it ok to include a referral link when answering questions like these? It does not consciously influence my view, but it could in theory! –  djq Sep 27 '12 at 16:55
1  
thanks for the hint. WebFaction's prices do look inviting. Too bad they don't offer more information about the apps they offer. How hard was installing PostGIS and MapServer on it, BTW? –  Igor Brejc Sep 27 '12 at 17:38
    
If PostGIS 1.5 is all that is required it's just a support ticket. PostGIS 2.0 is not too tricky but it just requires downloading and installing a few packages like GDAL, etc. The support staff are very helpful and quick to respond though. (realize I erased some of my answer when writing; will update it.). –  djq Sep 27 '12 at 17:40
1  
I recently installed MapServer and TinyOWS on my WebFaction webhosting account. My spatial data is stored in a PostGIS 1.5 database on the same webhosting account. I described the steps I did to make a MapServer WMS service up and running here: link –  jirikadlec2 Jan 29 at 9:43
add comment

When picking an architecture for a service that relies so much on a 'classic' architecture like web maps never underestimate the effectiveness of more traditional hosting solutions like RackSpace Cloud Servers or Linode.

You will have much less choices to make (like use S3 or not, load balancers or not, backups, etc or not and how much is that going to cost?) whose outcome is difficult to predict AND, more importantly you will be able to use tools that you are already familiar with.

Having gone through the same myself some time ago I can tell you that the critical factors in my decision to host a web maps service on Rackspace rather than AWS were:

  1. Cloud Server are (more) resilient than EC2 instances. EC2 instances are actually expected to fail and they will fail
  2. EBS volumes fail too (there's plenty of sad stories in the news) and generally have poor I/O
  3. unless you pick the larger instances I/O contention could be an issue (especially if you plan on seeding the tiles on EC2, rather than copying them over). It could also be an issue with MTBtiles databases
  4. Whenever you reboot your server the public ip will change: this does not happen on Linode or Rackspace
  5. You will have to come up with a backup and restore strategy yourself whereas both Linode and Rackspace provide point and click daily and weekly automated snapshots and restores
  6. If the host running your VPS fails Rackspace will take care of relocating your instance and restarting it on a different server and they will do this in 4h (it's in their SLA). It happened to me while I was on holiday: it felt very professional. Linode should do the same
  7. Linode has a great availability SLA: 99.9% and they claim great performance because they don't overprovision
  8. Rackspace has recently come up with a volume strategy like EBS so disk space should not be an issue anymore. Previously if you needed lots of disk space you HAD to get a large instance while on EC2 you can provision storage, cpu and memory with finer control

With this I'm not saying that Amazon AWS is inferior to others, I'm just saying that sometimes traditional hosting solutions can scale as well as Cloud-based ones. A notable example is the StackExchange network itself.


So, in your case I would start up a large instance on Rackspace and then load all the data in a local Postgis instance. Then, after configuring the rendering engine I would seed the cache. A large instance will complete the seeding process fast enough so that it doesn't become too expensive to run. You can store tiles in the fs, MTBtiles, even on S3 (btw, you can serve S3 data on a CDN with CloudFront).

After the seeding completed I would reboot the server and resize it into a small (maybe even 512MB) instance as at that point it would only have to serve static data.


This is getting a kinda long answer so I'm going to stop here. If you want me to elaborate on certain aspects just drop a comment.

Disclaimer: I am not affiliated with Rackspace, Linode, or any other provider I cited.

share|improve this answer
1  
Thanks for your in-depth answer. You pointed to some issues I haven't considered (like EC2's IP change). A lot of options to choose from. Right now I'm not looking for a lot of cloud-CPU power, since I will only be hosting pre-rendered tiles (so no PostGIS etc). But storage capacity, bandwidth (and speed) is important. –  Igor Brejc Sep 28 '12 at 4:57
add comment

I am not an expert with much or really any knowledge about it other than I have been running a web server on amazon EC2 for some time now.
So this is not an answer.
I am not sure you are utilizing these tools to their best use by pre-rendering and uploading.
1. The biggest part of my aws expense is on my data transfer (what you are talking about loading).
2. What else does your server have to do (unless you are utilizing licenses to render tiles and don't have license for the AWS).
If that doesn't deter or cause a re-think.
Probably first pick your favorite map server.
Then pick a supported OS for that map server.
Then go to AWS EC2 and find the Instance that best meets your needs (size, memory, space, region). There may or may not be an AMI containing all the stack you need so next get it configured and then install your stack.
There is a strong possiblility that you will accomplish all of that for "free" or cheap.

share|improve this answer
1  
thanks for your answer. I agree pre-rendering is not ideal, but on-demand rendering requires a lot more cloud app resources, which are quite expensive, too. In a pre-rendering scenario the server only has to fetch tiles from a MBTiles (sqlite) storage and serve them, so you need a lot less CPU, disk storage, and no real RDBMS. And if you limit the highest zoom level to something manageable, there's not that many tiles to upload. BTW I've updated my question a bit. –  Igor Brejc Sep 27 '12 at 15:47
add comment

To get detailed pricing for AWS services you can use the online calculator located here: http://calculator.s3.amazonaws.com/calc5.html

For a small EC2 instance running Linux, if you are willing to commit to a year, you can buy a Reserved Instance that will cost about $25/month. That is in comparison to about 44/month for on demand pricing, or no-contract pricing.

I think the short answer to your question is that if you are looking for an infrastructure provider to take care of your personal web mapping application needs, AWS might be overkill. If you are looking for IT provider for production apps, especially if they require HA and scalability, then AWS is your answer. This becomes even more true if you are creating apps that leverage the many glue services that AWS provides, such as SQS, SNS, SWF etc.

As to what kind of EC2 you need? That is a function your apps specific requirement. The whole point of cloud-based IT is that you can try before you buy. Test your app without commitment, and only when you know, make an informed decision about committing to an EC2 type over a period of time (the RI buy).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.