You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section shows examples of how to connect to multiple Cartridge routers.
We recommend to use load balancer in production applications rather than leaving this task to the connector.
Warning
In the case of using multiple instances of TarantoolClient we strongly recommend to apply a shuffle function to the list of addresses.
By default, TarantoolClient uses the round-robin approach for selecting the next available connection to distribute the load between Tarantool servers.
When several instances of TarantoolClient are used simultaneously, with the default connection selection strategy and without shuffling of the server addresses the first request from every instance will be sent to the same server.
Note
You do not have to worry about shuffling addresses if you are using a single TarantoolClient connected to multiple instances, or if you are using a custom connection selection strategy that takes into account the problem of simultaneous requests.
Setting addresses manually
Example of TarantoolClient set up with connecting to multiple routers