Skip to content

Dynamic shard configuration

eabrahamsen-handy edited this page Jul 20, 2015 · 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.environments = [:production, :staging]
  config.config.merge!(replicated: true, fully_replicated: true) #replication when using dynamic configuration
  config.shards = {:crazy_shard => {:adapter => "mysql", :database => "octopus_shard5", :username => "root", :password => ""}}

end
 
Clone this wiki locally