Repository: numaproj/numaflow
Pull request #717 (2023-04-30 15:02:49)

feat: Redis7 as an ISB svc
Fixes: #707 

Update the hosted version of Redis to Redis 7.

Tested a Redis 7 ISBSVC with a simple pipeline running:
1. Deleted Leader Pod and observed Sentinel Pods elect new Leader. Simple pipeline was able to recover after new Leader elected.
2. Deleted both Slave Pods and observed them get recreated and rediscovered. Afterward, deleted Leader Pod. Simple pipeline was able to recover after new Leader elected.

<!--

Before you push your changes:

* Run `make pre-push -B` to fix codegen and lint problems.

Then, you MUST:

* Sign-off your commit (otherwise the DCO check will fail).
* Use [a conventional commit message](https://www.conventionalcommits.org/en/v1.0.0/) (otherwise the commit message check will fail).

If you did not do this, reset all your commit and replace them with a single commit:

```
git reset HEAD~1 ;# change 1 to how many commits you made
git commit --signoff -m 'feat: my feat. Fixes #1234'
```

When creating your PR: 

* Make sure that "Fixes #" or "Closes #" is in both the PR title (for release notes) and description (to automatically link and close the issue).
* Say how you tested your changes. If you changed the UI, attach screenshots.
* Set your PR as a draft initially.
* Your PR needs to pass the required checks before it can be approved. 
* Once required tests have passed, mark your PR "Ready for review".

If changes were requested, once you've made them, you MUST dismiss the review to get it reviewed again.

-->


whynowy: @juliev0 - can we make the redis default settings like below?

```
      redis:
        # Default Redis settings, could be overridden by InterStepBufferService specs
        settings:
          # Redis config shared by both master and replicas
          redis: |
            min-replicas-to-write 1
            # Disable RDB persistence, AOF persistence already enabled.
            save ""
            # Enable AOF https://redis.io/topics/persistence#append-only-file
            appendonly yes
            auto-aof-rewrite-percentage 100
            auto-aof-rewrite-min-size 64mb
            maxmemory 512mb
            maxmemory-policy allkeys-lru
          # Special config only used by master
          master: ""
          # Special config only used by replicas
          replica: ""
          # Sentinel config
          sentinel: |
            sentinel down-after-milliseconds mymaster 10000
            sentinel failover-timeout mymaster 2000
            sentinel parallel-syncs mymaster 1
```
whynowy: @juliev0 - could you resolve the conflict?
juliev0: > @juliev0 - could you resolve the conflict?

resolved and confirmed everything still works

Patch:
diff --git a/config/advanced-install/namespaced-controller-wo-crds.yaml b/config/advanced-install/namespaced-controller-wo-crds.yaml
index f51cd9a5..a7a0ff05 100644
--- a/config/advanced-install/namespaced-controller-wo-crds.yaml
+++ b/config/advanced-install/namespaced-controller-wo-crds.yaml
@@ -126,27 +126,26 @@ data:
             min-replicas-to-write 1
             # Disable RDB persistence, AOF persistence already enabled.
             save ""
-            maxmemory 512mb
-            maxmemory-policy allkeys-lru
-          # Special config only used by master
-          master: |
-            appendonly no
-          # Special config only used by replicas
-          replica: |
             # Enable AOF https://redis.io/topics/persistence#append-only-file
             appendonly yes
             auto-aof-rewrite-percentage 100
             auto-aof-rewrite-min-size 64mb
+            maxmemory 512mb
+            maxmemory-policy allkeys-lru
+          # Special config only used by master
+          master: ""
+          # Special config only used by replicas
+          replica: ""
           # Sentinel config
           sentinel: |
             sentinel down-after-milliseconds mymaster 10000
             sentinel failover-timeout mymaster 2000
             sentinel parallel-syncs mymaster 1
         versions:
-        - version: 6.2.6
-          redisImage: bitnami/redis:6.2.6-debian-10-r97
-          sentinelImage: bitnami/redis-sentinel:6.2.6-debian-10-r95
-          redisExporterImage: bitnami/redis-exporter:1.33.0-debian-10-r21
+        - version: 7.0.11
+          redisImage: bitnami/redis:7.0.11-debian-11-r3
+          sentinelImage: bitnami/redis-sentinel:7.0.11-debian-11-r3
+          redisExporterImage: bitnami/redis-exporter:1.50.0-debian-11-r4
           initContainerImage: debian:latest
       jetstream:
         # Default JetStream settings, could be overridden by InterStepBufferService specs
diff --git a/config/base/controller-manager/numaflow-controller-config.yaml b/config/base/controller-manager/numaflow-controller-config.yaml
index 6ea15406..c1661131 100644
--- a/config/base/controller-manager/numaflow-controller-config.yaml
+++ b/config/base/controller-manager/numaflow-controller-config.yaml
@@ -13,27 +13,26 @@ data:
             min-replicas-to-write 1
             # Disable RDB persistence, AOF persistence already enabled.
             save ""
-            maxmemory 512mb
-            maxmemory-policy allkeys-lru
-          # Special config only used by master
-          master: |
-            appendonly no
-          # Special config only used by replicas
-          replica: |
             # Enable AOF https://redis.io/topics/persistence#append-only-file
             appendonly yes
             auto-aof-rewrite-percentage 100
             auto-aof-rewrite-min-size 64mb
+            maxmemory 512mb
+            maxmemory-policy allkeys-lru
+          # Special config only used by master
+          master: ""
+          # Special config only used by replicas
+          replica: ""
           # Sentinel config
           sentinel: |
             sentinel down-after-milliseconds mymaster 10000
             sentinel failover-timeout mymaster 2000
             sentinel parallel-syncs mymaster 1
         versions:
-        - version: 6.2.6
-          redisImage: bitnami/redis:6.2.6-debian-10-r97
-          sentinelImage: bitnami/redis-sentinel:6.2.6-debian-10-r95
-          redisExporterImage: bitnami/redis-exporter:1.33.0-debian-10-r21
+        - version: 7.0.11
+          redisImage: bitnami/redis:7.0.11-debian-11-r3
+          sentinelImage: bitnami/redis-sentinel:7.0.11-debian-11-r3
+          redisExporterImage: bitnami/redis-exporter:1.50.0-debian-11-r4
           initContainerImage: debian:latest
       jetstream:
         # Default JetStream settings, could be overridden by InterStepBufferService specs
diff --git a/config/install.yaml b/config/install.yaml
index 5fcb4f62..8461c9df 100644
--- a/config/install.yaml
+++ b/config/install.yaml
@@ -12539,27 +12539,26 @@ data:
             min-replicas-to-write 1
             # Disable RDB persistence, AOF persistence already enabled.
             save ""
-            maxmemory 512mb
-            maxmemory-policy allkeys-lru
-          # Special config only used by master
-          master: |
-            appendonly no
-          # Special config only used by replicas
-          replica: |
             # Enable AOF https://redis.io/topics/persistence#append-only-file
             appendonly yes
             auto-aof-rewrite-percentage 100
             auto-aof-rewrite-min-size 64mb
+            maxmemory 512mb
+            maxmemory-policy allkeys-lru
+          # Special config only used by master
+          master: ""
+          # Special config only used by replicas
+          replica: ""
           # Sentinel config
           sentinel: |
             sentinel down-after-milliseconds mymaster 10000
             sentinel failover-timeout mymaster 2000
             sentinel parallel-syncs mymaster 1
         versions:
-        - version: 6.2.6
-          redisImage: bitnami/redis:6.2.6-debian-10-r97
-          sentinelImage: bitnami/redis-sentinel:6.2.6-debian-10-r95
-          redisExporterImage: bitnami/redis-exporter:1.33.0-debian-10-r21
+        - version: 7.0.11
+          redisImage: bitnami/redis:7.0.11-debian-11-r3
+          sentinelImage: bitnami/redis-sentinel:7.0.11-debian-11-r3
+          redisExporterImage: bitnami/redis-exporter:1.50.0-debian-11-r4
           initContainerImage: debian:latest
       jetstream:
         # Default JetStream settings, could be overridden by InterStepBufferService specs
diff --git a/config/namespace-install.yaml b/config/namespace-install.yaml
index f497e595..920f489e 100644
--- a/config/namespace-install.yaml
+++ b/config/namespace-install.yaml
@@ -12450,27 +12450,26 @@ data:
             min-replicas-to-write 1
             # Disable RDB persistence, AOF persistence already enabled.
             save ""
-            maxmemory 512mb
-            maxmemory-policy allkeys-lru
-          # Special config only used by master
-          master: |
-            appendonly no
-          # Special config only used by replicas
-          replica: |
             # Enable AOF https://redis.io/topics/persistence#append-only-file
             appendonly yes
             auto-aof-rewrite-percentage 100
             auto-aof-rewrite-min-size 64mb
+            maxmemory 512mb
+            maxmemory-policy allkeys-lru
+          # Special config only used by master
+          master: ""
+          # Special config only used by replicas
+          replica: ""
           # Sentinel config
           sentinel: |
             sentinel down-after-milliseconds mymaster 10000
             sentinel failover-timeout mymaster 2000
             sentinel parallel-syncs mymaster 1
         versions:
-        - version: 6.2.6
-          redisImage: bitnami/redis:6.2.6-debian-10-r97
-          sentinelImage: bitnami/redis-sentinel:6.2.6-debian-10-r95
-          redisExporterImage: bitnami/redis-exporter:1.33.0-debian-10-r21
+        - version: 7.0.11
+          redisImage: bitnami/redis:7.0.11-debian-11-r3
+          sentinelImage: bitnami/redis-sentinel:7.0.11-debian-11-r3
+          redisExporterImage: bitnami/redis-exporter:1.50.0-debian-11-r4
           initContainerImage: debian:latest
       jetstream:
         # Default JetStream settings, could be overridden by InterStepBufferService specs
diff --git a/docs/operations/numaflow-controller-config.yaml b/docs/operations/numaflow-controller-config.yaml
index bf7b33b6..a970a955 100644
--- a/docs/operations/numaflow-controller-config.yaml
+++ b/docs/operations/numaflow-controller-config.yaml
@@ -30,10 +30,10 @@ data:
             sentinel failover-timeout mymaster 2000
             sentinel parallel-syncs mymaster 1
         versions:
-        - version: 6.2.6
-          redisImage: bitnami/redis:6.2.6-debian-10-r97
-          sentinelImage: bitnami/redis-sentinel:6.2.6-debian-10-r95
-          redisExporterImage: bitnami/redis-exporter:1.33.0-debian-10-r21
+        - version: 7.0.11
+          redisImage: bitnami/redis:7.0.11-debian-11-r3
+          sentinelImage: bitnami/redis-sentinel:7.0.11-debian-11-r3
+          redisExporterImage: bitnami/redis-exporter:1.50.0-debian-11-r4
           initContainerImage: debian:latest
       jetstream:
         # Default JetStream settings, could be overridden by InterStepBufferService specs
diff --git a/go.mod b/go.mod
index f16ff3a5..ea6fdbfd 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,6 @@ require (
 	github.com/gavv/httpexpect/v2 v2.3.1
 	github.com/gin-contrib/static v0.0.2-0.20220606235426-ae09b2ea7e39
 	github.com/gin-gonic/gin v1.9.0
-	github.com/go-redis/redis/v8 v8.11.4
 	github.com/go-swagger/go-swagger v0.28.0
 	github.com/goccy/go-json v0.10.0
 	github.com/gogo/protobuf v1.3.2
@@ -30,6 +29,7 @@ require (
 	github.com/numaproj/numaflow-go v0.4.5
 	github.com/prometheus/client_golang v1.12.1
 	github.com/prometheus/common v0.32.1
+	github.com/redis/go-redis/v9 v9.0.3
 	github.com/soheilhy/cmux v0.1.5
 	github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72
 	github.com/spf13/cobra v1.2.1
diff --git a/go.sum b/go.sum
index f43ecadf..69cf8f2a 100644
--- a/go.sum
+++ b/go.sum
@@ -116,6 +116,8 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
 github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
 github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
 github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
+github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
+github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
 github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
 github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA=
 github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
@@ -353,8 +355,6 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
 github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
 github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
 github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
-github.com/go-redis/redis/v8 v8.11.4 h1:kHoYkfZP6+pe04aFTnhDH6GDROa5yJdHJVNxV3F46Tg=
-github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
 github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
@@ -362,7 +362,6 @@ github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP
 github.com/go-swagger/go-swagger v0.28.0 h1:cFzm/DrsqKiDeBpzRDu5N3vjraU3O9IfpFfz+TscKWY=
 github.com/go-swagger/go-swagger v0.28.0/go.mod h1:1wxbEy+GKxzK/Lzsz/sAcLl53GotzCLOHl/PPiodGt8=
 github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 h1:l9rI6sNaZgNC0LnF3MiE+qTmyBA/tZAg1rtyrGbUMK0=
-github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
 github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
 github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
 github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
@@ -712,7 +711,6 @@ github.com/numaproj/numaflow-go v0.4.5 h1:t8oDmP32eABCGBXAOOXSGeTEPzX+gPW0plPoeM
 github.com/numaproj/numaflow-go v0.4.5/go.mod h1:6hl5mLd3BFDNJ4gJhrft9vuHHPaog68iog2KkibHnbo=
 github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
 github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
-github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
 github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
 github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
 github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -720,13 +718,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
 github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
-github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
 github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
 github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
 github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
 github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
 github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=
 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
@@ -786,6 +782,8 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/redis/go-redis/v9 v9.0.3 h1:+7mmR26M0IvyLxGZUHxu4GiBkJkVDid0Un+j4ScYu4k=
+github.com/redis/go-redis/v9 v9.0.3/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
 github.com/rivo/tview v0.0.0-20200219210816-cd38d7432498/go.mod h1:6lkG1x+13OShEf0EaOCaTQYyB7d5nSbb181KtjlS+84=
 github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
 github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
@@ -1083,7 +1081,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
 golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
 golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
 golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
-golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
 golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
@@ -1187,7 +1184,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1298,7 +1294,6 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u
 golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
diff --git a/pkg/apis/numaflow/v1alpha1/redis_buffer_service.go b/pkg/apis/numaflow/v1alpha1/redis_buffer_service.go
index 76d62a2d..52a82eb2 100644
--- a/pkg/apis/numaflow/v1alpha1/redis_buffer_service.go
+++ b/pkg/apis/numaflow/v1alpha1/redis_buffer_service.go
@@ -110,8 +110,8 @@ func (nr NativeRedis) GetServiceSpec(req GetRedisServiceSpecReq) corev1.ServiceS
 			{Name: "tcp-redis", Port: req.RedisContainerPort},
 			{Name: "tcp-sentinel", Port: req.SentinelContainerPort},
 		},
-		Type:     corev1.ServiceTypeClusterIP,
-		Selector: req.Labels,
+		Selector:                 req.Labels,
+		PublishNotReadyAddresses: true,
 	}
 }
 
