Skip to content

Dynamic shard configuration

tchandy edited this page Jan 9, 2011 · 4 revisions

Dynamic shard configuration

Octopus allows the user to set shards using ruby code. Here is a example of a initializer file:

Octopus.setup do |config|
  config.shards = {:crazy_shard => {:adapter => "mysql", :database => "octopus_shard5", :username => "root", :password => ""}}
  config.environments = [:production, :staging]
end
 
Clone this wiki locally