hashgraph / hedera-sdk-js

Hedera™ Hashgraph SDK for JavaScript/TypeScript
https://docs.hedera.com/guides/docs/sdks
Apache License 2.0
277 stars 145 forks source link

Use `Math.random()` to select nodes #769

Closed janaakhterov closed 2 years ago

janaakhterov commented 3 years ago

Problem

The current implementation of picking nodes requires sorting an array of nodes first which can be very slow and requires a lock for each request. Replacing it with a randomly picking a node will achieve much higher performance.

Solution

Alternatives

No response

SimiHunjan commented 2 years ago

Follow parent issue https://github.com/hashgraph/hedera-sdk-js/issues/808