Data node and master node spec

i have 2 node server with different spec . is it possible to make them as data node and master node ? can i make data node is higher spec than master node ?

Master only nodes don't need a heap of resources, as they won't store indices like your data nodes. This is a reasonable approach.