@@ -200,6 +200,8 @@ func (nr NativeRedis) GetStatefulSetSpec(req GetRedisStatefulSetSpecReq) appv1.S
 					{Name: "REDIS_MASTER_PASSWORD", ValueFrom: &corev1.EnvVarSource{SecretKeyRef: &corev1.SecretKeySelector{LocalObjectReference: corev1.LocalObjectReference{Name: req.CredentialSecretName}, Key: RedisAuthSecretKey}}},
 					{Name: "REDIS_TLS_ENABLED", Value: "no"},
 					{Name: "REDIS_PORT", Value: fmt.Sprint(req.RedisContainerPort)},
+					{Name: "REDIS_SENTINEL_TLS_ENABLED", Value: "no"},
+					{Name: "REDIS_SENTINEL_PORT", Value: fmt.Sprint(req.SentinelContainerPort)},
 					{Name: "REDIS_DATA_DIR", Value: "/data"},
 				},
 				Lifecycle: &corev1.Lifecycle{
@@ -224,18 +226,32 @@ func (nr NativeRedis) GetStatefulSetSpec(req GetRedisStatefulSetSpecReq) appv1.S
 					},
 					InitialDelaySeconds: 20,
 					TimeoutSeconds:      5,
+					PeriodSeconds:       5,
 					FailureThreshold:    5,
 				},
 				ReadinessProbe: &corev1.Probe{
 					ProbeHandler: corev1.ProbeHandler{
 						Exec: &corev1.ExecAction{
-							Command: []string{"sh", "-c", "/health/ping_readiness_local.sh 5"},
+							Command: []string{"sh", "-c", "/health/ping_readiness_local.sh 1"},
 						},
 					},
 					InitialDelaySeconds: 20,
-					TimeoutSeconds:      5,
+					TimeoutSeconds:      1,
+					PeriodSeconds:       5,
 					FailureThreshold:    5,
 				},
