Read Replicas

Read Replica

Read Replicas enhance CaaS scalability by distributing read operations across multiple CaaS instances, effectively managing high read traffic without impacting the performance of the primary instance. This approach is ideal for applications requiring fast read access, as it improves response times while preserving the primary instance’s ability to handle write operations efficiently.

To establish a CaaS Read Replica, the system initializes the secondary instance using a snapshot of the primary instance’s dataset. It then employs Redis’s native asynchronous replication to keep the read replica consistently updated with any changes occurring in the primary instance.

Limitations

  • You can create a maximum of three additional read replicas per CaaS.
  • Compute resources and data storage size must be equal to the primary CaaS instance.
  • It is not possible to promote a read replica to a primary instance to enable write access.
  • Cascading configurations, where a replica acts as a source for another replica, are not supported.

Prerequisites

Your application must be configured to distinguish between read and write operations. This involves setting up separate connections for each type of operation:

  • Write Operations: Connections should be directed exclusively to the primary instance, where data modifications (SET, DEL, EXPIRE, etc.) are allowed.
  • Read Operations: Connections for commands that only fetch data (GET, LRANGE, HGETALL, etc.) should be routed to the read replicas.
  • Use of a client that automatically recognizes primary and replica nodes and routes commands accordingly.