Posts

Showing posts from October, 2023

How to connect to OCI Redis cluster

Redis is a private service and accessible only within the VCN or appropriately peered VCNs.   You can connect to the OCI Redis Clusters using the cluster endpoints provided.    To write to the redis cluster, connect using the Primary endpoint. To read from the redis cluster, connect using the Replica endpoint.   You may choose a client library your programming language supports to connect to OCI Cache with Redis.   For example, Lettuce or Jedis for Java, redis-py for Python, node-redis for Node.js, go-redis for Go and so on.   You can use redis-cli to connect to Redis cluster. The redis-cli is a command-line based tool connect to your redis clusters which can also be used to get valuable insights from the redis cluster.   To use redis-cli comes included with the Redis package. You need to establish a secure TLS connection between the client/application and redis server. You should use redis-cli version 6 or above so that it suppor...

OCI Redis Cache Endpoints

  OCI provisions private DNS endpoints for your Redis Cluster as follows.   - 1 Primary Endpoint always pointing to the Primary node. In case of a primary node failure, the primary endpoint will automatically failover to the new primary.   - 1 Replica Endpoint pointing to one of the Read replicas. If you have more than 1 read replica, the replica end point resolves to one of the read replicas randomly.   - Node Endpoints to all the Redis nodes. This will never change.   Example: Primary Endpoint: amaaaaaa2ne4d2g6eiu32jva-p.redis.eu-frankfurt-1.oci.oraclecloud.com Replica Endpoint: amaaaaaa2ne4d2g6eiu32jva-r.redis.eu-frankfurt-1.oci.oraclecloud.com Node Endpoints: amaaaaaa2ne4d2g6eiu32jva-0.redis.eu-frankfurt-1.oci.oraclecloud.com amaaaaaa2ne4d2g6eiu32jva-1.redis.eu-frankfurt-1.oci.oraclecloud.com amaaaaaa2ne4d2g6eiu32jva-2.redis.eu-frankfurt-1.oci.oraclecloud.com     You can see '-p' suffix to the hash prefix for the p...

How to launch OCI Redis Cache Cluster on OCI

OCI Redis Cache is GA as of now. You can launch Redis Cache clusters using Console, CLI, SDK, Terraform and so on.   Using Console : Launching a Redis cluster using OCI console is even easier. Just go to Databases --> Redis --> Clusters --> Create cluster and launch selecting required options.   Let’s see how to launch a Redis Cluster on OCI using CLI. Sample Command : # oci redis redis-cluster create -c ocid1.compartment.oc1..aaaaaaaaognnxXXXxxeiexes6cq --display-name redis_1 --node-count 2 --node-memory-in-gbs 4 --software-version V7_0_5 --subnet-id ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaader2hzdzsfesxoXXXXj6zq47t3dzpoq   Reference: -c - Compartment under which you want to launch your Redis cluster. --display-name - Name of your cluster. --node-count - Number of nodes Min 1, Max 5.   1 primary and rest read replicas. --node-memory-in-gbs - Amount of Memory. Min 1GB, Max 500GB. --software-version - Redis server version. --subnet-...