The connection method and code vary with the instance mode. Cloud-native cluster instances support two connection modes — proxy mode and direct connection mode — but only one can be active at a time. You cannot switch between modes on a running instance. To use a different mode, restore the instance's backup data to a new instance and select the target mode during that process.
Compare connection modes
| Mode | Behavior |
|---|---|
| Proxy mode | Connects like a standard instance |
| Direct connection mode | Connects like a native Redis cluster |
Switch the connection mode
Because you cannot enable both modes simultaneously or switch between them on a running instance, use the instance restoration feature to restore backup data to a new instance and set the target mode during restoration.
After the new instance starts with the new connection mode, update your application's connection code to match the new mode. Code written for the old mode will fail to connect.
-
On the Backup and Recovery page, use the instance restoration feature to restore a backup set from the existing cloud-native cluster instance to a new instance.
-
On the Clone Instance page, set Connection Mode to Proxy or Direct Connection.
-
Complete the restoration. The new instance starts with the connection mode you selected.
For detailed steps, see Restore data from a backup set to a new instance.