-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
Description
Producers and consumers connecting to NameServer to obtain routing information are random, and data is obtained by randomly selecting a NameServer from the given NameServer list for connection. This situation has the following disadvantages:
- The better machines deployed by NameServer cannot exert all their machine performance, while the poorer machines may connect to many, causing the service to crash.
- Cannot specify a NameServer for connection (except for configuring a single NameServer address).
Therefore, it is considered to add a strategy pattern for selecting a NameServer for connection in the client (producer and consumer). The developer can choose or implement the strategy to select the NameServer for connection. The following strategies can be considered:
- Random strategy: randomly select a NameServer for connection (current mode).
- Specified strategy: specify a specific NameServer for connection.
- Polling strategy: the current application's clients select from the given NameServers on their own.
- NameServer minimum client connection strategy: obtain the current NameServer with the minimum number of client connections for connection.
Other strategies can be added in the future.