keep-network / keep-core

The smart contracts and reference client behind the Keep network
https://keep.network
MIT License
112 stars 72 forks source link

Reverse proxy #3799

Open sammy007 opened 3 months ago

sammy007 commented 3 months ago

Not an issue, but who knows, it could be. Is it okay to run nucypher behind load balancer? When you load balance real client IPs are hidden and keep receive balancer's IP. Has been running it for a day and getting:

number of connected peers: [138]
2024-04-06T19:32:39.662Z    INFO    keep-libp2p libp2p/libp2p.go:547    established connection to [/ip4/172.18.0.1/tcp/40356/ipfs/16Uiu2HAmNUTrhsXTgrFCEJwngrwhDSf3AZLqMUFbfj7yTaQqG2BT]
2024-04-06T19:32:39.662Z    INFO    keep-libp2p libp2p/libp2p.go:569    starting ping test for [/ip4/172.18.0.1/tcp/40356/ipfs/16Uiu2HAmNUTrhsXTgrFCEJwngrwhDSf3AZLqMUFbfj7yTaQqG2BT]
2024-04-06T19:32:40.093Z    INFO    keep-libp2p libp2p/libp2p.go:593    ping test for [/ip4/172.18.0.1/tcp/40356/ipfs/16Uiu2HAmNUTrhsXTgrFCEJwngrwhDSf3AZLqMUFbfj7yTaQqG2BT] completed with success (RTT [143.628337ms])

So everything seems fine (given that 172.18.0.1 is a load balancer IP which is a tcp proxy)a nd I can see my node among other peers in their /diagnostics.

Asking to make sure that it is not a problem to run in behind a proxy.

sammy007 commented 2 months ago

Would like to just leave it here for future in case priorities will change https://github.com/pires/go-proxyproto the library provides support for v1 and v2 proxy protocols, should eliminate all issues with running keep-client behind balancer.