Conversation
Add the per data center DC-DR view to the Redis status, mirroring the Postgres DC-DR API. The cross-DC failover decision is owned by the dr-controlplane primary-DC Lease; this status reflects it on the single distributed Redis object. RedisDisasterRecoveryStatus carries the active DC, the DR phase, and a per Member DC view (RedisDCStatus): the DC master pod, whether it is the writable primary, the cross-DC replication link health (master_link_status) and offset lag in bytes (active master_repl_offset minus this DC master's replicated offset), and DC health. Update the generated deepcopy. Signed-off-by: Tamal Saha <tamal@appscode.com>
Add RedisHorizontalScalingSpec.DataCenters ([]RedisHorizontalScalingDC) so a distributed DC-DR Redis can be scaled per data center: each entry sets a DC's local node count (and, for Cluster mode, its shard count); DCs not listed are unchanged. Each DC is a self-contained Redis scaled independently, so this replaces the top-level Shards/Replicas for a DC-DR cluster. Update the generated deepcopy. Signed-off-by: Tamal Saha <tamal@appscode.com>
…Status Clarify that for a Cluster-mode DC-DR Redis, where cross-DC replication is an external logical sync with no comparable byte offset, LagBytes is the count of heartbeat writes the active DC has produced that this DC has not yet replayed (zero means caught up), and LinkStatus reflects the sync workload health rather than a native master_link_status. Signed-off-by: Tamal Saha <tamal@appscode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The apimachinery API surface for cross data center disaster recovery (DC-DR) of the distributed
Redis/Valkeyengine. This is the release-first piece; the operator and redis-coordinator bump to it.1.
status.disasterRecovery(Redis status)RedisDisasterRecoveryStatusonRedisStatus.disasterRecovery:activeDC,phase(RedisDRPhase: Steady/FailingOver/FailingBack/Degraded), per-DCdataCenters,lastTransitionTime.RedisDCStatus(one per Member DC):clusterName(the OCM managed cluster / DC),role(Member or Arbiter),master(the DC's Redis master pod),writable,linkStatus(cross-DCmaster_link_status),lagBytes(active mastermaster_repl_offsetminus this DC master's replicated offset), andhealthy.The cross-DC failover decision is owned by the
dr-controlplaneprimary-DC Lease; this status only reflects it on the single distributed object. Redis keeps its quorum (gossip or Sentinel) intra-DC; the standby DC's master async-replicates from the active DC's master, so the lag metric is a replication-offset gap.2.
HorizontalScaling.dataCenters(Redis ops)RedisHorizontalScalingSpec.DataCenters([]RedisHorizontalScalingDC) lets a distributed DC-DR Redis be scaled per data center: each entry sets that DC's local node count (and, for Cluster mode, its shard count); DCs not listed are unchanged. Each DC is a self-contained Redis scaled independently, so this replaces the top-levelShards/Replicasfor a DC-DR cluster.Notes
zz_generated.deepcopy.goupdated by hand to match the generated shape (same pattern as the Postgres DR types).go build ./apis/kubedb/v1/ ./apis/ops/v1alpha1/andgofmt -lare clean.Consumed by
kubedb/redis#658 (operator), kubedb/redis#659 (per-DC day-2 ops), kubedb/redis#660 (Cluster-mode sync + per-DC horizontal scaling), kubedb/redis-coordinator#164 (fence), and docs kubedb/docs#943.