Thanks Jochen and Lenz, that has really helped me to understand a few things.
I currently use S3 to store videos that are then played on my site, so I'm familiar with S3 but not EC2. Do you only run one website per EC2 instance or is it feasible to run multiple sites (i.e. like on a shared hosting environment)? At the moment I'm responsible for the hosting of about 100 sites for my clients, although the actual hosting is done elsewhere where I've got a reseller account that lets me load as many sites as I want. But I'm worried that something might happen to my host and then I'd be scrambling to find hosting elsewhere. EC2 looks like it might be a solution for someone that doesn't want the responsibility of looking after server hardware but would like to have complete control of the hosting environment. I've ordered Sitepoint's latest book, Host Your Web Site In The Cloud, which covers all of this stuff and is written specifically with AWS and PHP in mind. On Sep 30, 2:26 pm, lenz <[email protected]> wrote: > hi, > > some of the questions were already answered by jochen but i'll answer > them again :-) > > On Thu, Sep 30, 2010 at 12:39 PM, Super Steve <[email protected]> wrote: > > Do you store your static files (.html, .php, .jpg, etc) on the EC2 > > instance or do you store them on S3? > > storing on S3 is only really working nicely if: > a) your application can handle it > b) your files are more of a larger nature and not changing too often > > S3 is not a filesystem although you can mount it in as one with a > fuseFS adapter but keep in mind that it is HTTP based and will perform > really badly if you have many changes and lots of small files. > > what i use mainly is volumes. i have various volumes (MySQL data > directories, the website with all the php/html/css/js stuff in it and > some data partitions we need for that app). that way i can attach the > volume to any AMI and just mount it into place wherever i need it. for > readonly access i use sshfs in some places which is fast enough for > many things and works quite nicely. > > > How do you handle software updates to your EC2 instance (i.e. updating > > PHP, Linux, etc)? Do you actually upgrade the EC2 instance or do you > > replace the AMI with a new one? If you replace the AMI with a new > > one, what happens to any files you had stored within the file system > > (i.e. do they get removed or can you automatically copy them to the > > new AMI instance)? I'm thinking here about configuration files the > > you've personalised (php.ini, etc). If you had to set them up again > > from scratch every time you upgraded the AMI then that would be a real > > pain. > > once you have volumes you can do it either way. bring up an AMI, > upgrade it attach the volumes, see if things are working, save the new > AMI - or build a new AMI, attach the volumes, mount them into place, > test, trash the old AMI ... > > > If you're running a web server on EC2, does that mean that the EC2 > > instance is running all the time, just waiting for a web request to > > come in? Or it is somehow woken up when a request comes in and then > > goes to sleep afterwards? I'm just wondering how it works because > > you're paying by the hour, aren't you? > > they have to run all the time - i normally advise against running the > base load off EC2 and rather go with vservers and use EC2 for handling > peak loads only but this is really just how i normally do things. > > > What sort of costs are you paying for running the site in the cloud? > > jochen answered that one already, although i prefer slicehost or the > likes for the base load and then have EC2 images at hand if you need > them and only fire them up if the load exceeds the performance the > base nodes can handle. > > hope this helps, feel free to come back with more questions :-) > > cheers > lenz > > -- > twitter: @norbu09 > current project: iWantMyName.com > painless domain registration (finally) -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
