# Instances

Oracle database services can be deployed on the Tessell portal with the following configurations:&#x20;

| **Instance type**                                     | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Single instance database service                      | Database service with one instance in a given region and availability zone.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Multi-AZ database service                             | <ul><li>Database service with 2 instances, one primary and one sync replica. </li><li>The instances need to be in the same region but can be within the same or different availability zone as the primary instance. </li><li>The service also comes configured with a 3rd node (observer) that manages auto failover between these two instances.</li><li>The two instances are always homogeneous in nature (Infra/parameters/storage/IOPS, and so on). </li><li>All planned operations are performed in rolling mode on these services keeping downtime to minimum. </li></ul><p><br></p> |
| Database service with Disaster Recovery instance (DR) | <ul><li>Disaster Recovery instances are async replica instances that can be added in the same or different region as the primary. </li><li>Multiple DR instances can be added to a database service. </li><li>No auto failover support. </li><li>DR-Drill scenario supported, it is explained in below sections.</li><li>DR can be added to both single instance and Multi-AZ database services.</li></ul>                                                                                                                                                                                   |
| Database service with Read Replica                    | Read Replica is an async replica opened in Read only mode. This needs an active Dataguard license to be procured by you. You  can use this instance for read-only queries.                                                                                                                                                                                                                                                                                                                                                                                                                   |

The Instances tab displays the list of all the configured instances for your database service in the tabular format. Each row displays the details of each instance configured per node. Each column of the table provides following information:

* Name - Displays the name of the instances configured as per the node along with the node number. This name is generated automatically in the incremental order as below:&#x20;
  * default-node-0 for primary,&#x20;
  * default-node-1 for replica 1, this instance is typically an HA replica, configured for automatic failover.
  * \<instance name>-node-\<digit> for replica 2, digit starts from 0 if it is a new read replica or DR replica and the numbering increases as per the number of nodes configured for your database service.
* Status - Displays the status of each instance. The status of the instances can be:

| Status                             | Description                                                                                                                                                                                              | Actions Allowed                                                                                                                                                                                                      |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UP                                 | The database instance is up and running. The connections are allowed when it is in UP status.                                                                                                            | <p>All the actions are allowed:</p><p><br></p><ul><li>Resize the compute shapes</li><li>Resize the storage</li><li>Update the parameter profile</li><li>Delete the instance if it is a Read Replica or DR.</li></ul> |
| DOWN                               | The database instance is down.                                                                                                                                                                           | Please raise a Tessell support ticket if the instance needs to be revived.                                                                                                                                           |
| STOPPPED                           | The database instance is not running and it is completely stopped.                                                                                                                                       | Start the service                                                                                                                                                                                                    |
| CREATING                           | Database instance provision is triggered and the process of creating is on or a new instance is added to the existing database service.                                                                  | No actions allowed                                                                                                                                                                                                   |
| DELETING                           | Database instance delete is triggered and the process of deleting is on or an instance is selected to be deleted from the database service. Only RR/DR instances can be deleted from a database service. | No actions allowed                                                                                                                                                                                                   |
| REBUILDING                         | Compute shape or storage resize is triggered for the instance.                                                                                                                                           | No actions allowed                                                                                                                                                                                                   |
| REBUILD\_FAILED                    | Compute resize or storage resize was triggered and did not complete.                                                                                                                                     | All actions are allowed                                                                                                                                                                                              |
| PATCHING                           | Available patches are selected to apply for the database service.                                                                                                                                        | No actions allowed                                                                                                                                                                                                   |
| PATCH\_FAILED                      | Patching for the database instance has failed for some reason.                                                                                                                                           | All actions are allowed                                                                                                                                                                                              |
| UPDATING\_PARAMETER\_PROFILE       | Parameter profile update is triggered for the instance.                                                                                                                                                  | No actions allowed                                                                                                                                                                                                   |
| PARAMETER\_PROFILE\_UPDATE\_FAILED | Parameter profile update failed for some reason.                                                                                                                                                         | All actions are allowed                                                                                                                                                                                              |

* Role - Displays the role of your instance. The possible values are Primary, HA Replica (Automatic Failover), RR (Read Replica), and DR (Disaster Recovery). Below the role is the name of the server where your instance is residing.
* Region/Zone - Displays the name of the cloud and its region on which your instance is hosted.
* Parameter Profile - Displays the name of the parameter profile selected for your instance at the time of provisioning your database service.
* Compute - Displays the name of the compute shape selected for your instance at the time of provisioning your database service. You can view the allocated vCPUs and memory for this compute shape below.
* Created - Displays the date and time on which your instance is created.
* Storage - Displays the storage size specified during provisioning to your database service. To view the storage provider, throughput, and IOPS, click **See details** below the storage size.
* Connection Endpoint - Displays the host name for your instance. To view the Service URL, Host, Port, and Username, click See Details below the host name of your instance.
* Using the ellipsis icon, you can create private links for DR and RR nodes separately. You can create, update, or delete this private link.&#x20;

  **Note**: Creation of private links for DR and RR nodes is currently supported for AWS cloud. For Azure cloud, this is a planned feature.

#### Switch over

Tessell platform provides robust High Availability (HA) and Disaster Recovery (DR) capabilities through its **Switchover** functionality. This feature enables seamless transition of services from a primary instance to a designated HA replica or DR instance, ensuring minimal downtime and uninterrupted service availability.

