how to find the load balancer log

I setup a load balancer with 1-click and attached 3 droplets to it. I want to know when a client made a request to the load balancer, which droplet it is connected to. I cannot find it when ssh into the droplet because the tcp connections only show the connection is from[port].

Is there any way I can find out which droplet and which port the client is related?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

What you could do is to enable PROXY Protocol for the Load balancer.

The PROXY protocol is a way to send client connection information (like origin IP addresses and port numbers) to the final backend server rather than discarding it at the load balancer.

This information can be helpful for use cases like analyzing traffic logs or changing application functionality based on geographical IP.

You can do that by following the steps here:

And then configure your Nginx or Apache services to accept PROXY protocol headers as described here:

Hope that this helps. Regards, Bobby