# December 21, 2024

## Things That I Discovered

### 1. Caddy Load-Balancing

* Turned to Caddy's Load Balancing capabilities to make sure a service stays up even if the server A goes down, and for that we can just declare a Reverse Proxy such that the server B is used when the server A goes down.
* **Example**:

  ```
  :80 {
      reverse_proxy {
          to 100.64.0.1:12345 100.64.0.2:12345
          health_uri /health
          health_interval 5s
          health_timeout 2s
          health_status 200
          health_passes 5
          fail_duration 30s
          lb_policy first
      }
  }
  ```
* **Reference(s):**
  * [Caddy Server Documentation](https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#load-balancing)
  * [Linux Training Academy](https://www.linuxtrainingacademy.com/caddy-load-balancing-tutorial/)
  * [Greg Hilston Blog](https://www.greghilston.com/post/how-to-load-balance-with-preference/)

### 2. Show Wi-Fi Networks in Ubuntu Server

* In order to show available WiFi Networks in Ubuntu Server, we can use `iwlist`command.
* **Example:**

  ```
  sudo iwlist <INTERFACE_NAME> scan | grep ESSID
  ```
* **Reference(s):**
  * [LinuxBabe](https://www.linuxbabe.com/ubuntu/connect-to-wi-fi-from-terminal-on-ubuntu-18-04-19-04-with-wpa-supplicant)
  * [Linux Uprising](https://www.linuxuprising.com/2019/11/how-to-show-available-wifi-networks.html)
