ES 5.0 cluster question

I've just set a relk stack with 3 master nodes, 2 data nodes, and 1 client node that talks to kibana. All 6 nodes are in the cluster. I read that my logstash instances need to talk to the data nodes directly. The stack is functioning but I'm curious what role the 3 masters are playing if I'm talking directly to the data nodes?

Also, should my ES cluster be behind a proxy?

If you have clients, let LS talk to them.

They provide stability and resilience for your cluster.

Thank you for the reply. Can you point me to a best practices diagram for ES cluster?

Not sure we have diagrams around that sorta thing.