VMware Cloud Community
TheVMinator
Expert
Expert

Affinity rules and HA

When do I need affinity rules for an application with a 3 tiered architecture with web front end, application tier and database on different VMs, and when do I NOT need them?  What are the performance requirements that make that necessary and when is that introducing unneeded complexity?

Reply
0 Kudos
4 Replies
vbrowncoat
VMware Employee
VMware Employee

It depends on your app and it's tolerance for the latencies introduced from VMs running on different hosts vs. the same host. I'd argue that in a normal environment the difference would be minimal but you would really have to test and see, then decide if that difference is worth the decrease flexibility/increased complexity of affinity rules.

Does this answer your question?

TheVMinator
Expert
Expert

Yes it would depend on the increase in latency introduced by packets potentially going through a physical nic, over a wire to a switch, out the switch to another host, to that hosts physical nic, into the virtual switch and then to the other VM.  What is a fair way to calculate that increase in latency - a ping test from esxcli to the other hosts vmkernel port?

Reply
0 Kudos
vbrowncoat
VMware Employee
VMware Employee

That's one way. I'd recommend testing application performance though if possible.

Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee

In below 2 posts, I have explained some use cases where DRS affinity rules can be used :

DRS rules PART I: How to create VM-Host DRS affinity rule using vSphere API | vThinkBeyondVM

DRS rules PART II: How to create VM-VM affinity rules using vSphere API. | vThinkBeyondVM

How DRS rules are treated by vSphere HA: is vSphere HA aware of DRS affinity rules? | vThinkBeyondVM

Hope this helps you


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos