Comments (1)
The issue is resolved by upgrading the client to Http2Client so that connection pooling is not necessary as HTTP 2.0 protocol supports multiplex. The user have two options in term of cache connection:
- If you client will be calling service very frequently, then get the connection info from cluster and create a connection and cache it and reuse it. However, the cached connection might be disconnected from the server side(server down etc.) you need to check the connection state before using it. Follow these tutorial to see how it is used.
https://networknt.github.io/light-rest-4j/tutorial/ms-chain/
https://networknt.github.io/light-rest-4j/tutorial/discovery/
Also there is an example client here.
https://github.com/networknt/light-example-4j/tree/master/client
- The other option is to create a new connection for each request and close the connection after the request. This pattern is suitable for infrequent calls to services as it doesn't make sense to hold the resource. Take a look at the example client to see how this is done.
https://github.com/networknt/light-example-4j/tree/master/client
from light-4j.
Related Issues (20)
- change the content type to application/x-yaml for yaml
- rollback 2149 to change back to application/yaml HOT 1
- return 415 error if config server not return yaml and json format
- we need to load both decryped yaml and undecryped yaml from config server
- stop server or use the backup to start the server on config server error
- HandlerConfig supports additionalHandlers, additionalChains and additionalPaths
- remove jaeger-tracer module as it is replaced by OpenTelemetry
- split handler-config from handler module
- refactor limit-config to remove dependency for undertow
- remove the token from portal-registry.yml
- resolve the config reload registry issue
- Fix cases where Connection Establishment Timed Out is incorrectly logged (1.6.x) (SimplePool)
- remove unused imports
- Add aws lambda error codes
- DefaultConfigLoader handles lightEnv in one place in the beginning
- fallback to cached config to start server for ConnectExecption and HttpConectTimeoutException
- split logger-config and logger-handler to share with light-aws-lambda
- split sanitizer-config module to share with light-aws-lambda
- move EncoderWrapper to sanitizer-config module
- Possible dependency conflict due to version conflict in /client. HOT 7
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 light-4j.