<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: NiFi UI load balance with HAProxy to CONNECTED nodes only in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411984#M253180</link>
    <description>&lt;P&gt;OK,&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;, thanks for your help.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jul 2025 08:58:38 GMT</pubDate>
    <dc:creator>asand3r</dc:creator>
    <dc:date>2025-07-31T08:58:38Z</dc:date>
    <item>
      <title>NiFi UI load balance with HAProxy to CONNECTED nodes only</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411822#M253156</link>
      <description>&lt;P&gt;Hello, guys!&lt;/P&gt;&lt;P&gt;I still have a three-node cluster Apache NiFi 1.18.0 (yeap, upgrade task in by backlog =)) and trying to setup it behind HAProxy just for UI (/nifi endpoint).&lt;/P&gt;&lt;P&gt;I wanna to implement a health check to balance user requests only to nodes in CONNECTED status to avoid issues when nodes moves to maintenance (offload, disconnect).&lt;/P&gt;&lt;P&gt;Is it good idea, right? Or maybe I do some overengineering things? &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;By the way, I have next HAProxy config file:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;frontend nifi_443
  bind *:443 ssl crt /etc/haproxy/ssl/cert_file.pem
  http-request set-path /nifi if { path / }
  mode http
  option httplog
  acl DST_IP dst 10.0.0.10
  use_backend nifi_ui_9443 if DST_IP

backend nifi_ui_9443
  mode http
  option httpchk
  http-check send meth GET uri /nifi-api/access/config ver HTTP/1.1  hdr Host nifi-cluster.corp.company.com
  http-check expect status 200
  cookie SERVERID insert indirect nocache
  balance leastconn

  server srv_1 10.0.0.1:9443 check ssl verify none cookie web1
  server srv_2 10.0.0.2:9443 check ssl verify none cookie web2
  server srv_3 10.0.0.3:9443 check ssl verify none cookie web3&lt;/LI-CODE&gt;&lt;P&gt;Basically it works fine when all nodes are CONNECTED, but if some node goes to DISCONNECTED state, http-check to selected API method still returns 200 and HAProxy continues to route users to that node.&lt;/P&gt;&lt;P&gt;So, give an advice, please. How can I configure HAProxy health-check to get expected behavior? Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 10:09:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411822#M253156</guid>
      <dc:creator>asand3r</dc:creator>
      <dc:date>2025-07-29T10:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi UI load balance with HAProxy to CONNECTED nodes only</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411898#M253161</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/126490"&gt;@asand3r&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;A node must be "disconnected" before it can be offloaded.&amp;nbsp; Only a running node can be offloaded.&amp;nbsp; So as long as a node is running. it's UI will be accessible.&lt;BR /&gt;&lt;BR /&gt;A couple options:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;A href="https://community.cloudera.com/" target="_blank"&gt;https://&amp;lt;nifi-node&amp;gt;:&amp;lt;nifi-port&amp;gt;/nifi-api/controller/cluster&lt;/A&gt;. &amp;lt;-- this end point when hit will return the following type responses:&lt;UL&gt;&lt;LI&gt;If node is connected, it will return json that includes the connection status of all nodes that are part of cluster.&amp;nbsp; So this response could be parsed to see if any nodes are disconnected. So you could parse status of all nodes from a single connected node's response&lt;/LI&gt;&lt;LI&gt;If node is not connected, it will return "Only a node connected to a cluster can process the request" which tells you that node is disconnected.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.cloudera.com/" target="_blank"&gt;https://&amp;lt;nifinode&amp;gt;:&amp;lt;nifi-port&amp;gt;/nifi-api/flow/cluster/summary&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;If node is connected, it will return a response like this:&lt;BR /&gt;&amp;nbsp;{"clusterSummary":{"connectedNodes":"3 / 3","connectedNodeCount":3,"totalNodeCount":3,"connectedToCluster":true,"clustered":true}}&lt;/LI&gt;&lt;LI&gt;If node is disconnected, it will return a response like this:&lt;BR /&gt;{"clusterSummary":{"connectedNodeCount":0,"totalNodeCount":0,"connectedToCluster":false,"clustered":true}}&lt;/LI&gt;&lt;LI&gt;You'll need to parse the responses for&amp;nbsp;connectedToCluster. If true use that node's UI, if false, exclude that node's UI.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Of course if node is completely down, above will not help unless you mark as unavailable if no response.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Please help our community grow. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 14:23:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411898#M253161</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2025-07-29T14:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi UI load balance with HAProxy to CONNECTED nodes only</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411906#M253165</link>
      <description>&lt;P&gt;But there methods requires authentication. As I know it's not possible to create internal NiFi service user with persistent auth token to make a health check with it. So, right way is HAProxy &lt;A href="https://www.haproxy.com/documentation/haproxy-configuration-tutorials/reliability/health-checks/#agent-checks" target="_self"&gt;agent check&lt;/A&gt;?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 17:27:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411906#M253165</guid>
      <dc:creator>asand3r</dc:creator>
      <dc:date>2025-07-29T17:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi UI load balance with HAProxy to CONNECTED nodes only</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411977#M253176</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/126490"&gt;@asand3r&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Use a client certificate eliminates need for token when connecting with NiFi.&lt;BR /&gt;A secured NiFi will always want a client certificate first and only use other authentication methods when a client certificate is not presented in the TSL exchange.&amp;nbsp; This is how NiFi node perform authorized actions between nodes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 15:38:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411977#M253176</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2025-07-30T15:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi UI load balance with HAProxy to CONNECTED nodes only</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411984#M253180</link>
      <description>&lt;P&gt;OK,&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;, thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 08:58:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-UI-load-balance-with-HAProxy-to-CONNECTED-nodes-only/m-p/411984#M253180</guid>
      <dc:creator>asand3r</dc:creator>
      <dc:date>2025-07-31T08:58:38Z</dc:date>
    </item>
  </channel>
</rss>