**Functionality**:

* **Automatic or Manual Switchover**: Users can initiate a switchover either manually through the Tessell UI/API or automatically as part of predefined HA/DR policies.
* **Primary Role Reassignment**: Upon switchover, the target HA or DR instance is promoted to become the new Primary instance.
* **Dynamic DNS Update**: Tessell updates the service-level hostname to point to the new primary instance's IP address, ensuring transparent redirection of application traffic.
* **Zero Configuration Drift**: The newly promoted instance inherits the full configuration of the original primary, ensuring consistency and readiness to serve workloads.
* **Audit and Monitoring:** All switchover events are logged and available for review through the platform’s monitoring and auditing tools.

To manually initiate switchover,

1. Click **Switch over**.

   A ‘Switch over to an instance’ window pops up with the options to switch. It also displays the list of available replica instances along with its name and status.&#x20;

   **Note**: Switching over to an instance may cause some downtime for the service.&#x20;
2. Select the replica instance to promote as primary and optionally, you can specify the comments. If an HA replica is chosen as target, the switchover is graceful (planned, synchronized way with no data loss) and a switchback is allowed.
3. Select “I understand the consequences” checkbox and click the **Switch** button.&#x20;

   It submits the switching request.
4. To view the progress, select **Submitting Request** below the service name.&#x20;

   After the request is submitted, the Switchover operation starts to promote the replica to primary. After it is completed, the service is again Ready and updates the Tessell metadata.

#### Oracle DR Drills

When initiating a switchover to a **DR instance**, Tessell provides two distinct operational paths based on the intent of the switchover:

1. **DR Drill (Graceful Switchover)**
   * If the DR Drill option is selected during the switchover, the platform attempts a graceful switchover from the current primary to the DR instance.
   * This ensures that:
     * All transactions are safely committed.
     * The current primary is demoted in a controlled manner.
     * The DR instance is promoted to primary with full data consistency.
   * If graceful switchover is not possible (For example, due to connectivity issues, lag, or replication faults), the platform fails the switchover operation to avoid data inconsistency.
   * This mode is typically used for DR testing and compliance drills, with the ability to switch back to the original primary after testing is complete.\\

2. **Actual Disaster Recovery (Forceful Switchover)**

* If the **DR Drill** option is not selected, the platform assumes this is a real disaster scenario.
* In this case:
  * Tessell forcefully promotes the DR instance to become the new Primary.
  * The original Primary is marked as unrecoverable and is brought down.
  * Tessell automatically triggers a rebuild of the original Primary instance.
* After the rebuild is complete and replication is re-established, customers may choose to switch back to the original Primary as part of recovery workflows.

#### Key Capabilities

| **Feature**                 | **DR Drill Enabled**     | **DR Drill Disabled (Disaster Mode)** |
| --------------------------- | ------------------------ | ------------------------------------- |
| Switchover Type             | Graceful                 | Forceful                              |
| Data Consistency Check      | Yes                      | Skipped                               |
| Source Primary Status       | Demoted Cleanly          | Brought Down                          |
| Automatic Rebuild of Source | No (optional switchback) | Yes (required for future use)         |
| Switchback Possible         | Yes (Post-drill)         | Yes (Post-rebuild)                    |
| Use Case                    | Testing/Compliance       | Actual Disaster/Failover              |

#### Create Replica

For any database services, you can add new replicas using the **Create Replica** button on the top right corner. The possible options for adding the replicas are Disaster Recovery and Read Only Replica.

Prerequisites:

You need to open bi-directional communication between the primary and DR/Read Replica subnets at the subnet level for two specific ports:

* Primary database port (For example, 1521 for oracle, or your specific DB port)
* Port 1599
* This must be for entire CIDR blocks of the subnets
* NSG (Network Security Group) rules need to be applied at subnet level, not VM level, since VM level NSG is managed by Tessell

1. Select **Disaster Recovery** or **Read Only Replica** to add the new node.&#x20;

   Add a DR Instance or Add a RR Instance window pops up.&#x20;

   Provide the following details to add the new instance:

   * **Instance Name** - Specify the name for the instance.

     Instance names must contain only alphanumeric characters.
   * **Region** - Select any of the available regions from the dropdown list for your instance.
   * **Availability Zone** - Select any of the availability zones from the dropdown list for your instance.
   * **VPC** - Select any of the available VPC from the dropdown list for your instance.
   * **Private Subnet** - Select any of the available private subnets from the dropdown list for your instance.
   * **Advanced configuration** - Expand to specify storage configuration like IOPS and Throughput.

   **Note**: Tessell also supports choosing a different shape for DR/Read Replica instances.&#x20;
2. Select **Add Instance** to proceed for adding your Read Replica or DR instance.

As an alternative method, use the code to add the instance.

1. Use the code from the top right corner and the code is available in different languages like Shell, Python, Go, Java, JavaScript, and PowerShell.&#x20;
2. You can copy and download the code using respective buttons.&#x20;
3. Use the **Close** button to return back to the main window.

Adding the Disaster Recovery Replica or Read Replica Instance automatically initiates the following steps:

* Requests to add the replica is submitted
* Creates the compute instance(s)
* Prepares the primary database to add new replica
* Configures the replica database with primary database information
* Availability Machine is setup for the new instance
