Skip to content
tchandy edited this page Sep 14, 2010 · 8 revisions

Ideas

Octopus works using the Proxy Pattern . Basically, Octopus build a proxy between ActiveRecord and Database Connection. The proxy object handles the way of executing queries, when send to multiple shards, or send to master when the database is replicated. Default behaviours are:

  • Replication: Writes queries are sent to master, and reads queries are sent to slaves.
  • Sharding: Writes/Reads queries are sent to master, unless you specified a shard to send the query.
Clone this wiki locally