makara
makara copied to clipboard
Adds the ability to retry for the pool of connection if specified in makara config
This is an attempt to do graceful failover by re-trying at the lowest level. (This isn't ready to be merged in master for makara but we'll use this branch)
Example config:
development:
database: speckel_development
adapter: postgresql_makara
host: localhost
username: speckel
password: 23432
pool: 20
makara:
id: 'development-app-postgres'
disable_blacklist: true
master_ttl: 0.3
sticky: true
retry_exceptions:
- name: ActiveRecord::StatementInvalid
retry_count: 5
time_between_retries_in_seconds: 0.2
connections:
- role: master
name: DB-Writer
host: localhost
port: 5432
blacklist_duration: 0
- role: slave
name: DB-Reader
host: localhost
port: 5433