Chapter 9 - Microservices
48 Questions
15 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is a fundamental scaling strategy for monolithic applications?

  • Decomposing into microservices
  • Implementing a service-oriented architecture
  • Scaling up on a single powerful server (correct)
  • Horizontal scaling using multiple servers
  • Which of the following is a disadvantage commonly associated with monolithic architectures as application features grow?

  • Complexity in testing
  • Increased deployment time
  • Single point of failure
  • Difficulty in independent scaling (correct)
  • In a microservices architecture, what does each microservice encapsulate?

  • A shared resource pool for efficiency
  • An API for communications with the server
  • Common data storage for all services
  • Its own data storage where needed (correct)
  • What methodology is suggested for identifying microservices?

    <p>Domain-driven design (DDD)</p> Signup and view all the answers

    What is a key advantage of using a microservices architecture as systems grow?

    <p>Ability to independently scale each microservice</p> Signup and view all the answers

    How can multiple copies of a monolithic application be scaled out?

    <p>Using a load balancer to distribute requests</p> Signup and view all the answers

    What aspect of microservices helps address the challenges faced by monoliths during significant request volume increases?

    <p>Independent service management</p> Signup and view all the answers

    What is a requirement for load balancers when managing stateful services in a microservices architecture?

    <p>Maintaining session affinity</p> Signup and view all the answers

    What must be balanced when designing microservice-based applications?

    <p>Purity of the domain model and costs of distributed communications</p> Signup and view all the answers

    Which scenario may lead to merging microservices?

    <p>Requests involving excessive communications and latency</p> Signup and view all the answers

    What is a common method to improve local data access in microservices?

    <p>Duplicating data across coupled microservices</p> Signup and view all the answers

    What is a potential downside of duplicating data across microservices?

    <p>Additional storage capacity and development effort</p> Signup and view all the answers

    Why might periodic duplication of data be considered in microservice architecture?

    <p>To minimize immediate data inconsistencies without extra overhead</p> Signup and view all the answers

    Which approach is essential for deploying microservices effectively?

    <p>Facilitating easy and rapid deployment of new microservice versions</p> Signup and view all the answers

    Which aspect of microservices does continuous deployment influence?

    <p>The ease of scalability for microservices</p> Signup and view all the answers

    What condition could justify the complexity of maintaining duplicated data in microservices?

    <p>When performance and scalability demands grow substantially</p> Signup and view all the answers

    What happens when microservice C becomes overloaded?

    <p>Response times increase significantly.</p> Signup and view all the answers

    Which issue can cause microservice A's threads to be blocked?

    <p>High volume of requests to B.</p> Signup and view all the answers

    What is a consequence of TCP requests timing out?

    <p>Errors are thrown to the caller.</p> Signup and view all the answers

    What often exacerbates overload situations in microservices?

    <p>Clients retrying operations immediately upon failure.</p> Signup and view all the answers

    What may happen if the overloaded microservice continues to receive requests?

    <p>Response times may continue to grow.</p> Signup and view all the answers

    What does the call pattern during overload situations often lead to?

    <p>Cascading failures and blocked threads.</p> Signup and view all the answers

    What can cause hidden bugs to surface in a microservice?

    <p>Increased load and resource exhaustion.</p> Signup and view all the answers

    What typically characterizes the nature of cascading failures in microservices?

    <p>They occur due to slow response times of dependent services.</p> Signup and view all the answers

    What is a primary advantage of using serverless platforms for deploying microservices?

    <p>Ability to scale automatically based on demand</p> Signup and view all the answers

    Which pattern is recommended to avoid exposing backend API changes to clients?

    <p>API gateway pattern</p> Signup and view all the answers

    What potential issue can arise under heavy request spikes when using an API gateway?

    <p>The API gateway may become a bottleneck</p> Signup and view all the answers

    What is an essential function of an API gateway in a microservices architecture?

    <p>To unify client request routing</p> Signup and view all the answers

    How does the API gateway pattern relate to the facade pattern in object-oriented systems?

    <p>Both simplify client interactions by hiding complexity</p> Signup and view all the answers

    Which of the following is NOT a functionality typically associated with API gateways?

    <p>Database schema management</p> Signup and view all the answers

    What challenge do multiple endpoints present when deploying microservices on a serverless platform?

    <p>Clients need to manage host IP addresses and ports</p> Signup and view all the answers

    Which of the following statements is true regarding the potential need to refactor microservices?

    <p>Refactoring can merge services to reduce network calls</p> Signup and view all the answers

    What is the primary purpose of bulkheads in a microservice architecture?

    <p>To limit damage of resource starvation</p> Signup and view all the answers

    In the described microservice, which type of request is typically more demanding on the system?

    <p>New order requests</p> Signup and view all the answers

    How many threads can be reserved for new order requests in the bulkhead example?

    <p>150</p> Signup and view all the answers

    What problem arises when a surge of new order requests occurs in a microservice without a bulkhead pattern?

    <p>Starvation of status requests</p> Signup and view all the answers

    Which Java library provides a bulkhead pattern implementation using Java 8 functional programming features?

    <p>Resilience4j</p> Signup and view all the answers

    What happens to status requests when all threads in the thread pool are occupied by new order requests?

    <p>They may see unacceptable response times</p> Signup and view all the answers

    What is the main function of the thread pool in the microservice?

    <p>To handle concurrent requests</p> Signup and view all the answers

    What could be a potential consequence of using a fail-fast approach in the microservice?

    <p>Client exceptions when resources are not available</p> Signup and view all the answers

    Which book provides a comprehensive introduction to Continuous Delivery?

    <p>Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation</p> Signup and view all the answers

    What is the primary focus of Part III of the referenced book?

    <p>Storage layer principles and algorithms</p> Signup and view all the answers

    Which of the following statements is true regarding DevOps?

    <p>It encompasses various platforms for build, configuration, and testing.</p> Signup and view all the answers

    Who emphasizes the advantages of standardizing the development stack across microservices?

    <p>Susan Fowler</p> Signup and view all the answers

    What should be considered when interpreting performance benchmark results from API gateways?

    <p>The studies are performed by vendors, implying potential bias.</p> Signup and view all the answers

    Which database focuses are discussed regarding distributed systems?

    <p>Scalability, availability, and consistency</p> Signup and view all the answers

    What is an essential resource for finding current information about DevOps tools?

    <p>Your favorite search engine</p> Signup and view all the answers

    Which book was published in 1994 and focuses on design patterns?

    <p>Design Patterns: Elements of Reusable Object-Oriented Software</p> Signup and view all the answers

    Study Notes

    Microservices and Pizza

    • Microservices are a software architectural style linked to pizza's popularity.
    • The "two-pizza rule" at Amazon established a limit on team size for managing a single system component, becoming a microservice.

    Defining Microservices

    • Microservices are finely-grained, highly cohesive, and loosely coupled services focused on a business capability, not necessarily smaller than a service.
    • They are independently deployed and must communicate to handle requests, making them distributed systems.
    • Microservices deal with issues like scalability, performance, and availability.

    Advantages of Microservices

    • Microservices enable quick iteration and feature evolution by agile teams.
    • Each microservice acts as a black box, allowing technology choices optimized for the team and application.
    • New system functionalities are easily built as microservices without impacting other parts of the system.

    Monolithic Applications

    • Traditional applications are monolithic, with all modules, services, and capabilities contained in a single application.
    • They are easily understood, offer extensive automation in frameworks, and straightforward deployment & management.

    Scaling Monoliths

    • Scaling up involves improving processing power on a single server for better responsiveness.
    • Scaling out involves distributing requests to multiple copies of the application, using load balancers for efficient handling of increasing traffic.

    Monolithic Disadvantages

    • Complexity increases with application size, requiring significant engineering and refactoring efforts
    • Challenges occur in maintaining architectural integrity
    • Scaling out leads to replicating the entire application, making it complex.

    Breaking Up the Monolith

    • Microservices architecture separates application functionality into independent services.
    • Each service communicates when necessary and contains its own data storage or handles data retrieval independently.
    • This allows for independent scaling of individual components.

    Microservice Advantages

    • Smaller, manageable codebases which are easier to build, test, and debug that individual development teams can handle.
    • They allow for easier scaling and response-times, using separate instances of microservices to accommodate increasing demands
    • Different technologies can be used to develop individual microservices given their functions and use cases
    • Faster updates and deployment as teams can make changes without affecting other parts of the application.

    Deploying Microservices

    • Serverless platforms (e.g., cloud computing services) offer a simpler deployment process for microservices since microservices packages are uploaded to function environments.
    • Deploying microservices allows for reduced costs incurred in handling low-volume requests.
    • Deployment also increases scalability, since the platform handles scaling issues automatically when a program is deployed to a serverless platform.

    API Gateways

    • API gateways act as a central entry point for all client requests, insulating clients from the underlying service implementations.
    • This allows decoupling client interactions from changes in the internal service architecture.
    • They offer valuable capabilities such as rate limiting, authentication, and authorization.

    Isolating Failure

    • Microservices should be independently deployable such that if a component fails, it will not affect the entire application.
    • Microservices are designed such that the failure of one microservice should not affect other microservices

    Circuit Breaker Pattern

    • The circuit breaker pattern isolates failures by stopping requests from failing microservices, and providing a predetermined amount of time for a service to recover.
    • Transient errors or temporary service outages are handled by the circuit breaker pattern.

    Bulkhead Pattern

    • The bulkhead pattern assigns specific requests to isolated components to prevent failures in one component from affecting others, when high demand is encountered/experienced.

    Microservice Principles

    • Modeled around business domains (DDD).
    • Highly observable (monitoring).
    • Hide implementation details (APIs).
    • Decentralize all components.
    • Isolate failure.
    • Deploy independently.
    • Culture of automation.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Chapter 9. Microservices PDF

    Description

    Test your knowledge on microservices and their comparison to traditional monolithic applications. Explore concepts like the two-pizza rule, advantages of microservices, and their role in scalability and performance. Discover how microservices can enhance agile development teams.

    More Like This

    Use Quizgecko on...
    Browser
    Browser