Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Does this not maximize the chance of failure? Especially if this approach is used with more services, if any of the calls fails, then that causes the entire request to fail. And even if the chance of any given networrk request failing is 0.0001%, it starts to grow rapidly as more services are involved. Commented Apr 4, 2023 at 3:17
  • @user1937198: Retry policies are a thing. This is also a matter of picking your poison. Microservices come with a certain overhead cost and certain benefits. So do monoliths - different ones of course. Secondly, you would need to have 10,000 network calls in a single request before your 0.0001% would even approach a 1% chance of failure, and that's assuming that any singular request failure cannot be retried and has no fallback ability. That's just not a realistic amount of network dependencies to be calling. Show me a company that has 10,000 different microservices (not instances!) Commented Apr 4, 2023 at 3:34
  • @user1937198: To put it differently, if you balk at the idea of doing a networked call to a different service and would much rather keep it within the same runtime, then microservices are not the right architecture for you. The posted question however is firmly rooted in a microservice architecture, and therefore so is my answer. Commented Apr 4, 2023 at 3:38
  • its not that I balk at the idea of a network call, so much as a network call in the critical path. Asynchronous techniques allow avoiding the risk of failure in the critical path. And 1% is an unacceptably high chance of failure in most systems. 0.1%-0.01% is a more common requirement. Commented Apr 4, 2023 at 11:00
  • @user1937198: Asynchrony does not affect failure rates of requests. Obvious async-related bugs aside (which, if we counted them, would count against asynchrony), a failure would remain a failure regardless of it being handled synchronously or asynchronously. Even with your shifted goalposts of what constitutes a "common requirement", your 0.1%-0.01% example still requires between 100 and 1,000 network calls needed to resolve a single request. It's still nowhere near a realistic ballpark of how many extra network calls a microservice architecture adds into the mix. Commented Apr 4, 2023 at 23:30