1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
1. What is a microservice?
1. A small-scale, stateless software component that is completely independent and which implements a single business function.
2. List five characteristics of microservices.
2. Self-contained, lightweight, Implementation-independent, independently deployable, business-oriented.
3. What is coupling and why is it important in a microservices architecture?
3. Coupling is a measure of the number of relationships between components. To be independent, components should have a low coupling.
4. What is the single responsibility principle?
4. Each element in a system should do one thing and should do it well.
5. Explain what is meant by the 'rule of twos'.
5. It should be possible for a microservice to be developed in two weeks; a microservice development team should be sufficiently small that it can be fed using two large pizzas.
6. What support code is needed in a microservice?
6. Message management code, failure management code, UI implementation code, data consistency management code.
7. What fundamental problems are addressed by the microservices architecture style?
7. Only those parts of a system that have been changed need to be re-tested and redeployed; it is not necessary to scale the whole system when the demand on parts of the system increases.
8. List 3 key design questions that should be addressed when designing a microservices architecture.
8. Any three from: what are the microservices that make up the system; how should microservices communicate; how should service failure be detected and managed; how should microservices be coordinated; how should data be distributed and shared.
9. What are four general design guidelines that support the decomposition of a system into microservices.
9. Balance fine-grain functionality and system performance; follow the common closure principle; associate services with business capabilities; design services so that they only access the data that they need.
10. What is the difference between synchronous and asynchronous microservices interaction?
10. Synchronous interaction: a microservice makes a request to another service and waits for its reply; asynchronous interaction: when a service request is made, the requesting service continues processing and does not wait for a reply.
11. Explain what is meant by indirect service communication.
11. Indirect services communication means that a requesting service does not request the service using its address (URI) but rather requests the service by name. A service broker is responsible for passing the service request to the named service and returning a reply to the requesting service.
12. Explain what is meant by replica inconsistency.
12. Replica inconsistency means that different instances of the same service have inconsistent databases.
13. What is a compensating transaction and when are compensating transactions used.
13. A compensating transaction is a transaction that reverses a previous operation. They are used when one of the services in an interaction fails after other services have changed their database to restore consistency.
14. What is eventual consistency?
14. Eventual consistency means that it is guaranteed that all of the databases in replica services will eventually become consistent.
15. Explain the difference between orchestration and choreography.
15. In an orchestrated system, there is a single service controller that is responsible for managing service interactions; in a choreographed system, there is no central controller and each service emits events to indicate it is finished processing. Services that need to coordinate, watch for these events and react when they are observed.
16. List three possible failure types in a microservices architecture.
16. Internal service failure, external service failure, service performance failure.
17. How does a circuit breaker work?
17. Service requests are routed through the circuit breaker that monitors requested services to check they are available. If a service is unavailable, the service request is rejected immediately without the need for the requesting services to wait to see if the request has been processed.
18. In the RESTful style, what is a resource?
18. A resource is a uniquely addressed information item that this accessed through its URI.
19. What are the four fundamental RESTful service operations and how do they map to HTTP verbs?
19. Create (HTTP POST), Read (HTTP GET), Update (HTTP PUT), Delete (HTTP DELETE).
20. Why should you use versioned services in a microservices architecture?
20. Versioned services should be used so that, in the event of a service failure after an update, requests can be routed to a previous version of the service; they also allow services that rely on features of an older service version to continue operation until they are updated.