Comments (6)
Probably a topic that better suited for in person discussion, but in short: Being a cross-service, cross-language concern, I have strong reservations against making the RPC layer more complicated that absolutely necessary. I suspect that we'll get better results when we define service health in terms of the error domain of a given service, rather than trying to derive everything from RPC. In this particular case, what is it about the B->C functionality that broke down, and how can B indicate that (1) B itself cannot currently perform it's function and (2) this is due to a problem with C.
In pseudo-code:
class B {
void collectDataFromC() {
data, err = c.getData()
if err {
// "collectDataFromC": indicates what functionality broke in B
// "C" indicates to the deployment system that "C" may have a problem. Note that this fact can likely be derived from B's client metrics.
healthChecks.hint("collectDataFromC", "C")
}
}
}
Reading this again, I guess the above still doesn't answer what B should tell A, and how A can possibly differentiate between "B's broken" and "C's broken". Dunno.
from conjure-java-runtime-api.
503 is available via QosException. In what circumstances would you want to use 502 and 504?
from conjure-java-runtime-api.
Let's say a proxy server is responsible for translating queries and dispatching requests to the appropriate backend. The proxy determines that a selected dataset is stored on a specific backend server and queries that backend.
502 Bad Gateway
The backend responds with 404. The proxy could respond with 500 here, but 502 indicates the backend's response is inconsistent with the proxy's understanding of where the datasets are stored.
504 Gateway Timeout
The backend fails to respond in a timely manner. The proxy could respond with 500 here, but 504 indicates the proxy server did not receive a timely response from the backend.
from conjure-java-runtime-api.
I generally prefer we dispatch error handling on ErrorType.Code
together with the error name, rather than on the numeric http error code itself. In what way would a standards-compliant http client (that doesn't know about error Code and Name) respond to 502/504 as opposed to 500?
from conjure-java-runtime-api.
That's fair, I was thinking more about how to debug a failure from a server's HTTP response. I can't imagine a generalized action a standards-compliant http client would take when given a 502/504.
from conjure-java-runtime-api.
@uschi2000 this came up again for health checks that define an acceptable error rate. Let A, B, C be conjure services. Requests flow A -> B -> C. C responds with a 500. In conjure, there's only 500s for service errors so B responds with 500 and A responds with 500. If C continues to respond with 500s, A, B and C will all report unhealthy. In order to maximize signal, I prefer only C to report unhealthy so I know which service to investigate. This is pretty easy to indicate by having A and B respond with 502 or 504, whichever is more appropriate.
from conjure-java-runtime-api.
Related Issues (20)
- New ServiceExceptionAssert.hasArgSatisfying(...) assertion
- Upper camel case regexp in ErrorType is not valid HOT 1
- Split errors jar into client and server jars HOT 1
- Safe Loggable QoSExceptions
- ServiceException rendered message is malformed
- ServiceException rendered message should include both safe and unsafe parameters HOT 2
- Human readable time types HOT 6
- ProxyConfiguration option for using JVM default proxy selector HOT 2
- Make RemoteException SafeLoggable
- Non-string error arg values are serialized to JSON strings instead of JSON objects
- Add original error message to Assertions#checkThrowableIsOfType
- ServiceExceptions should retain errorInstanceId from causes HOT 10
- Means of creating a SslConfiguration from the JDK system truststore HOT 2
- FAILED_PRECONDITION probably be 400, not 500 HOT 2
- Move remoting3's UserAgent here HOT 3
- SerializableError throws NPE if any of the SafeArgs are null HOT 1
- Unable to extend PartialServiceConfiguration HOT 2
- support X-B3-Flags header for trace debug/sampling propagation
- Better error message for type mismatch in test-utils' argument assertions
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 conjure-java-runtime-api.