1. Home
  2. Explore
  3. Computer Science
  4. Resilient Application Design Patterns

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Resilient Application Design Patterns

  • 62Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Resilience Foundations
In distributed cloud-native applications, the assumption that hardware, networks, and software components will eventually fail is summarized by the idea that
are given.

62 questions

  1. 1
    In distributed cloud-native applications, the assumption that hardware, networks, and software components will eventually fail is summarized by the idea that
    _____
    are given.
    Hint

    Recall the central reliability quote presented at the beginning.

    Answer

    Failures

  2. 2
    When designing a resilient application, developers should identify the application's possible
    _____
    so it can recover when components fail.
    Hint

    Think about the different ways a component can break or become unavailable.

    Answer

    failure modes

  3. 3
    The goal of resilience patterns is to allow an application to recover from component failures and continue to
    _____
    its users.
    Hint

    What should the application continue doing even when part of it is down?

    Answer

    serve

  4. 4
    The five resilience patterns presented were timeouts, graceful degradation, retries, exponential backoff, and
    _____
    .
    Hint

    This pattern temporarily stops requests to a failing service.

    Answer

    circuit breakers

  5. 5
    The additional resilience practice presented in the talk was called
    _____
    engineering.
    Hint

    This practice deliberately introduces failures to learn how systems behave.

    Answer

    chaos

  6. 6
    The React application in the demonstration was contained inside the
    _____
    app folder.
    Hint

    The folder name identifies the front-end portion of the application.

    Answer

    client

  7. 7
    The main React component responsible for fetching and displaying joke data was named
    _____
    .
    Hint

    Its name combines an action involving data retrieval with the JavaScript file extension.

    Answer

    fetch data JS

  8. 8
    The React component's populate joke data function calls the
    _____
    endpoint.
    Hint

    This endpoint is exposed by the .NET API.

    Answer

    api/Joke

  9. 9
    The .NET controller defines a joke client that calls a third-party joke API through an
    _____
    .
    Hint

    This .NET object is used to make REST calls.

    Answer

    HttpClient

  10. 10
    The joke response object contains a setup, a punchline, and a
    _____
    field.
    Hint

    This field identifies where the joke response came from.

    Answer

    source

  11. 11
    In the demonstrated request flow, the .NET microservice acts as a
    _____
    between the React application and the third-party joke API.
    Hint

    It forwards requests and responses without being the original joke provider.

    Answer

    proxy

  12. 12
    If requests wait indefinitely for a failing third-party API, accumulating requests can eventually bring down the .NET
    _____
    .
    Hint

    This is the backend component receiving requests from the React application.

    Answer

    microservice

  13. 13
    The first resilience pattern limits how long a client waits for a response by using
    _____
    .
    Hint

    This pattern stops waiting after a specified duration.

    Answer

    timeouts

  14. 14
    In .NET, a basic timeout can be configured by setting the
    _____
    property on HttpClient.
    Hint

    This property has the same name as the resilience pattern.

    Answer

    timeout

  15. 15
    The demonstration configured the basic HttpClient timeout to
    _____
    seconds.
    Hint

    The request was allowed to wait for this duration before timing out.

    Answer

    five

  16. 16
    When a request exceeds the configured timeout, the .NET microservice receives a timeout
    _____
    .
    Hint

    This is the error produced when the time limit is exceeded.

    Answer

    exception

  17. 17
    The .NET resiliency library used in the demonstration was called
    _____
    .
    Hint

    This library provides policies for timeouts, retries, fallbacks, and circuit breakers.

    Answer

    Polly

  18. 18
    Using Polly, the request and response code was wrapped inside an anonymous asynchronous function passed to
    _____
    .
    Hint

    This Polly method executes an asynchronous policy-protected operation.

    Answer

    ExecuteAsync

  19. 19
    A Polly timeout can provide more granular control over individual asynchronous tasks by using a
    _____
    .
    Hint

    This object allows an asynchronous operation to be cancelled.

    Answer

    cancellation token

  20. 20
    Compared with setting the HttpClient property directly, Polly provides more
    _____
    over how a timeout is handled.
    Hint

    The phrase describes finer control over the individual operation.

    Answer

    granularity of control

  21. 21
    Graceful degradation provides an alternative response when the normal policy encounters an
    _____
    .
    Hint

    This is the failure condition handled by the fallback policy.

    Answer

    exception

  22. 22
    In Polly, graceful degradation was implemented with a
    _____
    policy.
    Hint

    This policy supplies an alternative result when the primary operation fails.

    Answer

    fallback

  23. 23
    The fallback policy in the demonstration returned a
    _____
    of jokes.
    Hint

    The fallback result was a collection containing one joke.

    Answer

    list

  24. 24
    The fallback joke identified its origin by setting its source field to
    _____
    .
    Hint

    The source value indicated that the joke did not come from the third-party API.

    Answer

    fallback

  25. 25
    When the third-party API exceeded the timeout, the application could continue operating by displaying a
    _____
    joke.
    Hint

    This joke is supplied locally rather than retrieved from the unavailable service.

    Answer

    fallback

  26. 26
    A Polly
    _____
    allows multiple policies to be combined in an order of precedence.
    Hint

    This structure chains policies together.

    Answer

    policy wrapper

  27. 27
    To activate the chained resilience behavior, the policy wrapper must be passed to
    _____
    .
    Hint

    This is the method used to execute the protected asynchronous request.

    Answer

    ExecuteAsync

  28. 28
    The retry pattern controls how many times an endpoint is contacted again after an initial
    _____
    .
    Hint

    A retry is only needed when the first attempt does not succeed.

    Answer

    failure

  29. 29
    In Polly, the retry policy was configured to handle a general
    _____
    .
    Hint

    This is the error condition used to trigger another attempt.

    Answer

    exception

  30. 30
    The asynchronous Polly method used to define the action performed after a failed attempt was
    _____
    .
    Hint

    It is the retry counterpart of the fallback async method.

    Answer

    retry async

  31. 31
    In the retry demonstration, the retry count was set to
    _____
    attempts.
    Hint

    The application made this many retry attempts before using the fallback.

    Answer

    five

  32. 32
    With a two-second timeout per attempt and five attempts, the example could spend
    _____
    seconds retrying in total.
    Hint

    Multiply the timeout duration by the number of attempts.

    Answer

    10

  33. 33
    The retry policy was placed in the policy wrapper so that, after retries failed, the application could use the
    _____
    policy.
    Hint

    This policy returns an alternative joke after the primary operation cannot succeed.

    Answer

    fallback

  34. 34
    Basic retries can overload a struggling third-party API because many clients repeatedly send requests, potentially creating a distributed
    _____
    of service attack.
    Hint

    The phrase describes making a service unavailable by overwhelming it with requests.

    Answer

    denial

  35. 35
    Exponential backoff improves basic retries by increasing the waiting time between successive
    _____
    .
    Hint

    The delay grows rather than remaining constant.

    Answer

    retries

  36. 36
    The example exponential backoff delays increased from two seconds to four seconds, then eight seconds, and finally
    _____
    seconds.
    Hint

    Each delay doubled from the previous one.

    Answer

    16

  37. 37
    The exponential backoff delay was calculated using a power of
    _____
    .
    Hint

    The delay doubles with each retry attempt.

    Answer

    two

  38. 38
    By spreading requests over a longer period, exponential backoff helps distribute the
    _____
    sent to the third-party API.
    Hint

    This refers to the volume of requests placed on the service.

    Answer

    load

  39. 39
    Even with exponential backoff, retries can cluster when clients use the same deterministic delay calculation; this problem is addressed by the
    _____
    pattern.
    Hint

    This pattern adds randomness to retry timing.

    Answer

    jitter

  40. 40
    The jitter implementation added a random delay between zero and
    _____
    milliseconds.
    Hint

    The range added up to one second of randomness.

    Answer

    a thousand

  41. 41
    The purpose of adding jitter to exponential backoff is to make retry timing more
    _____
    .
    Hint

    Random timing prevents multiple clients from retrying together.

    Answer

    random

  42. 42
    A circuit breaker prevents repeated requests from reaching a service that has continued to
    _____
    .
    Hint

    The circuit opens when repeated errors show that the service is unhealthy.

    Answer

    fail

  43. 43
    When a circuit breaker is open, it avoids sending requests to the third-party API and instead returns a
    _____
    response.
    Hint

    This response stands in for the unavailable service.

    Answer

    dummy

  44. 44
    In the demonstration, the circuit breaker opened after
    _____
    exceptions within one minute.
    Hint

    This threshold was reached through repeated failed calls.

    Answer

    five

  45. 45
    After opening, the circuit breaker prevented requests from reaching the third-party API for
    _____
    minute.
    Hint

    The circuit remained open for the duration specified in the policy.

    Answer

    one

  46. 46
    The special exception handled by the circuit-breaker fallback was called a
    _____
    circuit exception.
    Hint

    The exception name describes the state of an opened circuit.

    Answer

    broken

  47. 47
    The circuit-breaker fallback returned a joke whose source identified it as the
    _____
    breaker fallback.
    Hint

    The source indicated that the response came from the circuit-breaker mechanism.

    Answer

    circuit

  48. 48
    The circuit-breaker policy must preserve state across requests, so the policy wrapper was moved to a class
    _____
    .
    Hint

    This class-level storage location lets the policy retain its state.

    Answer

    field

  49. 49
    The policies and client construction were moved into an initialization method named
    _____
    policies.
    Hint

    The method name refers to initializing the policies.

    Answer

    init

  50. 50
    Chaos engineering involves injecting failures or stress and then
    _____
    how the service behaves under that stress.
    Hint

    After creating a failure, engineers watch the system's response.

    Answer

    observing

  51. 51
    The purpose of chaos engineering is to improve system resiliency and performance by uncovering hidden
    _____
    .
    Hint

    These are problems that may remain invisible during normal operation.

    Answer

    issues

  52. 52
    Chaos engineering exposes system
    _____
    such as blind spots and unknown weaknesses.
    Hint

    The term refers to things the team does not know about or cannot normally see.

    Answer

    blind spots

  53. 53
    A traditional difficulty of chaos engineering is that teams may need to stitch together scripts and
    _____
    to cause failures.
    Hint

    These are software utilities used alongside scripts.

    Answer

    tools

  54. 54
    Injecting chaos directly into a production environment can be risky because it may affect real
    _____
    .
    Hint

    The concern is about disrupting systems that users depend on.

    Answer

    services

  55. 55
    The AWS service introduced for injecting controlled failures was the fault injection
    _____
    .
    Hint

    It is a simulator used to run fault-injection experiments.

    Answer

    simulator

  56. 56
    In the fault injection simulator, controlled chaos is organized into
    _____
    that run against an application.
    Hint

    An experiment defines the action, target, and duration of a fault.

    Answer

    experiments

  57. 57
    The demonstration used the fault injection simulator action named
    _____
    to disrupt the joke API infrastructure.
    Hint

    The action shuts down selected compute instances.

    Answer

    stop instances

  58. 58
    To limit the experiment to the intended API servers, the simulator selected instances using their
    _____
    .
    Hint

    These metadata labels identify resources.

    Answer

    tags

  59. 59
    The API server instances in the demonstration were identified with the tag
    _____
    .
    Hint

    The tag names the role of the selected servers.

    Answer

    API

  60. 60
    The stop-instances experiment was configured to keep the targeted EC2 instances stopped for
    _____
    minute.
    Hint

    The disruption lasted for the same duration used in the circuit-breaker example.

    Answer

    one

  61. 61
    The fault injection simulator can perform actions beyond stopping servers, including controlling
    _____
    container instances.
    Hint

    This phrase refers to a type of container infrastructure mentioned in the talk.

    Answer

    green

  62. 62
    A key benefit of the fault injection simulator is that it can target failures with considerable
    _____
    .
    Hint

    This means the experiment can be narrowly controlled.

    Answer

    granularity

1 of 62
Question 1 of 62

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent