Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
When we use the term Reactive, we are usually talking about Reactive Microservices. But what is a microservice? And how can we make it Reactive? This course will explore the difference between monoliths and microservices and show the journey to making a system Reactive.
Question: True or False: When building software you have to choose between building a monolith or building microservices. There is no in between.
Question: When deciding whether to build a system as a monolith or microservices we need to:
Question: How big is a microservice?
Question: True or False: A single system can have some characteristics of a Monolith and other characteristics of Microservices.
Monoliths Review
Question: True or False: The term “ball of mud” is applicable to all monoliths. They are, by their very nature, a huge mess that is difficult to sort through and understand.
Question: Another name for a “Ball of Mud” is:
Question: True or False: The ball of mud style of architecture suffers from too much isolation between components. As a result, over time the system becomes more disconnected, and harder to modify.
Question: To clean up our monolith so that it looks less like a ball of mud, we could do which of the following:
Question: Which of the following are characteristics of a monolith?
Question: A monolithic application is scaled using which of the following techniques?
Question: True or False: Communication between instances of a monolith typically happens through the database.
Question: What are some of the advantages of using a monolith?
Question: True or False: Failures in a monolith are isolated only to that instance of the monolith. We don’t have to worry that the failure may affect other instances.
Question: What are some of the disadvantages of using a monolith?
The Monolithic BBQ
Question: If we were to make a change to the database table for Orders, which of the following models would we potentially need to edit? Note: Make sure you select all of the correct options—there may be more than one!
Question: Management periodically runs a report that aggregates information on different orders. These reports give them an idea which menu items are being ordered more often. They use this information for planning future menus and promotions.
Recently, it has become clear that while these reports are running, parts of the system seem to become unresponsive. Specifically, the delivery drivers seem to experience more problems with the mobile application.
Note: Make sure you select all of the correct options—there may be more than one!
The most likely cause of these issues is:
Question: Recently, the team working on Reservations added a new field to the Customer table. This field allows users to specify a preferred restaurant location for their reservations. The addition of this new field required the execution of a database script that locked the customer table. During this period, the delivery drivers were unable to use the mobile application to retrieve their orders.
Note: Make sure you select all of the correct options—there may be more than one!
Why were the delivery drivers impacted by a change in the reservation data?
How could this have been prevented? Make sure you select all of the correct options—there may be more than one!
Question: The database backing our application has proved to be unresponsive. The operations team has analyzed the server and discovered that there is a lot of contention for disk. It turns out that the Orders portion of our system does a lot of reads and writes to the database (sometimes multiple reads/writes for a single request), and optimizing it will take a significant investment of resources. In the meantime, the contention for disk is resulting in poor performance in other parts of the system (Deliveries, Customers etc).
Note: Make sure you select all of the correct options—there may be more than one!
We could mitigate this problem by:
Question: In an effort to mitigate contention for the database, the development team has decided to introduce an in-memory cache in the application. Each copy of the application will maintain a list of all active orders in memory. They will be unloaded from memory once the order is closed. This will reduce the number of times we have to read from the database.
They have implemented and deployed the cache, but now they are finding that application no longer fits into available memory. It turns out that other parts of the application have also implemented caches in various places and the combination of all the caches is simply too much for the system to handle.
Note: Make sure you select all of the correct options—there may be more than one!
Possible solutions to the memory problem are:
Service Oriented Architecture Review
Question: True or False: A key principle of Service Oriented Architecture is that Services don’t share a database.
Question: In a Service Oriented Architecture, if one service needs access to the data from another service, it can:
Question: Which of the following are true for Service Oriented Architecture?
Note: Make sure you select all of the correct options—there may be more than one!
Question: We can characterize the relationship between Service Oriented Architecture and Microservices by saying:
Microservices Review
Question: True or False: Microservices should all be run in their own process (eg. JVM). As long as they are running in an independent process, a suitable way to deploy them would be to package them all into a single container so there is only one thing to deploy.
Question: Microservices share which of the following characteristics with Service Oriented Architecture.
Note: Make sure you select all of the correct options—there may be more than one!
Question: Some of the characteristics of a microservice architecture include:
Note: Make sure you select all of the correct options—there may be more than one!
Question: True or False: Systems built on Microservices never share code.
Question: A DevOps approach means:
Question: Which of the following techniques are used to scale a system of microservices?
Question: True or False: In a microservice system, each physical (or virtual) machine will host at least one copy of every microservice.
Question: Which of the following are advantages to a microservice based system?
Note: Make sure you select all of the correct options—there may be more than one!
Question: True or False: Microservices approaches often require organizational change to be successful.
Question: Which of the following are disadvantages to a microservice based system?
Note: Make sure you select all of the correct options—there may be more than one!
Question: True or False: When introducing microservices to your organization, the best way to overcome the shock is to introduce everything at the same time. That way the organization views it as a single change, rather than a bunch of changes, and they will be more likely to adopt it.
Responsibilities of Microservices Review
Question: The original Single Responsibility Principle, from Robert C. Martin states:
Question: Part of following the Single Responsibility Principle for microservices means:
Question: Determining where our microservice boundaries lie is a function of which aspect of Domain Driven Design:
Question: True or False: A microservice should never be smaller than a Bounded Context.
Decomposing the Monolith
Question: With this new approach, we are hoping to improve the isolation of our application. Recall that in the monolith, if we made a change to the Orders tables, then we had to edit not just the Orders Model, but also the Delivery Model.
Has this improved with the new structure?
Note: Make sure you select all of the correct options—there may be more than one!
If we alter the Orders Database, which portions of the system will need to change?
Question: In our old monolith, our database was experiencing contention when management was running reports. This contention was resulting in issues in other parts of the application.
Our hope is that the new design will alleviate this problem.
Note: Make sure you select all of the correct options—there may be more than one!
If management runs a complicated report on the Orders database, which other parts of the system could potentially be affected?
Question: By isolating our microservices so that they each have their own database, we are hoping that we will be free to evolve those databases without affecting other parts of the system.
In the old system, when we ran a database script on the Customer database, it ended up locking the delivery model as well. Have we improved this in the new system?
Note: Make sure you select all of the correct options—there may be more than one!
If we run a script that locks the customer tables, which areas of the system will be affected?
Question: In our monolithic application we were experiencing a lot of contention for disk in our database.
By moving to microservices, we are hoping to alleviate some of that contention. However, there are two possible ways this could be implemented.
– Multiple microservices may share a database instance but have their data isolated within that instance (separate schemas, keyspaces etc).
– Each microservice may have it’s own independent database instance running on independent hardware.
Note: Make sure you select all of the correct options—there may be more than one!
If our microservices shared a database instance, would we solve the contention problem?
If our microservices had completely independent databases, would we solve the contention problem?
Question: In order to reduce contention in the monolithic application, the development team introduced a cache layer. This cache layer would reduce the number of reads on the database and therefore improve performance. However, because there were other parts of the monolith that also used caching, this increase in the amount of cached data pushed the system beyond it’s current memory limits.
In our microservices application, we are hoping to have mitigated that issue.
Note: Make sure you select all of the correct options—there may be more than one!
Which of the following are valid approaches to alleviate the memory pressure in the microservices design?
Question: In our monolithic application, in order to display the delivery receipt, the client application would contact the delivery portion of the monolith and the appropriate information would be returned. This included the Customer address, and the Order details. This required one request and one response.
In the new microservices system, we have the additional burden of exposing the customers Loyalty information on top of the other pieces of information that were previously provided.
Note: Make sure you select all of the correct options—there may be more than one!
In our microservices system, how many requests are required to display the delivery information?
Principles of Isolation Review
Question: How big should a microservice be?
Question: Improving isolation provides benefits in:
Question: The Principles of Isolation include isolation of:
Note: Make sure you select all of the correct options—there may be more than one!
Question: Isolation of state means:
Question: Isolation of Space provides us with what benefits?
Question: True or False: Latency should not be a factor in where a microservice is deployed.
Question: If we send a request, and then block resources while we wait for a response, we are NOT isolated in:
Question: True or False: Strong Consistency (Total Consistency) limits scalability?
Question: Isolation of Failure means:
Monolithic Violations
Question: The monolithic system violates the Principle of Isolation of State.
In what way is the state of this system poorly isolated?
Question: The monolithic system violates the Principle of Isolation of Space.
In what way is this system poorly isolated in space?
Question: The monolithic system violates the Principle of Isolation of Time.
In what way is this system poorly isolated in time?
Question: The monolithic system violates the Principle of Isolation of Failure.
In what way is this system poorly isolated in failure?
Question: We moved to a microservice system in order to improve Isolation of State.
Note: Make sure you select all of the correct options—there may be more than one!
In what way has it improved?
It what way could it still be improved?
Question: We moved to a microservice system in order to improve Isolation of Space.
Note: Make sure you select all of the correct options—there may be more than one!
In what way has it improved?
It what way could it still be improved?
Question: We moved to a microservice system in order to improve Isolation of Time.
Note: Make sure you select all of the correct options—there may be more than one!
In what way has it improved?
It what way could it still be improved?
Question: We moved to a microservice system in order to improve Isolation of Failure.
Note: Make sure you select all of the correct options—there may be more than one!
In what way has it improved?
It what way could it still be improved?
Bulkheading Review
Question: A bulkhead on a ship is used to:
Question: In software, bulkheading is used to:
Question: True or False: If an application is operating in a degraded state, then it has not been properly bulkheaded.
Question: True or False: A properly bulkheaded system will prevent scenarios where a failure of one microservice cascades into other services.
Circuit Breakers Review
Question: True or False: Circuit Breaker is originally a plumbing term.
Question: Retries are problematic in an overloaded system because:
Question: True or False: If a call does not include retries, then a circuit breaker is unnecessary.
Question: Which state is a circuit breaker in during normal operation?
Question: When a circuit breaker is in the Open state, it’s behaviour is:
Question: A circuit breaker in a Half Open state will:
Question: In the Half Open state, if another failure is encountered the circuit breaker will go to which state?
Question: When a circuit breaker is Half Open, if a request is successful it will transition to which state?
Question: True or False: Akka and Lagom feature support for circuit breakers.
Message Driven Architecture Review
Question: A Reactive System is built on a foundation of:
Question: True or False: In a Reactive, message driven system, services will send messages between each other. It is critical in that case that the receiving service reply back to the sending service immediately so that we can ensure all messages have been received.
Question: Synchronous, blocking messages reduce productivity by:
Question: When a response to a message is expected to come synchronously, if the receiver is unavailable we must:
Question: Which of the following benefits do we gain by using Asynchronous, Non-Blocking Messages
Note: Make sure you select all of the correct options—there may be more than one!
Autonomy Review
Question: Autonomy in a Reactive System means:
Question: Which of the following things can a microservice guarantee?
Note: Make sure you select all of the correct options—there may be more than one!
Question: True or False: Isolation increases dependencies.
Question: True or False: Fewer dependencies means more autonomy.
Question: To make a service autonomous we need to ensure:
Question: When a dependency exists on data from an external service, we can add autonomy by:
Question: True or False: A fully autonomous system could be scaled indefinitely (assuming enough resources were available).
Question: True or False: A fully autonomous service can continue to operate, even if it is the only part of the system still running.
Question: Synchronous Messages
Gateway Services Review
Question: True or False: Microservice based systems are inherently less complex than monolithic systems.
Question: Monolithic applications typically aggregate data by:
Question: In the absence of a gateway service, when data needs to be aggregated from multiple microservices, a client will typically:
Question: Increasing the complexity of a client (eg. Android app, iPhone app) is problematic because:
Question: A gateway service is:
Question: True or False: A Gateway Service is always tied to a particular area (eg. bounded context) of the domain.
Question: True or False: Gateway Services increase isolation in the system.
Reactive Microservices
Question: True or false: Introducing microservices has given us a form of bulkheading since each microservice can act as a potential failure zone.
Question: By moving to microservices, we have introduced complexity into the client application. The client application now has to know about the Order, Customer, and Loyalty Services. It has to send requests to each, and aggregate the results. It also has to deal with possible failures in each service.
We could mitigate this by introducing:
Question: Our client application handles timeouts by sending a retry. Even in the absence of retries, if users experience slow response times, they have a tendency to try refreshing a page or application. This results in additional load on an already overloaded application.
We can mitigate this by introducing:
Question: True or False: A circuit breaker is only valuable between the client and the microservices. It would not be helpful to add one between the microservice and it’s database.
Question: Having an eventually consistent cache of the delivery data in the driver’s app would be unacceptable because:
Question: A delivery driver has arrived at the customers door, and the customer has presented a loyalty card. The driver attempts to enter the loyalty information into the system with their mobile device, but the system is unresponsive.
To mitigate this problem we could:
In our experience, we suggest you enroll in Reactive Architecture: Reactive Microservices courses and gain some new skills from Professionals completely free and we assure you will be worth it.
Reactive Architecture: Reactive Microservices course is available on Cognitive Class for free, if you are stuck anywhere between a quiz or a graded assessment quiz, just visit Queslers to get Reactive Architecture: Reactive Microservices Quiz Answers.
I hope this Reactive Architecture: Reactive Microservices Quiz Answers would be useful for you to learn something new from this Course. If it helped you then don’t forget to bookmark our site for more Quiz Answers.
This course is intended for audiences of all experiences who are interested in learning about new skills in a business context; there are no prerequisite courses.
Keep Learning!
Explore More Solutions on Queslers >>