图解 Kafka 源码之 NetworkClient 网络通信组件架构设计(下篇)
02.2.7leastLoadedNode()Choosethenodewiththefewestoutstandingrequestswhichisatleasteligibleforconnection.Thismethodwillpreferanodewithanexistingconnection,butwillpotentiallychooseanodeforwhichwedon'tyethaveaconnectionifallexistingconnectionsareinuse.Ifnoconnectionexists,thismethodwillpreferanodewithleastrecentconnectionattempts.Thismethodwillneverchooseanodeforwhichthereisnoexistingconnectionand...