1
sjwsjwsjw
348d

I vaguely remember some joke about how difficult networking is and how some Jeff Atwood blog post I think makes the comparison about analogy of sending actors in a taxi to somewhere being compared to a packet, anything can happen inbetween but you will get the packet or something indistinguishable from the original at the other end if all goes well.

Are occasional/intermittent 503 service unavailable or 504 gateway timeouts unavoidable for microservices calling another external microservice?

Like at that point isn't receiving a 503 or 504 from something else, somewhat outside my jurisdriction, albeit I am fucked if I am depending on them and need to fail gracefully.

Comments
  • 0
    yeah l, pretty much but there are things you can do to handle it better than simply crashing the service

    (look up bulkhead, circuit breaker. and I'm sure there are others that I'm ignorant about)

    tbf. Even though I expect to see them at my current job since they are a big corp. I've only seen circuit breaker in one service.

    generally people have been okay with the occasional 503,504s
  • 0
    Getting a 5xx is always a server side error, meaning there's not much you can do when getting them. They should, however, be occasional, and will sometimes include a retry-after header in the response indicating when requests can be retried.
  • 0
    503 is quite common when the dependent service is down either because it got killed at runtime or it didn't ever startup successfully. 504 occurs when your dependent service doesn't respond in a timely fashion for the LB to forward back to you

    Graceful failure is very important especially in a system broken down into multiple components

    Like everything, software components can fail and do fail and there should be some level of preparedness
Add Comment