To install below Druid components, I need to choose a server for each of these (Master/datanode).
We have 3 master nodes on our cluster. Can anyone help me in understanding which component has to be installed on what node (data node/Master node)
Please refer below answer from https://community.hortonworks.com/questions/140030/druid-installation.html
First, yes you can co-locate all those service together. Second in order to get high availability you need to have at least 2 different physical nodes running all the services. Thus you will get HA with a replication of 2. Or you can choose an other combination of collocation where each service is run at least over 2 different nodes.
Although ideally you want to have something like this. Node1 Broker Node2 Broker Node3 Router/Overlord/Coordinator/Superser Node4 Router/Overloard/Coordinator/Superset The reason what you need broker to be alone is the fact that broker usually needs way more memory than all the other together therefore you might have special hardware for that. But to keep it simple you can start with collocate all the services X 2 and make sure that broker is not running with another service that needs RAM as well.
The components of druid, coordinator, router, overlord and broker, are working closely together. Each of them has it's own task. You can find an overview here. Mainly they are coordinating the druid jobs. So I recommend that you put them together on a master node. Superset is an extra component. You can put it on another master node or on the same that does not matter.
Durid also need's Druid Historical and Druid MiddleManager components. This you should install on the Data Nodes.
Here is an answer to a similiar questions like your's with some more informations.
If you are intrested in an architecture overview of druid i can advise slide five of this presentation.
I hope i could help you.