Hosting CakePHP app with Amazon Web Services (EC2,

2020-07-13 07:33发布

I don't think I fully understand Amazon Web Services yet, which is why I'm asking this question. I want to know if AWS would be a nice host for a CakePHP application that of course runs off PHP, and MySQL?

Would I have to change or add anything to my code if used a service like EC2? I also noticed that Amazon has it's own database system, does that mean no mysql.

Also as a side question, what do you guys think of the cost AWS?

Sorry if my question is a little scattered, or somewhat "noobish," but that is why I ask it. Thanks in advance!

4条回答
你好瞎i
2楼-- · 2020-07-13 07:52

unless you need a dedicated instance just for your cakephp application you may be better off using a host that provides a full lamp hosting stack on a shared server.

with aws you would need to create an instance, configure that instance, eg install mysql if that is what you want, etc.

then you pay-per-hour while it is running, so for a full year it would be like 24*365*12c = $1050 approx. (you will need to check the exact rates for what you want)

查看更多
Bombasti
3楼-- · 2020-07-13 07:53

It seems this question has been answered 2 weeks ago. Yes, my current company hosted their CakePHP app (1.2.1, production & development) on AWS Asia Pacific (singapore) and EU West (Ireland). Both production and development servers are m1.xlarge (standard 4-core, 15GB, Fedora 8 64-bit). We tried LAMP starter before, but it's too small and cannot handle web traffic demand.

Basically you don't have change your code, unless you have reached the milestone having enough traffic that forces you to switch to CloudFront (CDN), RDS, and Load Balancer features (that's currently I am doing now.) But you have been warned to plan it as early as possible.

For the cost, the bill we received for June is around USD$550 ~ 600 (roughly m1.xlarge server running 24x7), and for July is USD$1100 ~ 1200 (roughly two m1.xlarge server running 24x7.) This would give you the idea how much it cost.

查看更多
太酷不给撩
4楼-- · 2020-07-13 07:58

AWS is like a Virtual Private Server (VPS) with additional API. If you haven't used a VPS before, it would be good to explore into that before you use AWS.

If you do want to try AWS, it's available at an affordable per hour rate. You can try for a couple of hours to see how it's like too.

Have fun!

查看更多
够拽才男人
5楼-- · 2020-07-13 08:15

AWS is great for automatically balancing varying loads across your server. Imagine you're running a Christmas special -- you don't need 50x servers all year (waste of money). AWS allows you to scale (automatically) from your normal 1x instance to 50x.

Based on your question, I'm going to guess you're not an expert in infrastructure. Amazon does offer a data store, which could replace MySQL. But if you're not aware of the tradeoffs, I'd advise against going this route until you become more familiar with AWS.

You should sign up for an account and play with it. You only pay per compute-hour, so you can setup and run a server for under a dollar a day. Check it out!

Price wise, I think they're a little more expensive than some of the other cloud computing options. The most frequent names I hear in that space are AWS, linode (more VPS than true "cloud"), slicehost, and (more frequently) Media Temple.

查看更多
登录 后发表回答