title_body: How can redundancy be established for producer nodes?
upvoted_answer: Currently, a block producer can only send out its blocks if there is an incoming connection to it. So, as long as your backup block producer has no incoming connections, it can be &quot;hot&quot; and ready to produce blocks. I recommend having a relay pointing to a backup block producer, but prevented from connecting by a firewall rule.
  Use CNCLI ping to determine if the main block producer is up or down. Depending on the answer, you can add/remove the firewall block to the backup block producer.
  Example script to run with cron once per minute. In this example, a backup relay and block producer are installed on the same server.
  #!/bin/bash
  
  # are we blocking? In other words, we are not in failover mode
  isblocking=`/usr/sbin/iptables --list INPUT --numeric | grep REJECT | grep 5050 | wc -l`
  
  #if [[ $isblocking -eq 1 ]]
  #then
  #  echo &quot;NON-failover mode. checking...&quot;
  #else
  #  echo &quot;FAILOVER mode. checking...&quot;
  #fi
  
  error=`/home/westbam/.cargo/bin/cncli ping --host relay0.myserver.com --port 5000 | jq .status | grep error | wc -l`
  if [[ $error -eq 1 ]]
  then
    #echo &quot;relay0 error. check relay1...&quot;
    sleep 10
    error=`/home/westbam/.cargo/bin/cncli ping --host relay1.myserver.com --port 5000 | jq .status | grep error | wc -l`
    if [[ $error -eq 1 ]]
    then
      #echo &quot;relay1 error. check relay2...&quot;
      sleep 10
      error=`/home/westbam/.cargo/bin/cncli ping --host relay2.myserver.com --port 5000 | jq .status | grep error | wc -l`
      if [[ $error -eq 1 ]]
      then
        if [[ $isblocking -eq 1 ]]
        then
          echo &quot;$(date): Enter FAILOVER mode...&quot;
          # remove the local node blocks
          /usr/sbin/iptables --delete INPUT -p tcp --dport 5050 --jump REJECT 2&gt; /dev/null
          /usr/bin/mail -s &quot;FAILOVER&quot; 9999999999@msg.fi.google.com &lt;&lt;&lt; &quot;FAILOVER to relay3 enabled&quot;
        fi
        exit 0
      fi
    fi
  fi
  
  if [[ $isblocking -eq 0 ]]
  then
    # we're not blocking local traffic, but we SHOULD be. Turn on the blocks
    echo &quot;$(date): Return to NORMAL mode...&quot;
    /usr/sbin/iptables --insert INPUT -p tcp --dport 5050 --jump REJECT 2&gt; /dev/null
    /usr/bin/mail -s &quot;NORMAL&quot; 9999999999@msg.fi.google.com &lt;&lt;&lt; &quot;failover disabled&quot;
  fi