Rails/Mongo across multiple different geo-regions

Posted by wmarbut on Server Fault See other posts from Server Fault or by wmarbut
Published on 2012-11-11T03:17:19Z Indexed on 2012/11/11 5:04 UTC
Read the original article Hit count: 475

I have a system that by necessity requires physical presence in three or more different locations and I need advice on structuring in such a way that my database stays replicated in a timely manner without horrible latency. I've seen mysql access and replication be incredibly slow when the application server was trying to talk to a node that wasn't physically collocated. In this case I am using mongodb.

  • The stack is linux/passenger/ruby/rails/mongodb.
  • The database is write heavy and read light.
  • The infrastructure is Amazon EC2
  • The application layer must be physically located in 3 or more different locations. I can't justify this requirement further than it is a requirement. The database, however needn't be located in more than one location if it can be written to quickly from other locations.

From reading mongo's documentation, mongo replication seems like more of a candidate than sharding b/c my datastore is not huge. However I don't see anything that addresses the issue of speed for servers communicating across large distances with potentially high latency.

© Server Fault or respective owner

Related posts about amazon-ec2

Related posts about ruby-on-rails