title: Cloud Architecture
body: <p>I'm researching cloud services to host an e-commerce site.  And I'm trying to understand some basics on how they are able to scale things.</p>
  
  <p>From what I can gather from AWS, Rackspace, etc documentation:</p>
  
  <p>Setup 1:
  You can get an instance of a webserver (AWS - EC2, Rackspace - Cloud Server) up.  Then you can grow that instance to have more resources or make replicas of that instance to handle more traffic.  And it seems like you can install a database local to these instances.</p>
  
  <p>Setup 2:
  You can have instance(s) of a webserver (AWS - EC2, Rackspace - Cloud Server) up.  You can also have instance(s) of a database (AWS - RDS, Rackspace - Cloud Database) up.  So the webserver instances can communicate with the database instances through a single access point.</p>
  
  <p>When I use the term instances, I'm just thinking of replicas that can be access through a single access point and data is synchronized across each replica in the background.  This could be the wrong mental image, but it's the best I got right now.</p>
  
  <p>I can understand how setup 2 can be scalable.  Webserver instances don't change at all since it's just the source code.  So all the http requests are distributed to the different webserver instances and is load balanced.  And the data queries have a single access point and are then distributed to the different database instances and is load balanced and all the data writes are sync'd between all database instances that is transparent to the application/webserver instance(s).</p>
  
  <p>But for setup 1, where there is a database setup locally within each webserver instance, how is the data able to be synchronized across the other databases local to the other web server instances?  Since the instances of each webserver can't talk to each other, how can you spin up multiple instances to scale the app?  Is this setup mainly for sites with static content where the data inside the database is not getting changed?  So with an e-commerce site where orders are written to the database, this architecture will just not be feasible?  Or is there some way to get each webserver instance to update their local database to some master copy?</p>
  
  <p>Sorry for such a simple question.  I'm guessing the documentation doesn't say it plainly because it's so simple or I just wasn't able to find the correct document/page.</p>
  
  <p>Thank you for your time!</p>
  
  <p>Update:
  Moved question to here:</p>
  
  <p><a href="https://webmasters.stackexchange.com/questions/32273/cloud-architecture">https://webmasters.stackexchange.com/questions/32273/cloud-architecture</a></p>