Handling partial failures

Pragya Keshap answered on February 18, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Handling failures

  • Handling partial failures

    0

    The microservice-based application is a distributed application, but as there are many microservices that run on the cloud or different VMs, we have to design an API gateway so that it can handle the problem of partial failure. Note that, in a distributed system, one microservice calls another microservice.

    It might be possible that a microservice is either responding slowly or is unavailable, but its calls are not blocked by an API gateway over its non-response. Instead, the API gateway must sometimes handle these failures.

    For example, let's say an order details page also includes a shipping company's ratings

    generated by another rating microservice. If that rating microservice is unresponsive in the order details rendering, then the API gateway must return the rest of the order information to the client. In this case, the rating of the shipping company can either be empty or replaced by a hardcoded value. If any important microservice, such as an order service or account service, is unresponsive, the API gateway should return an error to the client.

    Netflix provides a library called Hystrix, which is a very useful library for handling partial failure in a distributed application. Spring Cloud supports Netflix's Hystrix library, and we can easily use this with the Spring Boot-based microservice application.

    In the Hystrix API, you can also set a timeout property that specifies the threshold for exceeding.

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: java partial
    Link to this answer
    Share Copy Link
    Contributed on Feb 18 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.