Comments (6)
@kyle-ssg we were also thinking it might be possible to do either DNS pre-fetching or SSL warming as well if the HTTP client allows it
from flagsmith-nodejs-client.
I should add there may be considerations here in the infrastructure side. You might want to consider your idle timeouts and the maximum number of connections your web-server has configured.
from flagsmith-nodejs-client.
Understood RE keep-alive.
@kyle-ssg we were also thinking it might be possible to do either DNS pre-fetching or SSL warming as well if the HTTP client allows it
I'd imagine people would construct an instance of Flagsmith outside of requests/functions. With that being the case, wouldn't that already be essentially done as part of the first request in local evaluation?
from flagsmith-nodejs-client.
I should add there may be considerations here in the infrastructure side. You might want to consider your idle timeouts and the maximum number of connections your web server has configured.
Considering this, what do we think about adding an optional agent as part of the Flagsmith class properties?
Example:
const agentOptions: AgentOptions = { keepAlive: true, keepAliveMsecs: 6000 };
const httpAgent = new http.Agent(agentOptions);
const httpsAgent = new https.Agent(agentOptions);
const agent = (_parsedURL:URL) => _parsedURL.protocol == 'http:' ? httpAgent : httpsAgent;
....
const flagsmith = new Flagsmith({
environmentKey,
agent,
...
});
Or, do some of this internally and have
const agentOptions: AgentOptions = { keepAlive: true, keepAliveMsecs: 6000 };
....
const flagsmith = new Flagsmith({
environmentKey,
agentOptions,
...
});
from flagsmith-nodejs-client.
I realised actually the ability to supply a custom agent would allow for proxy support, so I think we'll go with that.
const agent = require('https-proxy-agent');
const flagsmith = new Flagsmith({
environmentKey,
agent,
...
});
from flagsmith-nodejs-client.
from flagsmith-nodejs-client.
Related Issues (20)
- An error importing in TypeScript under Nest HOT 12
- Any API call is failing while server is up and running HOT 1
- getIdentityFlags returns 405 on edge-proxy #51 HOT 1
- [Question] What is the behaviour of `getIdentityFlags` HOT 3
- Cannot use `DefaultFlag` HOT 1
- Local evaluation mode takes longer than expected HOT 1
- Version 3.0.0 on NPM has missing build directory HOT 2
- Implement `IN` keyword for local evaluation HOT 1
- requestTimeoutSeconds has no default value
- Version 3.1 that added 10 second default timeout has bug. HOT 2
- Version 3.1 that added 10 second default timeout has bug. HOT 3
- Export `FlagsmithConfig` from index HOT 1
- Using "IN" operator in a trait with a number type causes nodejs (local evaluation) to throw HOT 2
- Check if flag is "server-side only" HOT 1
- Feature values always have type string when using local evaluation mode
- "Contains" and "Does not contain" operators throw on non-string/array trait values
- Multivariate flags are not evaluated correctly when using local evaluation mode HOT 1
- Local evaluation doesn't return consistent results for multivariate features HOT 1
- getIdentityFlags tries to make a request to API if identifier is missing / undefined / empty HOT 1
- Silently handle errors writing analytics data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flagsmith-nodejs-client.