2

I have just started to use the octopus gem with rails, i tried like for the normal case

octopus:
replicated: true
fully_replicated: false
environments:
- development
development:
shard_one: 
  host: localhost
  adapter: postgresql
  database: app_development

the above i have used for the testing purpose also the main thing is used as the controller specific, not the model specific. I put this in application controller

def select_shard(&block)
  Octopus.using(:shard_two, &block)
end

and call that method in appropriate controller, so its works, but when i move to heroku i have followed this https://devcenter.heroku.com/articles/distributing-reads-to-followers-with-octopus, because i need the reads only for some controller. so in this case how can i use that follower on controller specific?

Developer
  • 561
  • 7
  • 29

0 Answers0