I have two dedicated machines for ES (2.2.0). The two machines have the same specs. Each runs on a Windows Server 2012 R2 and has 128GB memory. Regarding ES, I plan to have
Basically you simply need to configure the network settings to make sure that all nodes can see each other on the network. Additionally, since you're running two nodes on the same machine and you still want high availability, you want to prevent a primary shard and its replica to land on the same physical machine.
Finally, since you'll have a total of four nodes in your cluster, you'll want to prevent split brain situations, so you need to set discovery.zen.minimum_master_nodes
as well.
Node 1/2 on SRC01:
# cluster name
cluster.name: Name_of_your_cluster
# Give each node a different name (optional but good practice if you don't know Marvel characters)
node.name: SRC01_Node1/2
# The IP that this node will bind to and publish
network.host: 172.21.0.21
# The IP of the other nodes
discovery.zen.ping.unicast.hosts: ["172.21.0.22"]
# prevent split brain
discovery.zen.minimum_master_nodes: 3
# to prevent primary/replica shards to be on the same physical host
# see why at http://stackoverflow.com/questions/35677741/proper-value-of-es-heap-size-for-a-dedicated-machine-with-two-nodes-in-a-cluster
cluster.routing.allocation.same_shard.host: true
# prevent memory swapping
bootstrap.mlockall: true
Node 1/2 on SRC02:
# cluster name
cluster.name: Name_of_your_cluster
# Give each node a different name (optional but good practice if you don't know Marvel characters)
node.name: SRC02_Node1/2
# The IP that this node will bind to and publish
network.host: 172.21.0.22
# The IP of the other nodes
discovery.zen.ping.unicast.hosts: ["172.21.0.21"]
# prevent split brain
discovery.zen.minimum_master_nodes: 3
# to prevent primary/replica shards to be on the same physical host
# see why at http://stackoverflow.com/questions/35677741/proper-value-of-es-heap-size-for-a-dedicated-machine-with-two-nodes-in-a-cluster
cluster.routing.allocation.same_shard.host: true
# prevent memory swapping
bootstrap.mlockall: true