Comments (5)
Hey, thank you for bringing this to our attention. We will raise it internally and get back to you with a response from the team.
In the meantime, can you provide us with some additional information to help reproduce it:
- Server configuration
- Environmant configuration
from unleash-client-rust.
Upon investigation, the conditions for this error being returned does indeed depend on non-Unleash software: The Unleash server was hosted on a Kubernetes cluster behind a Google load balancer. The server was being CPU-throttled and the load balancer returned the 502 message when it couldn't get a reply from Unleash.
Still, it might be good to have some better handling of server errors.
from unleash-client-rust.
Hey, @skairunner ππΌ
Thanks again for raising this! Let me just make sure I get this right:
- When the client receives a 502 response, it logs an error, then continues running. It will try fetching toggles again at the next interval.
- When it receives a 502, you'd like/expect it to retry the toggle request after the specified interval.
Are those points correct?
We've talked briefly about this internally, and I think the reason it works the way it does is intentional. There's not much the SDK can do if it receives an error response, and it'll try again after the specified refresh interval anyway. In cases where you need to get updates immediately, you're probably best off bumping up the refresh rate.
Does that sound reasonable to you?
Still, it might be good to have some better handling of server errors.
That's a fair point! What would you classify as "better handling" in this case? What would you expect?
from unleash-client-rust.
After learning that it was not an Unleash server thing but rather from the load balancer, I think my ticket might be fine being closed
The client doesn't currently log the 502 error at all: it simply says poll: failed to retrieve features
; with PR #36 it says poll: failed to retrieve features - Error("expected value", line: 2, column: 1)
which is not incredibly helpful either. In the project I'm working on, I added a small hack to print the actual json value that failed to parse which is how I discovered the issue. So I guess what is really needed is improved error reporting.
Please feel free to close this issue!
from unleash-client-rust.
Got it! In that case I'll close this for now
from unleash-client-rust.
Related Issues (15)
- Performance with unknown features HOT 1
- RUSTSEC-2020-0057: crate has been renamed to `cipher` HOT 1
- RUSTSEC-2020-0056: stdweb is unmaintained HOT 1
- Build of `0.4.0` failed HOT 2
- Enh: remove the Arc<> on each strategy
- Implement Custom Stickiness for Variants
- Add Tokio ecossystem support HOT 9
- Make poll_for_updates Send HOT 2
- More informative warn logs HOT 2
- Implement Global Segments HOT 1
- custom strategies that aren't configured into the client are hard to debug HOT 1
- poll_for_updates discussion HOT 5
- unknown variant `SEMVER_LT`, expected `IN` or `NOT_IN`"
- enh: use enum_dispatch 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 unleash-client-rust.