Code Explainers

Code explainers tagged #read-replica

ruby
class ReportingQuery
  def initialize(scope = ApplicationRecord)
    @scope = scope
  end

Routing heavy reports to a read replica in Rails

read-replica database-roles query-object
Intermediate 6 steps
java
public enum DataSourceType {
    PRIMARY,
    REPLICA
}

Read/write datasource routing in Spring

routing threadlocal read-replica
Intermediate 8 steps