YugaByte provide's a smartdriver to help load balance across distributed nodes (amongst other things). In cases where this driver can't be used, one can use a proxy to achieve the same. The following are instructions to use HAProxy to do this:
- Use HAProxy with the following config (while changing/tuning the YB parameters as needed):