+				StartupProbe: &corev1.Probe{
+					ProbeHandler: corev1.ProbeHandler{
+						Exec: &corev1.ExecAction{
+							Command: []string{"sh", "-c", "/health/ping_liveness_local.sh 5"},
+						},
+					},
+					InitialDelaySeconds: 10,
+					TimeoutSeconds:      5,
+					PeriodSeconds:       10,
+					FailureThreshold:    22,
+					SuccessThreshold:    1,
+				},
 			},
 			{
 				Name:            "sentinel",
@@ -268,17 +284,31 @@ func (nr NativeRedis) GetStatefulSetSpec(req GetRedisStatefulSetSpecReq) appv1.S
 					InitialDelaySeconds: 20,
 					TimeoutSeconds:      5,
 					FailureThreshold:    5,
+					PeriodSeconds:       5,
 				},
 				ReadinessProbe: &corev1.Probe{
 					ProbeHandler: corev1.ProbeHandler{
 						Exec: &corev1.ExecAction{
-							Command: []string{"sh", "-c", "/health/ping_sentinel.sh 5"},
+							Command: []string{"sh", "-c", "/health/ping_sentinel.sh 1"},
 						},
 					},
 					InitialDelaySeconds: 20,
-					TimeoutSeconds:      5,
+					TimeoutSeconds:      1,
+					PeriodSeconds:       5,
 					FailureThreshold:    5,
 				},
+				StartupProbe: &corev1.Probe{
+					ProbeHandler: corev1.ProbeHandler{
+						Exec: &corev1.ExecAction{
+							Command: []string{"sh", "-c", "/health/ping_sentinel.sh 5"},
+						},
+					},
+					InitialDelaySeconds: 10,
+					TimeoutSeconds:      5,
+					PeriodSeconds:       10,
+					FailureThreshold:    22,
+					SuccessThreshold:    1,
+				},
 				VolumeMounts: []corev1.VolumeMount{
 					{Name: "start-scripts", MountPath: "/opt/bitnami/scripts/start-scripts"},
 					{Name: "health", MountPath: "/health"},
@@ -306,6 +336,7 @@ redis_exporter`},
 		},
 	}
 	nr.AbstractPodTemplate.ApplyToPodSpec(podSpec)
+
 	spec := appv1.StatefulSetSpec{
 		Replicas:    &replicas,
 		ServiceName: req.ServiceName,
@@ -374,8 +405,8 @@ redis_exporter`},
 		runAsUser := int64(1001)
 		fsGroup := int64(1001)
 		runAsUser0 := int64(0)
