# Infrastructure (Reference: https://docs.iqra.bot/developers/admin/infrastructure) The **Infrastructure** tab is where you map the physical topology of your deployment to the logical database. You use this to register servers, configure regional storage, and monitor live traffic. 1. The Dashboard [#1-the-dashboard] The top-level view provides a real-time pulse of the entire cluster. * **Live Conversations:** The total number of active Phone and Web sessions across all regions. * **Outbound Pipeline:** * *Processing:* Calls currently being dialed or handled by the Proxy. * *Pending:* Calls sitting in the queue waiting for a slot. * **Capacity (Active/Total):** * *Backend Nodes:* How many Audio Processors are online vs. total registered. * *Proxy Nodes:* How many Gateways are online vs. total registered. If **Capacity** shows `0/4`, it means your servers are registered in the DB but are not sending heartbeats. Check your firewall and `appsettings.json` configuration. *** 2. Managing Regions [#2-managing-regions] Iqra AI is a multi-region system. A **Region** is a logical group of resources (Servers + Storage) located in the same geographic area (e.g., `US-EAST`, `OM-MCT`). Creating a Region [#creating-a-region] 1. Navigate to the **Regions** tab. 2. Click **Add New Region**. 3. **Country:** Select the physical location (for flag display). 4. **Region Name:** An internal identifier (e.g., `us-east-1`). * *Note:* The resulting **Region ID** is what you put in your `appsettings.json`. Regional S3 Storage [#regional-s3-storage] Each region can have its own Object Storage bucket to minimize audio latency. 1. Click on a Region card to enter details. 2. Go to the **S3 Storage** tab. 3. Enter your credentials: * **Endpoint URL:** The internal address (e.g., `http://rustfs:9000` or AWS URL). * **Access/Secret Keys:** Your storage credentials. * **SSL:** Enable if using HTTPS. When an agent in `US-EAST` generates audio, it saves it to this specific S3 bucket. This prevents the system from trying to upload a file across the ocean to a central bucket during a live call. *** 3. Server Node Management [#3-server-node-management] Inside a Region, you manage the worker nodes. Registering a Node [#registering-a-node] To add capacity to a region: 1. Click **Add Proxy** or **Add Backend**. 2. **Endpoint / IP:** The address where the service is reachable (e.g., `http://10.0.0.5:5002`). 3. **SIP Port:** * **Proxy:** Default `5060`. * **Backend:** Default `5080`. 4. **API Secret:** The system generates a secure token. **You must copy this** into the server's `appsettings.json`. Lifecycle Controls [#lifecycle-controls] You can control the state of running servers directly from the dashboard. | Control | Function | Use Case | | :------------------------------------------------------------------ | :------------------------------------------------------------------ | :--------------------------------------------------------------------------------- | | **Maintenance Mode** | Stops the node from accepting *new* tasks. Existing calls continue. | **Draining.** Use this before an update. | | **Disable Node** | Permanently marks the node as offline in the DB. | **Decommissioning.** Use when removing a server forever. | | **Shutdown Node** | Sends a signal to the app to terminate the process. | **Restarting.** Requires the app to be running as a Service with restart policies. | *** 4. Singleton Nodes [#4-singleton-nodes] The **Frontend** and **Background** services are singletons (one per cluster). You configure them in their respective tabs. Frontend Node [#frontend-node] * **Metrics:** View CPU/RAM usage of the dashboard server. * **Version:** Verify the currently running build version. Background Node [#background-node] * **Configuration:** You must register the endpoint and API Key for the background processor here. * **Why?** The API/Frontend needs to know where to send "Job Triggers" (e.g., "Run cleanup now"). If this is missing, background tasks may fail to trigger manually. Ensure the **API Secret** you generate here matches the `Security.ApiKey` in your `IqraBackgroundProcessor/appsettings.json`.