connect-es
connect-es copied to clipboard
Add more information about http2 connection
Is your feature request related to a problem? Please describe.
CONTEXT
Within the YDB SDK, client-side load balancing is used. We send a single request to any database node, and it returns an array of available endpoints. Our task is to maintain connections to these endpoints as needed: close connections that we no longer need to use, create new connections to those that are missing, balance requests across these connections, and have the ability to send a request to a specific connection.
PROBLEM
Currently, it's not very clear how to properly close a connection (graceful shutdown), how to obtain the status of a connection, and how to receive notifications when a connection has been closed.
ONLY FOR HTTP2
Describe the solution you'd like
Extends Transport with EventEmitter, emit information about transport status changes, add current status of connection.
Additional context https://ydb.tech/docs/en/recipes/ydb-sdk/balancing https://blog.ydb.tech/client-side-balancing-in-ydb-89677b34fd5b