Need guidance and help integrating squid with haproxy

Hello,
I have a Squid proxy server running perfect with 254 IPv4 addresses. everything is working properly but when I get huge connections squid is not able to handle them and thus proxies stop working. I was told that HAProxy will load balance but I have no idea how to do that. I have like 254 IPs and 254 Ports IP:PORT and how would I configure HAProxy to load balance squid traffic? I would really appreciate the help.
thanking in advance.
Note: I am using squid proxy server in Ubuntu 18.04

the role of haproxy is to allow you run multiple squid servers and do a scale out of this layer. This should help you sustain your traffic load.

you can make HAProxy listen on any number of IP:port you need, and route traffic to a backend where you have multiple squid server listed. For each server in listed in the backend, you need a corresponding physical (or VM) squid running