I'd like to be able to extend the ConnectionPool interface with my own custom implementation.
I'd like to implement a ConnectionPool that uses a predictive load-balancer algorithm (moving avg. latency + error rate penalty) instead of the current ~load based logic (available connections).
The new ConnectionPool would be heavily inspired by the following talk:
https://youtu.be/6NdxUY1La2I
Would you be open to making the ConnectionPool for HTTPAgent extensible?
I'm thinking about something like:
const mod_cueball = require('cueball');
const mod_restify = require('restify-clients');
const PredictiveConnectionPool = require('cueball-predictive-connection-pool');
var client = mod_restify.createStringClient({
url: 'https://us-east.manta.joyent.com',
agent: new mod_cueball.HttpsAgent({
connectionPool: new PredictiveConnectionPool({...}),
recovery: {
default: {
timeout: 2000,
retries: 5,
delay: 250,
maxDelay: 1000
}
}
})
});
I'd like to be able to extend the
ConnectionPoolinterface with my own custom implementation.I'd like to implement a
ConnectionPoolthat uses a predictive load-balancer algorithm (moving avg. latency + error rate penalty) instead of the current ~load based logic (available connections).The new
ConnectionPoolwould be heavily inspired by the following talk:https://youtu.be/6NdxUY1La2I
Would you be open to making the
ConnectionPoolforHTTPAgentextensible?I'm thinking about something like: