Creating an OCI Cache Cluster
Create an OCI Cache cluster to apply memory-based storage solutions for applications.
For reliability, we recommend using a cluster with at least three nodes. Clusters with one or two nodes are not reliable.
Clusters can only be created in subnets that don't have IPv6 enabled. If you select an existing subnet with IPv6 enabled, cluster creation fails.
On the Clusters list page, select Create cluster. If you need help finding the list page, see Listing OCI Cache Clusters.
Creating a OCI Cache cluster consists of the following pages:
Run each of the following workflows in order. You can return to a previous page by selecting Previous.
1. Configure cluster
The Configure cluster page is where you provide the basic information for the cluster.
Enter the following information:
-
Name: Accept the prefilled name or enter a descriptive name for the cluster.
The cluster name can include only letters, numbers, dashes, periods, and underscores.
- Create in compartment: Select the compartment where the cluster resides from the list.
-
OCI Cache engine version: Select one of the following versions:
- VALKEY 7.2
- REDIS 7.0
- Select configuration <compartment>: Depending on the cache engine version you select, you can choose from available custom and default configurations for the engine. If you don't select a configuration, OCI Cache automatically applies the latest default configuration for the cluster's engine version.
Tagging
(Optional) In the Tags section, add one or more tags to the cluster. If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
Zero Trust Packet Routing security
(Optional) If your tenancy and environment have the Zero Trust Packet Routing permissions to create security attributes for a cluster, you might also have permissions to apply these attributes to that cluster. To apply a security attribute, you must have permissions to use the security attribute namespace. For more information about security attributes and security attribute namespaces, see Zero Trust Packet Routing. If you're not sure whether to apply security attributes, skip this option or ask an administrator. You can apply security attributes later.
To apply security attributes to a cluster, select Show security attributes and then select Add security attribute.
Enter the following information:- Security attribute namespace: Select a security attribute namespace from the list. This list contains those security attribute namespaces already configured. See Creating a Security Attribute Namespace for more information.
- Security attribute key: Select a key from the list.
- Security attribute value: Select a value for the corresponding key from the list.
Select the Add security attribute button to add another attribute (to a maximum of three).
Select Next.
2. Configure nodes
The Configure nodes page is where you select the cluster mode (non-sharded or sharded) and configure the cluster node settings.
-
Cluster mode: Select one of the following modes:
-
Non-sharded: Uses a single primary node and up to four replica nodes for reliable performance and automatic backup.Note
For optimal high availability, configure a non-sharded cluster with one primary node and two replica nodes. - Sharded: Distributes data across multiple shards to increase capacity and speed up processing. Sharded clusters are ideal for large or high-traffic datasets.
-
Non-sharded: Uses a single primary node and up to four replica nodes for reliable performance and automatic backup.
- Node count (Non-sharded only): Enter a value from 1 to 5.
- Shard count (Sharded mode only): Enter an odd number between 3 and 99.
- Nodes per shard (Sharded mode only): Enter a value from 1 to 5.
- Memory (GB) per node: Enter a value from 2 to 500.
A running tally at the bottom of the page displays the total node count, total memory (in gigabytes), and bandwidth (in gigabits per second per node). These numbers are updated as you change the settings in the page.
Select Next.
3. Configure networking
The Configure networking page is where you configure how your cluster connects to the internet and other resources in the Console.
VCN
Select one of the following options for the VCN:
- Select existing virtual cloud network: Select a VCN from the current compartment.
-
New virtual cloud network name: Enter the following information:
- New virtual cloud network name: Accept the default name or enter a friendly name for the new VCN.
- Create in compartment: Select the compartment where the new VCN resides from the list.
- Enter subnet OCID: Enter the OCID of the subnet you want. The VCN is automatically determined based on the subnet you select.
Subnet
Subnet settings depend on the VCN option you selected. You can't change the cluster's subnet after creating the cluster.
Select one of the following options:
- Select existing subnet: Select a subnet from the current compartment.
-
Create new public subnet: Enter the following information:
- Create new public subnet: Accept the default name or enter a friendly name for the subnet.
- Create in compartment: Select the compartment where the new subnet resides from the list.
- CIDR block: Enter the CIDR block IP addresses, for example, 10.0.0.0/16, 209.128.0.0/10
- Enter subnet OCID: Enter the OCID of the subnet you want.
Network security group
(Optional) You can add one or more network security groups (NSGs) available for the selected VCN. The NSG must contain a rule that allows traffic to the cluster's VNIC using the required protocols and ports. For more information, see Security Rule for Connecting to Clusters.
Select Add network security group and select an available NSG in the current compartment from the list.
Select Next.
4. Review and create
Review the contents of the Review and create page. Edit settings or return to previous screens to add information. When the settings are fully verified, select Create cluster.
The cluster you created appears in the Clusters list page.
-
Name: Accept the prefilled name or enter a descriptive name for the cluster.
Use the oci redis redis-cluster redis-cluster create command and required parameters to create a cluster:
oci redis redis-cluster redis-cluster create --compartment-id <compartment_OCID> --display-name <text> --node-count <node_count> --node-memory-in-gbs <memory in gigabytes> --software-version <text> --subnet-id <subnet_OCID> [OPTIONS]For information about using the CLI, see Command Line Interface (CLI). For a complete list of flags and options available for CLI commands, see the CLI Command Reference.- For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.
Run the CreateRedisCluster operation to create a cluster.