# High Availability (HA)

The WorkSpaces Manager appliance is implemented as a single EC2 instance, incorporating both **IIS** and **MS-SQL Express**. However, it can be configured into 2-tier or 3-tier architectures to improve **High Availability (HA)**. The deployment options available include:

1. **2-Tier (Basic HA)**:
   * **Option 1:** A single EC2 instance hosting both IIS and MS-SQL, paired with a **Network Load Balancer (NLB)**. While this setup introduces some redundancy, it does not achieve full HA.
   * **Option 2:** A single EC2 instance running IIS, with the database migrated to **AWS RDS (MS-SQL)**. This configuration improves availability but still falls short of full HA.
2. **3-Tier (Full HA)**:
   * **Full HA Option:** The database (MS-SQL) is hosted in **AWS RDS**, and the IIS web application is load-balanced using a **Network Load Balancer (NLB)** across multiple EC2 instances. These instances are preferably organized in an auto-scaling group using a custom AMI. By separating the application and database tiers and incorporating redundancy at the application level, this configuration delivers comprehensive HA.

Each option allows for different levels of scalability and resilience, with the 3-tier architecture offering the most robust High Availability solution.

Focusing on the second option, which offers full **High Availability (HA)**, the architecture is divided into three distinct layers:

1. **Database in RDS**:
   * The database is hosted on **AWS RDS** using the **MS-SQL engine**.
   * You must create the appropriate schema for initialization to support the WorkSpaces Manager application.
2. **Network Load Balancer (NLB)**:
   * The **Network Load Balancer** manages traffic across multiple EC2 instances.
   * Ensure that you have a proper **DNS name** configured for the load balancer, along with a valid **SSL Certificate** to offload TLS/SSL encryption for secure communication.
3. **.NET Application in EC2**:
   * The **.NET application** is hosted on one or more EC2 instances running **IIS**.
   * Modify the environment variables to retrieve the connection details to the shared database on each EC2 instance, to ensure proper communication with the RDS database and load balancer.
   * Ensure that the EC2 instances use **Sysprep** to prepare them for deployment, making them reusable for scaling.
   * Configure **Ec2LaunchSettings** on each EC2 instance for proper initialization during boot-up, including tasks like setting the hostname, configuring networking, and ensuring the instances are ready to join the load balancer pool.

This 3-tier architecture ensures high availability and scalability by separating the application, database, and load balancing layers, providing resilience and efficient resource management.

{% hint style="danger" %}
For any assistance on how to configure a Highly Available (HA) solution for WorkSpaces  Manager on your AWS account, please contact **<support@workspacesmanager.com>**.

There is a guide that provides more details on the RDS configuration for WorkSpaces Manager [here](/install/appendices/rds-database-options.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nuvens.cloud/install/high-availability-ha.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
