With the removal of
TEIID-5411 we can further simplify our notion of connection handling. The current logic maintains a set of logins for known server instances under one logical connection. When a connection is returned to an XA pool (or the client issues special sql) the logical connection will select a new instance using a cached login if possible.
The benefits of the current approach are:
- works just from the hosts listed in the url
- works with XA connection pooling or connection pooling in general with additional setup to provide simple load balancing
The drawbacks are:
- creates a set of logins which may mostly sit idle
- is not load balancer aware - for example when just a load balanced end point is used. And the load balancing is just random, not intelligent.
- requires the client to keep a pool of physical connections
A proposal would be to keep multiple url failover, but removal all of the logic related to maintaining multiple logins under a logical connection.