2

I need to move a webserver from Rackspace to AWS and i was wondering if i need to add a separate service/server for mysql database, or can i host the website and the mysql database on the same EC2 instance. ( tier = small )

On Rackspace DB was hosted on another server. Both webserver and DB server consumed : Overwall DB size = 100MB Overall Disc usage : 30GB Avarage Memory usage: 1GB.

Can a single ec2 small instance do the work of both webserver and db ?

1

I don't know whether this question is on-topic for Webmasters, but running the database and web server on the same machine leads to issues I've addressed at Database Administrators SE and Server Fault revealing repeatedly that the two tend to peak together in their demands for memory and other resources, leading to the appearance of "crashes" which are actually cases of server resource exhaustion under load rather than actual software defects.

Running them together on the same machine is not a recipe for stability, even if the machine is theoretically capable.

Using one machine instead of two is a false economy, particularly since, with EC2, machine pricing within each instance family is almost directly proportional to capacity.

Two t2.micro is exactly the same price of one t2.small, which has twice the CPU allowance and twice the memory... flip that around and you see that the micro is half of a small for half of the cost. Use two machines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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