How can we apply HA-proxy with clustering on openfire

I have a openfire server setup on three server and all of three replicate to each other , so what can i do to apply ha-proxy and how can it would be in clustered structure.

pls give your suggestion.