Reputation: 79
I'm trying to understand conceptually how to use Amazon EC2 to speed up the processing of a php script I am running.
I am producing a large number of image tiles for a mapping website I am making and this is done running a php script with a mysql database. I want to run it as a cron every week (not on demand as people browse the site). The question is, how can ec2 cloud computing speed this up?
Thanks.
Upvotes: 0
Views: 667
Reputation: 21466
EC2 can speed up processing only if the processing power you pay for is more than your own server's.
Splitting the script into several smaller scripts and having each one ran on its own EC2 instance will get it done faster. However, doing the same thing on your own server will not* speed it up, since you've only got one processor to get it all done.
* A multi-core processor may change that.
Upvotes: 1
Reputation: 180065
Your best option would be to break the task up into distinct work units - generating a single tile, or a single zoom level, or a certain sized region of tiles - and distributing it across multiple EC2 instances. The New York Times, for example, used dozens of EC2 instances to quickly OCR decades of scanned newspapers, which would've taken massively longer on a single server.
Upvotes: 1