Hello Jens
Thanks a lot for haproxy conf.
Could you give more details about this point :
- I have 2 proxy nodes, which is running in a HA setup with keepalived and with a vip.-
- I have a dns record nifi-cluster01.foo.bar pointing to the vip address to keepalived
Thanks
Minh
Envoyé: jeudi 7 septembre 2023 à 11:29
De: "Jens M. Kofoed" <[email protected]>
À: [email protected]
Objet: Re: Help : LoadBalancer
De: "Jens M. Kofoed" <[email protected]>
À: [email protected]
Objet: Re: Help : LoadBalancer
Hi
I have a 3 node cluster running behind a HAProxy setup.
My haproxy.cfg looks like this:
global
log stdout format iso local1 debug # rfc3164, rfc5424, short, raw, (iso)
log stderr format iso local0 err # rfc3164, rfc5424, short, raw, (iso)
hard-stop-after 30s
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5s
timeout client 50s
timeout server 15s
frontend nifi-ui
bind *:8443
bind *:443
mode tcp
option tcplog
default_backend nifi-ui-nodes
backend nifi-ui-nodes
mode tcp
balance roundrobin
stick-table type ip size 200k expire 30m
stick on src
option httpchk
http-check send meth GET uri / ver HTTP/1.1 hdr Host nifi-cluster01.foo.bar
server C01N01 nifi-c01n01.foo.bar:8443 check check-ssl verify none inter 5s downinter 5s fall 2 rise 3
server C01N02 nifi-c01n02.foo.bar:8443 check check-ssl verify none inter 5s downinter 5s fall 2 rise 3
server C01N03 nifi-c01n03.foo.bar:8443 check check-ssl verify none inter 5s downinter 5s fall 2 rise 3
global
log stdout format iso local1 debug # rfc3164, rfc5424, short, raw, (iso)
log stderr format iso local0 err # rfc3164, rfc5424, short, raw, (iso)
hard-stop-after 30s
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5s
timeout client 50s
timeout server 15s
frontend nifi-ui
bind *:8443
bind *:443
mode tcp
option tcplog
default_backend nifi-ui-nodes
backend nifi-ui-nodes
mode tcp
balance roundrobin
stick-table type ip size 200k expire 30m
stick on src
option httpchk
http-check send meth GET uri / ver HTTP/1.1 hdr Host nifi-cluster01.foo.bar
server C01N01 nifi-c01n01.foo.bar:8443 check check-ssl verify none inter 5s downinter 5s fall 2 rise 3
server C01N02 nifi-c01n02.foo.bar:8443 check check-ssl verify none inter 5s downinter 5s fall 2 rise 3
server C01N03 nifi-c01n03.foo.bar:8443 check check-ssl verify none inter 5s downinter 5s fall 2 rise 3
I have 2 proxy nodes, which is running in a HA setup with keepalived and with a vip.
I have a dns record nifi-cluster01.foo.bar pointing to the vip address to keepalived.
In your nifi-properties files you would have so set a proxy host address: nifi.web.proxy.host: "nifi-cluster01.foo.bar:8443"
This setup is working for me.
Kind regards
Jens M. Kofoed
Den ons. 6. sep. 2023 kl. 16.17 skrev Minh HUYNH <[email protected]>:
Hello JuanNot sure if you understand my point of view ?It got a cluster nifi01/nifi02/nifi03I try to use unique url for instance https://nifi_clu01:9091/nifi, this link point to the randomly nifi01/nifi02/nifi03RegardsEnvoyé: mercredi 6 septembre 2023 à 16:05
De: "Juan Pablo Gardella" <[email protected]>
À: [email protected]
Objet: Re: Help : LoadBalancerList all servers you need.server server1 "${NIFI_INTERNAL_HOST1}":8443 sslserver server2 "${NIFI_INTERNAL_HOST2}":8443 sslOn Wed, Sep 6, 2023 at 10:35 AM Minh HUYNH <[email protected]> wrote:Thanks a lot for reply.Concerning redirection for one node. It is ok we got it.But how configure nifi and haproxy to point the cluster node, for instance cluster nodes "nifi01, nifi02, nifi03"regardsMinhEnvoyé: mercredi 6 septembre 2023 à 15:29
De: "Juan Pablo Gardella" <[email protected]>
À: [email protected]
Objet: Re: Help : LoadBalancerI did that multiple times. Below is how I configured it:
frontend http-in# bind ports sectionacl prefixed-with-nifi path_beg /nifiuse_backend nifi if prefixed-with-nifioption forwardforbackend nifiserver server1 "${NIFI_INTERNAL_HOST}":8443 ssl
On Wed, Sep 6, 2023 at 9:40 AM Minh HUYNH <[email protected]> wrote:Hello,I have been trying long time ago to configure nifi cluster behind the haproxy/loadbalancerBut until now, it is always failed.I have only got access to the welcome page of nifi after all others links are failed.If someone has the configuration, it is helpfull.Thanks a lotRegards
