I am just getting began with Amazon . com EC2 and looking to get my mind round the way the databases should work. If I've got a high traffic site and wish to load balance traffic over multiple instances I am speculating these instances must be locating and saving data to some single separate instance to prevent data being fragmented across multiple machines.
Must I for the reason that situation install and run mongoDB by itself instance and also have other instances connect with this single data store? Or must i just run mongo and my http server on a single instance?
Would like to hear a number of your very best practices.
Maybe you no longer need while you are developing, but you want to do it once put forth production.
Much more, if you're running production data, most likely you need to run a replica set to possess a backup just in case something fails, not to lose your computer data and never interrupt your merchandise.
DBs are hungry for memory, so needing to share it along with other processes it's an awful idea. With an application server you most likely require more CPU than memory, so that you can use High-CPU instance types (c.medium, c1.xlarge) and employ High-Memory types for the DB (m2.large, etc) (High-CPU instances are less costly)
Also, from architectural perspective, it's easier to have the ability to scale the amount of application servers individually in the DB. Should you place the application servers and also the DB on a single machine, that can lead to problems if you need to migrate to another one later.