-		spec.Template.Spec.Containers[0].SecurityContext = &corev1.SecurityContext{RunAsUser: &runAsUser}
-		spec.Template.Spec.Containers[1].SecurityContext = &corev1.SecurityContext{RunAsUser: &runAsUser}
+		spec.Template.Spec.Containers[0].SecurityContext = &corev1.SecurityContext{RunAsUser: &runAsUser, RunAsGroup: &fsGroup}
+		spec.Template.Spec.Containers[1].SecurityContext = &corev1.SecurityContext{RunAsUser: &runAsUser, RunAsGroup: &fsGroup}
 		spec.Template.Spec.InitContainers = []corev1.Container{
 			{
 				Name:            "volume-permissions",
diff --git a/pkg/isb/stores/redis/read.go b/pkg/isb/stores/redis/read.go
index e6774737..99f62144 100644
--- a/pkg/isb/stores/redis/read.go
+++ b/pkg/isb/stores/redis/read.go
@@ -22,7 +22,7 @@ import (
 	"sync"
 	"time"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 	"go.uber.org/atomic"
 	"go.uber.org/zap"
 
diff --git a/pkg/isb/stores/redis/write.go b/pkg/isb/stores/redis/write.go
index 1c704b41..7b193782 100644
--- a/pkg/isb/stores/redis/write.go
+++ b/pkg/isb/stores/redis/write.go
@@ -23,7 +23,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 	"go.uber.org/atomic"
 	"go.uber.org/zap"
 
diff --git a/pkg/isb/stores/redis/write_info.go b/pkg/isb/stores/redis/write_info.go
index 27fde2ca..833eca35 100644
--- a/pkg/isb/stores/redis/write_info.go
+++ b/pkg/isb/stores/redis/write_info.go
@@ -23,7 +23,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 	"go.uber.org/zap"
 
 	redisclient "github.com/numaproj/numaflow/pkg/shared/clients/redis"
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/config/replica.conf b/pkg/reconciler/isbsvc/installer/assets/redis/config/replica.conf
index 45e41607..e0e5ff4b 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/config/replica.conf
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/config/replica.conf
@@ -1,5 +1,4 @@
 dir /data
-slave-read-only yes
 # User-supplied replica configuration:
 rename-command FLUSHDB ""
 rename-command FLUSHALL ""
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_local.sh b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_local.sh
index 8ede9df4..964e5525 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_local.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_local.sh
@@ -3,13 +3,18 @@
 [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
 [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
 response=$(
-  timeout -s 3 $1 \
+  timeout -s 15 $1 \
   redis-cli \
     -h localhost \
     -p $REDIS_PORT \
     ping
 )
-if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
+if [ "$?" -eq "124" ]; then
+  echo "Timed out"
+  exit 1
+fi
+responseFirstWord=$(echo $response | head -n1 | awk '{print $1;}')
+if [ "$response" != "PONG" ] && [ "$responseFirstWord" != "LOADING" ] && [ "$responseFirstWord" != "MASTERDOWN" ]; then
   echo "$response"
   exit 1
 fi
\ No newline at end of file
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_master.sh b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_master.sh
index 0bfecd49..849982ab 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_master.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_liveness_master.sh
@@ -3,13 +3,18 @@
 [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
 [[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
 response=$(
-  timeout -s 3 $1 \
+  timeout -s 15 $1 \
   redis-cli \
     -h $REDIS_MASTER_HOST \
     -p $REDIS_MASTER_PORT_NUMBER \
     ping
 )
-if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
+if [ "$?" -eq "124" ]; then
+  echo "Timed out"
+  exit 1
+fi
+responseFirstWord=$(echo $response | head -n1 | awk '{print $1;}')
+if [ "$response" != "PONG" ] && [ "$responseFirstWord" != "LOADING" ]; then
   echo "$response"
   exit 1
 fi
\ No newline at end of file
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_local.sh b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_local.sh
index d022f9bd..080273fb 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_local.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_local.sh
@@ -3,12 +3,16 @@
 [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
 [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
 response=$(
-  timeout -s 3 $1 \
+  timeout -s 15 $1 \
   redis-cli \
     -h localhost \
     -p $REDIS_PORT \
     ping
 )
+if [ "$?" -eq "124" ]; then
+  echo "Timed out"
+  exit 1
+fi
 if [ "$response" != "PONG" ]; then
   echo "$response"
   exit 1
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_master.sh b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_master.sh
index 3c044fff..869dad7f 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_master.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_readiness_master.sh
@@ -1,14 +1,20 @@
 #!/bin/bash
-
-[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
-[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
+[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(<
+"${REDIS_MASTER_PASSWORD_FILE}")"
+[[ -n "$REDIS_MASTER_PASSWORD" ]] && export
+REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
 response=$(
-  timeout -s 3 $1 \
+  timeout -s 15 $1 \
   redis-cli \
     -h $REDIS_MASTER_HOST \
     -p $REDIS_MASTER_PORT_NUMBER \
     ping
 )
+if [ "$?" -eq "124" ]; then
+  echo "Timed out"
+  exit 1
+fi
+
 if [ "$response" != "PONG" ]; then
   echo "$response"
   exit 1
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_sentinel.sh b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_sentinel.sh
index f09385cc..841cd946 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_sentinel.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/health/ping_sentinel.sh
@@ -2,12 +2,16 @@
 [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
 [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
 response=$(
-  timeout -s 3 $1 \
+  timeout -s 15 $1 \
   redis-cli \
     -h localhost \
     -p $REDIS_SENTINEL_PORT \
     ping
 )
+if [ "$?" -eq "124" ]; then
+  echo "Timed out"
+  exit 1
+fi
 if [ "$response" != "PONG" ]; then
   echo "$response"
   exit 1
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-redis.sh b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-redis.sh
index d348689b..d751d469 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-redis.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-redis.sh
@@ -7,21 +7,54 @@ run_redis_command() {
     if is_boolean_yes "$REDIS_TLS_ENABLED"; then
         redis-cli -h 127.0.0.1 -p "$REDIS_TLS_PORT" --tls --cert "$REDIS_TLS_CERT_FILE" --key "$REDIS_TLS_KEY_FILE" --cacert "$REDIS_TLS_CA_FILE" "$@"
     else
-        redis-cli -h 127.0.0.1 -p ${REDIS_PORT} "$@"
+        redis-cli -h 127.0.0.1 -p "$REDIS_PORT" "$@"
     fi
 }
-failover_finished() {
+is_master() {
     REDIS_ROLE=$(run_redis_command role | head -1)
-    [[ "$REDIS_ROLE" != "master" ]]
+    [[ "$REDIS_ROLE" == "master" ]]
 }
 
+HEADLESS_SERVICE="{{.HeadlessServiceName}}.{{.Namespace}}.svc.cluster.local"
+SENTINEL_SERVICE_ENV_NAME=REDIS_SENTINEL_SERVICE_PORT_TCP_SENTINEL
+SENTINEL_SERVICE_PORT=$(get_port "{{.ServiceName}}" "TCP_SENTINEL")
+REDIS_SERVICE="{{.ServiceName}}.{{.Namespace}}.svc.cluster.local"
+
+get_full_hostname() {
+    hostname="$1"
+    full_hostname="${hostname}.${HEADLESS_SERVICE}"
+    echo "${full_hostname}"
+}
+
+run_sentinel_command() {
+    if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then
+        redis-cli -h "$REDIS_SERVICE" -p "$SENTINEL_SERVICE_PORT" --tls --cert "$REDIS_SENTINEL_TLS_CERT_FILE" --key "$REDIS_SENTINEL_TLS_KEY_FILE" --cacert "$REDIS_SENTINEL_TLS_CA_FILE" sentinel "$@"
+    else
+        redis-cli -h "$REDIS_SERVICE" -p "$SENTINEL_SERVICE_PORT" sentinel "$@"
+    fi
+}
+sentinel_failover_finished() {
+    REDIS_SENTINEL_INFO=($(run_sentinel_command get-master-addr-by-name "mymaster"))
+    REDIS_MASTER_HOST="${REDIS_SENTINEL_INFO[0]}"
+    [[ "$REDIS_MASTER_HOST" != "$(get_full_hostname $HOSTNAME)" ]]
+}
+
+
 # redis-cli automatically consumes credentials from the REDISCLI_AUTH variable
 [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
 [[ -f "$REDIS_PASSWORD_FILE" ]] && export REDISCLI_AUTH="$(< "${REDIS_PASSWORD_FILE}")"
 
-if ! failover_finished; then
-    echo "Waiting for sentinel to run failover for up to 20s"
-    retry_while "failover_finished" "20" 1
+
+if is_master && ! sentinel_failover_finished; then
+    echo "I am the master pod and you are stopping me. Pausing client connections."
+    # Pausing client write connections to avoid data loss
+    run_redis_command CLIENT PAUSE "22000" WRITE
+
+    echo "Issuing failover"
+    # if I am the master, issue a command to failover once
+    run_sentinel_command failover "mymaster"
+    echo "Waiting for sentinel to complete failover for up to 20s"
+    retry_while "sentinel_failover_finished" "20" 1
 else
     exit 0
-fi
+fi
\ No newline at end of file
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-sentinel.sh b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-sentinel.sh
index 7c9d2d0b..fdba70db 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-sentinel.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/prestop-sentinel.sh
@@ -6,11 +6,14 @@
 HEADLESS_SERVICE="{{.HeadlessServiceName}}.{{.Namespace}}.svc.cluster.local"
 SENTINEL_SERVICE_ENV_NAME=REDIS_SENTINEL_SERVICE_PORT_TCP_SENTINEL
 SENTINEL_SERVICE_PORT=${!SENTINEL_SERVICE_ENV_NAME}
+REDIS_SERVICE="{{.ServiceName}}.{{.Namespace}}.svc.cluster.local"
 
 get_full_hostname() {
     hostname="$1"
-    echo "${hostname}.${HEADLESS_SERVICE}"
+    full_hostname="${hostname}.${HEADLESS_SERVICE}"
+    echo "${full_hostname}"
 }
+
 run_sentinel_command() {
     if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then
         redis-cli -h "$REDIS_SERVICE" -p "$SENTINEL_SERVICE_PORT" --tls --cert "$REDIS_SENTINEL_TLS_CERT_FILE" --key "$REDIS_SENTINEL_TLS_KEY_FILE" --cacert "$REDIS_SENTINEL_TLS_CA_FILE" sentinel "$@"
@@ -18,23 +21,20 @@ run_sentinel_command() {
         redis-cli -h "$REDIS_SERVICE" -p "$SENTINEL_SERVICE_PORT" sentinel "$@"
     fi
 }
-failover_finished() {
-  REDIS_SENTINEL_INFO=($(run_sentinel_command get-master-addr-by-name "mymaster"))
-  REDIS_MASTER_HOST="${REDIS_SENTINEL_INFO[0]}"
-  [[ "$REDIS_MASTER_HOST" != "$(get_full_hostname $HOSTNAME)" ]]
+sentinel_failover_finished() {
+    REDIS_SENTINEL_INFO=($(run_sentinel_command get-master-addr-by-name "mymaster"))
+    REDIS_MASTER_HOST="${REDIS_SENTINEL_INFO[0]}"
+    [[ "$REDIS_MASTER_HOST" != "$(get_full_hostname $HOSTNAME)" ]]
 }
 
-REDIS_SERVICE="{{.ServiceName}}.{{.Namespace}}.svc.cluster.local"
 
 # redis-cli automatically consumes credentials from the REDISCLI_AUTH variable
 [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
 [[ -f "$REDIS_PASSWORD_FILE" ]] && export REDISCLI_AUTH="$(< "${REDIS_PASSWORD_FILE}")"
 
-if ! failover_finished; then
+if ! sentinel_failover_finished; then
     echo "I am the master pod and you are stopping me. Starting sentinel failover"
-    # if I am the master, issue a command to failover once and then wait for the failover to finish
-    run_sentinel_command failover "mymaster"
-    if retry_while "failover_finished" "20" 1; then
+    if retry_while "sentinel_failover_finished" "20" 1; then
         echo "Master has been successfuly failed over to a different pod."
         exit 0
     else
@@ -43,4 +43,4 @@ if ! failover_finished; then
     fi
 else
     exit 0
-fi
+fi
\ No newline at end of file
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-node.sh b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-node.sh
index ed43d49a..3209a8be 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-node.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-node.sh
@@ -10,7 +10,7 @@ get_port() {
 
     port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g")
     port=${!port_var}
-    
+
     if [ -z "$port" ]; then
         case $type in
             "SENTINEL")
@@ -27,30 +27,16 @@ get_port() {
 
 get_full_hostname() {
     hostname="$1"
-    echo "${hostname}.${HEADLESS_SERVICE}"
+    full_hostname="${hostname}.${HEADLESS_SERVICE}"
+    echo "${full_hostname}"
 }
 
 REDISPORT=$(get_port "$HOSTNAME" "REDIS")
 
-myip=$(hostname -i)
-
-# If there are more than one IP, use the first IPv4 address
-if [[ "$myip" = *" "* ]]; then
-    myip=$(echo $myip | awk '{if ( match($0,/([0-9]+\.)([0-9]+\.)([0-9]+\.)[0-9]+/) ) { print substr($0,RSTART,RLENGTH); } }')
-fi
-
 HEADLESS_SERVICE="{{.HeadlessServiceName}}.{{.Namespace}}.svc.cluster.local"
 REDIS_SERVICE="{{.ServiceName}}.{{.Namespace}}.svc.cluster.local"
 SENTINEL_SERVICE_PORT=$(get_port "{{.ServiceName}}" "TCP_SENTINEL")
 
-not_exists_dns_entry() {
-    if [[ -z "$(getent ahosts "$HEADLESS_SERVICE" | grep "^${myip}" )" ]]; then
-        warn "$HEADLESS_SERVICE does not contain the IP of this pod: ${myip}"
-        return 1
-    fi
-    debug "$HEADLESS_SERVICE has my IP: ${myip}"
-    return 0
-}
 
 validate_quorum() {
     if is_boolean_yes "$REDIS_TLS_ENABLED"; then
@@ -58,7 +44,6 @@ validate_quorum() {
     else
         quorum_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel master mymaster"
     fi
-
     info "about to run the command: $quorum_info_command"
     eval $quorum_info_command | grep -Fq "s_down"
 }
@@ -76,9 +61,9 @@ trigger_manual_failover() {
 
 get_sentinel_master_info() {
     if is_boolean_yes "$REDIS_TLS_ENABLED"; then
-        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_TLS_CERT_FILE} --key ${REDIS_TLS_KEY_FILE} --cacert ${REDIS_TLS_CA_FILE} sentinel get-master-addr-by-name mymaster"
+        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" timeout 220 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_TLS_CERT_FILE} --key ${REDIS_TLS_KEY_FILE} --cacert ${REDIS_TLS_CA_FILE} sentinel get-master-addr-by-name mymaster"
     else
-        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name mymaster"
+        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" timeout 220 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name mymaster"
     fi
 
     info "about to run the command: $sentinel_info_command"
@@ -88,35 +73,52 @@ get_sentinel_master_info() {
 [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
 [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
 
-# Waits for DNS to add this ip to the service DNS entry
-retry_while not_exists_dns_entry
-
-if [[ -z "$(getent ahosts "$HEADLESS_SERVICE" | grep -v "^${myip}")" ]]; then
-    # Only node available on the network, master by default
-    export REDIS_REPLICATION_MODE="master"
+# check if there is a master
+master_in_persisted_conf="$(get_full_hostname "$HOSTNAME")"
+master_port_in_persisted_conf="$REDIS_MASTER_PORT_NUMBER"
+master_in_sentinel="$(get_sentinel_master_info)"
+redisRetVal=$?
+
+if [[ $redisRetVal -ne 0 ]]; then
+    if [[ "$master_in_persisted_conf" == "$(get_full_hostname "$HOSTNAME")" ]]; then
+        # Case 1: No active sentinel and in previous sentinel.conf we were the master --> MASTER
+        info "Configuring the node as master"
+        export REDIS_REPLICATION_MODE="master"
+    else
+        # Case 2: No active sentinel and in previous sentinel.conf we were not master --> REPLICA
+        info "Configuring the node as replica"
+        export REDIS_REPLICATION_MODE="replica"
+        REDIS_MASTER_HOST=${master_in_persisted_conf}
+        REDIS_MASTER_PORT_NUMBER=${master_port_in_persisted_conf}
+    fi
 else
-    export REDIS_REPLICATION_MODE="slave"
-    
     # Fetches current master's host and port
     REDIS_SENTINEL_INFO=($(get_sentinel_master_info))
-    info "printing REDIS_SENTINEL_INFO=(${REDIS_SENTINEL_INFO[0]},${REDIS_SENTINEL_INFO[1]})"
+    info "Current master: REDIS_SENTINEL_INFO=(${REDIS_SENTINEL_INFO[0]},${REDIS_SENTINEL_INFO[1]})"
     REDIS_MASTER_HOST=${REDIS_SENTINEL_INFO[0]}
     REDIS_MASTER_PORT_NUMBER=${REDIS_SENTINEL_INFO[1]}
-fi
 
-if [[ "$REDIS_REPLICATION_MODE" = "master" ]]; then
-    debug "Starting as master node"
-    if [[ ! -f /opt/bitnami/redis/etc/master.conf ]]; then
-        cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf
-    fi
-else
-    debug "Starting as replica node"
-    if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then
-        cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf
+    if [[ "$REDIS_MASTER_HOST" == "$(get_full_hostname "$HOSTNAME")" ]]; then
+        # Case 3: Active sentinel and master it is this node --> MASTER
+        info "Configuring the node as master"
+        export REDIS_REPLICATION_MODE="master"
+    else
+        # Case 4: Active sentinel and master is not this node --> REPLICA
+        info "Configuring the node as replica"
+        export REDIS_REPLICATION_MODE="replica"
     fi
 fi
 
-if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
+if [[ -n "$REDIS_EXTERNAL_MASTER_HOST" ]]; then
+    REDIS_MASTER_HOST="$REDIS_EXTERNAL_MASTER_HOST"
+    REDIS_MASTER_PORT_NUMBER="${REDIS_EXTERNAL_MASTER_PORT}"
+fi
+
+if [[ -f /opt/bitnami/redis/mounted-etc/replica.conf ]];then
+    cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf
+fi
+
+if [[ -f /opt/bitnami/redis/mounted-etc/redis.conf ]];then
     cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
 fi
 
@@ -125,15 +127,11 @@ echo "replica-announce-port $REDISPORT" >> /opt/bitnami/redis/etc/replica.conf
 echo "replica-announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis/etc/replica.conf
 ARGS=("--port" "${REDIS_PORT}")
 
-if [[ "$REDIS_REPLICATION_MODE" = "slave" ]]; then
-    ARGS+=("--slaveof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}")
+if [[ "$REDIS_REPLICATION_MODE" = "slave" ]] || [[ "$REDIS_REPLICATION_MODE" = "replica" ]]; then
+    ARGS+=("--replicaof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}")
 fi
 ARGS+=("--requirepass" "${REDIS_PASSWORD}")
 ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}")
-if [[ "$REDIS_REPLICATION_MODE" = "master" ]]; then
-    ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf")
-else
-    ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf")
-fi
+ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf")
 ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
-exec redis-server "${ARGS[@]}"
+exec redis-server "${ARGS[@]}"
\ No newline at end of file
diff --git a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-sentinel.sh b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-sentinel.sh
index f7450b43..3a268638 100644
--- a/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-sentinel.sh
+++ b/pkg/reconciler/isbsvc/installer/assets/redis/scripts/start-sentinel.sh
@@ -13,7 +13,7 @@ get_port() {
 
     port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g")
     port=${!port_var}
-    
+
     if [ -z "$port" ]; then
         case $type in
             "SENTINEL")
@@ -30,21 +30,14 @@ get_port() {
 
 get_full_hostname() {
     hostname="$1"
-    echo "${hostname}.${HEADLESS_SERVICE}"
+    full_hostname="${hostname}.${HEADLESS_SERVICE}"
+    echo "${full_hostname}"
 }
 
 SERVPORT=$(get_port "$HOSTNAME" "SENTINEL")
 REDISPORT=$(get_port "$HOSTNAME" "REDIS")
 SENTINEL_SERVICE_PORT=$(get_port "{{.ServiceName}}" "TCP_SENTINEL")
 
-myip=$(hostname -i)
-
-# If there are more than one IP, use the first IPv4 address
-if [[ "$myip" = *" "* ]]; then
-    myip=$(echo $myip | awk '{if ( match($0,/([0-9]+\.)([0-9]+\.)([0-9]+\.)[0-9]+/) ) { print substr($0,RSTART,RLENGTH); } }')
-fi
-
-
 sentinel_conf_set() {
     local -r key="${1:?missing key}"
     local value="${2:-}"
@@ -63,51 +56,52 @@ sentinel_conf_add() {
 host_id() {
     echo "$1" | openssl sha1 | awk '{print $2}'
 }
-not_exists_dns_entry() {
-    if [[ -z "$(getent ahosts "$HEADLESS_SERVICE" | grep "^${myip}" )" ]]; then
-        warn "$HEADLESS_SERVICE does not contain the IP of this pod: ${myip}"
-        return 1
-    fi
-    debug "$HEADLESS_SERVICE has my IP: ${myip}"
-    return 0
-}
 get_sentinel_master_info() {
-    if is_boolean_yes "$REDIS_TLS_ENABLED"; then
-        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_TLS_CERT_FILE} --key ${REDIS_TLS_KEY_FILE} --cacert ${REDIS_TLS_CA_FILE} sentinel get-master-addr-by-name mymaster"
+    if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then
+        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" timeout 220 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_SENTINEL_TLS_CERT_FILE} --key ${REDIS_SENTINEL_TLS_KEY_FILE} --cacert ${REDIS_SENTINEL_TLS_CA_FILE} sentinel get-master-addr-by-name mymaster"
     else
-        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name mymaster"
+        sentinel_info_command="REDISCLI_AUTH="\$REDIS_PASSWORD" timeout 220 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name mymaster"
     fi
-
     info "about to run the command: $sentinel_info_command"
     eval $sentinel_info_command
 }
 
-# Waits for DNS to add this ip to the service DNS entry
-retry_while not_exists_dns_entry
-
 [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
 
-cp /opt/bitnami/redis-sentinel/mounted-etc/sentinel.conf /opt/bitnami/redis-sentinel/etc/sentinel.conf
-printf "\nsentinel auth-pass %s %s" "mymaster" "$REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
-printf "\nrequirepass %s" "$REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
-printf "\nsentinel myid %s" "$(host_id "$HOSTNAME")" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
-
-if [[ -z "$(getent ahosts "$HEADLESS_SERVICE" | grep -v "^${myip}")" ]]; then
-    # Only node available on the network, master by default
+master_in_persisted_conf="$(get_full_hostname "$HOSTNAME")"
+if ! get_sentinel_master_info && [[ "$master_in_persisted_conf" == "$(get_full_hostname "$HOSTNAME")" ]]; then
+    # No master found, lets create a master node
     export REDIS_REPLICATION_MODE="master"
 
     REDIS_MASTER_HOST=$(get_full_hostname "$HOSTNAME")
     REDIS_MASTER_PORT_NUMBER="$REDISPORT"
 else
-    export REDIS_REPLICATION_MODE="slave"
+    export REDIS_REPLICATION_MODE="replica"
 
     # Fetches current master's host and port
     REDIS_SENTINEL_INFO=($(get_sentinel_master_info))
-    info "printing REDIS_SENTINEL_INFO=(${REDIS_SENTINEL_INFO[0]},${REDIS_SENTINEL_INFO[1]})" 
+    info "printing REDIS_SENTINEL_INFO=(${REDIS_SENTINEL_INFO[0]},${REDIS_SENTINEL_INFO[1]})"
     REDIS_MASTER_HOST=${REDIS_SENTINEL_INFO[0]}
     REDIS_MASTER_PORT_NUMBER=${REDIS_SENTINEL_INFO[1]}
 fi
 
+if [[ -n "$REDIS_EXTERNAL_MASTER_HOST" ]]; then
+    REDIS_MASTER_HOST="$REDIS_EXTERNAL_MASTER_HOST"
+    REDIS_MASTER_PORT_NUMBER="${REDIS_EXTERNAL_MASTER_PORT}"
+fi
+
+cp /opt/bitnami/redis-sentinel/mounted-etc/sentinel.conf /opt/bitnami/redis-sentinel/etc/sentinel.conf
+printf "\nsentinel auth-pass %s %s" "mymaster" "$REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
+printf "\nrequirepass %s" "$REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
+printf "\nsentinel myid %s" "$(host_id "$HOSTNAME")" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
+
+if [[ -z "$REDIS_MASTER_HOST" ]] || [[ -z "$REDIS_MASTER_PORT_NUMBER" ]]
+then
+    # Prevent incorrect configuration to be written to sentinel.conf
+    error "Redis master host is configured incorrectly (host: $REDIS_MASTER_HOST, port: $REDIS_MASTER_PORT_NUMBER)"
+    exit 1
+fi
+
 sentinel_conf_set "sentinel monitor" "mymaster "$REDIS_MASTER_HOST" "$REDIS_MASTER_PORT_NUMBER" 2"
 
 add_known_sentinel() {
@@ -116,7 +110,7 @@ add_known_sentinel() {
 
     if [[ -n "$hostname" && -n "$ip" && "$hostname" != "$HOSTNAME" ]]; then
         sentinel_conf_add "sentinel known-sentinel mymaster $(get_full_hostname "$hostname") $(get_port "$hostname" "SENTINEL") $(host_id "$hostname")"
-    fi 
+    fi
 }
 add_known_replica() {
     hostname="$1"
@@ -140,4 +134,4 @@ echo "sentinel announce-hostnames yes" >> /opt/bitnami/redis-sentinel/etc/sentin
 echo "sentinel resolve-hostnames yes" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
 echo "sentinel announce-port $SERVPORT" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
 echo "sentinel announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf
-exec redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel
+exec redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel
\ No newline at end of file
diff --git a/pkg/reconciler/isbsvc/installer/native_redis.go b/pkg/reconciler/isbsvc/installer/native_redis.go
index 24d31ec7..e6deada2 100644
--- a/pkg/reconciler/isbsvc/installer/native_redis.go
+++ b/pkg/reconciler/isbsvc/installer/native_redis.go
@@ -187,7 +187,7 @@ func (r *redisInstaller) createScriptsConfigMap(ctx context.Context) error {
 		SentinelPort:        sentinelPort,
 	}
 
-	tplFileNames := []string{"prestop-sentinel.sh", "start-node.sh", "start-sentinel.sh"}
+	tplFileNames := []string{"prestop-sentinel.sh", "start-node.sh", "start-sentinel.sh", "prestop-redis.sh"}
 	for _, fileName := range tplFileNames {
 		t := template.Must(template.ParseFS(redisScriptsAssets, fmt.Sprintf("assets/redis/scripts/%s", fileName)))
 		var tplOutput bytes.Buffer
@@ -197,15 +197,6 @@ func (r *redisInstaller) createScriptsConfigMap(ctx context.Context) error {
 		data[fileName] = tplOutput.String()
 	}
 
-	fileNames := []string{"prestop-redis.sh"}
-	for _, fileName := range fileNames {
-		if d, err := redisScriptsAssets.ReadFile(fmt.Sprintf("assets/redis/scripts/%s", fileName)); err != nil {
-			return fmt.Errorf("failed to read file assets/redis/scripts/%s", fileName)
-		} else {
-			data[fileName] = string(d)
-		}
-	}
-
 	hash := sharedutil.MustHash(data)
 	obj := &corev1.ConfigMap{
 		ObjectMeta: metav1.ObjectMeta{
diff --git a/pkg/shared/clients/redis/redis_client.go b/pkg/shared/clients/redis/redis_client.go
index c1952dbf..52a51046 100644
--- a/pkg/shared/clients/redis/redis_client.go
+++ b/pkg/shared/clients/redis/redis_client.go
@@ -23,7 +23,7 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 
 	"github.com/numaproj/numaflow/pkg/apis/numaflow/v1alpha1"
 )
diff --git a/pkg/shared/clients/redis/redis_reader.go b/pkg/shared/clients/redis/redis_reader.go
index ebaae897..2c7c2621 100644
--- a/pkg/shared/clients/redis/redis_reader.go
+++ b/pkg/shared/clients/redis/redis_reader.go
@@ -21,8 +21,8 @@ import (
 	"errors"
 	"fmt"
 
-	"github.com/go-redis/redis/v8"
 	"github.com/numaproj/numaflow/pkg/isb"
+	"github.com/redis/go-redis/v9"
 	"go.uber.org/zap"
 )
 
diff --git a/pkg/sources/redisstreams/redisstream.go b/pkg/sources/redisstreams/redisstream.go
index 3d710f76..f7c10e53 100644
--- a/pkg/sources/redisstreams/redisstream.go
+++ b/pkg/sources/redisstreams/redisstream.go
@@ -25,7 +25,6 @@ import (
 	"strings"
 	"time"
 
-	"github.com/go-redis/redis/v8"
 	dfv1 "github.com/numaproj/numaflow/pkg/apis/numaflow/v1alpha1"
 	"github.com/numaproj/numaflow/pkg/forward"
 	"github.com/numaproj/numaflow/pkg/forward/applier"
@@ -39,6 +38,7 @@ import (
 	"github.com/numaproj/numaflow/pkg/watermark/publish"
 	"github.com/numaproj/numaflow/pkg/watermark/store"
 	"github.com/numaproj/numaflow/pkg/watermark/wmb"
+	"github.com/redis/go-redis/v9"
 	"go.uber.org/zap"
 )
 


Test patch:
diff --git a/pkg/isb/stores/redis/read_test.go b/pkg/isb/stores/redis/read_test.go
index a581b0f5..a42ffd53 100644
--- a/pkg/isb/stores/redis/read_test.go
+++ b/pkg/isb/stores/redis/read_test.go
@@ -28,8 +28,8 @@ import (
 	"github.com/numaproj/numaflow/pkg/forward"
 	"github.com/numaproj/numaflow/pkg/watermark/generic"
 
-	"github.com/go-redis/redis/v8"
 	"github.com/montanaflynn/stats"
+	"github.com/redis/go-redis/v9"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/suite"
 
diff --git a/pkg/isb/stores/redis/write_test.go b/pkg/isb/stores/redis/write_test.go
index 2924df13..1971685f 100644
--- a/pkg/isb/stores/redis/write_test.go
+++ b/pkg/isb/stores/redis/write_test.go
@@ -27,7 +27,7 @@ import (
 	"github.com/numaproj/numaflow/pkg/forward"
 	"github.com/numaproj/numaflow/pkg/watermark/generic"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 	"github.com/stretchr/testify/assert"
 
 	dfv1 "github.com/numaproj/numaflow/pkg/apis/numaflow/v1alpha1"
diff --git a/pkg/isb/testutils/rw.go b/pkg/isb/testutils/rw.go
index 33d8a7d7..25e913c8 100644
--- a/pkg/isb/testutils/rw.go
+++ b/pkg/isb/testutils/rw.go
@@ -23,7 +23,7 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 
 	"github.com/numaproj/numaflow/pkg/isb"
 	"github.com/numaproj/numaflow/pkg/shared/logging"
diff --git a/pkg/isbsvc/redis_service_test.go b/pkg/isbsvc/redis_service_test.go
index 9d741fdc..c1692449 100644
--- a/pkg/isbsvc/redis_service_test.go
+++ b/pkg/isbsvc/redis_service_test.go
@@ -23,8 +23,8 @@ import (
 	"testing"
 	"time"
 
-	goredis "github.com/go-redis/redis/v8"
 	"github.com/numaproj/numaflow/pkg/isb/stores/redis"
+	goredis "github.com/redis/go-redis/v9"
 	"github.com/stretchr/testify/assert"
 
 	dfv1 "github.com/numaproj/numaflow/pkg/apis/numaflow/v1alpha1"
diff --git a/pkg/shared/clients/redis/redis_client_test.go b/pkg/shared/clients/redis/redis_client_test.go
index 6bb94b48..d8e1b686 100644
--- a/pkg/shared/clients/redis/redis_client_test.go
+++ b/pkg/shared/clients/redis/redis_client_test.go
@@ -20,7 +20,7 @@ import (
 	"context"
 	"testing"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/sources/redisstreams/redisstream_test.go b/pkg/sources/redisstreams/redisstream_test.go
index fa6c184f..69dd60fd 100644
--- a/pkg/sources/redisstreams/redisstream_test.go
+++ b/pkg/sources/redisstreams/redisstream_test.go
@@ -20,7 +20,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/test/e2e-api/redis.go b/test/e2e-api/redis.go
index 381d7dc8..4735c88c 100644
--- a/test/e2e-api/redis.go
+++ b/test/e2e-api/redis.go
@@ -26,7 +26,7 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/go-redis/redis/v8"
+	"github.com/redis/go-redis/v9"
 )
 
 var redisClient *redis.Client