3 ms·
Funny enough I found that rolling most of the error types into one error type of circuit level that is either server failure or application logic failure is rea
by grogenaut 4y ago
Funny enough I found that rolling most of the error types into one error type of circuit level that is either server failure or application logic failure is really where we wanted to go with circuit breakers. Having many new error types and not making the compiler and force you to check for those error types causes new errors to show up in an existing RPC method and no one notices it. Worse it either gets accidentally thrown into server errors which causes circuits to close when they shouldn't because it's actually a problem in the calling service, or they get thrown into user cases when they should actually be server failures and services continue to slam services that are actually broken. At work we mostly got it down to those two areas with lots of nuances under the business logic level issues as opposed to the server issues. However I don't think that using hundreds of status codes is the right way to go about it those two classes seem to be a really good place at the Hep binding and circuit breaker level. Circuit breakers in general are kind of tough.
- hinkley 4y agoYou can think of REST as having 600 status codes, or you can think of it as having about seven. - Enjoy - no it's over here - What are you talking about? - Who the hell are you? - Not for you - Nothing's here - I fucked up Only the last one should be associated with circuit breakers, which I think you already get. Then it's just two values to worry about. < 500, and >= 500
- grogenaut 4y agoOh I 100% agree with you.. though I think you're missing "you fucked up". My point is more just that people mess up and blur the lines accidentally either throwing exceptions which get propagated up as internal service errors when they should actually get run across the wire as business logic errors as part of you fucked up. Or really they didn't guard their code correctly and you get we fucked up when you really meant say overloaded. And it does start getting really blurry when you get into you fucked up. Or you are fucking up so hard that we fucked up and in fact our fucking up everybody else.
- hinkley 4y ago400 You Fucked Up aka "What are you talking about?"
- grogenaut 4y agoaah missed it, I was cooking dinner. 100% agreed.
- hinkley 4y agoOriginally I had them in random order and then I sorted them to try to make it easier for people to guess the status code from the colloquial description :)
- grogenaut 4y agowhich one is teapot?
- hinkley 4y agoYou can’t prove the teapot exists, or does not exist, so does it really matter? And status 418 is only legal on April 1 in countries that celebrate April Fool’s Day. You can just turn your servers off for the day and not answer requests.
- grogenaut 4y agoThat seems like a very reasonable hedge against uncertainty. I will bake it into our sla/slo.
- philsnow 4y agoHTTP error codes, the short version: 2xx: here you go 3xx: you go here 4xx: you fucked up 5xx: I fucked up (not mine, stolen from I-can't-remember-where)