0%

Book Description

Learn and implement various techniques related to testing, monitoring and optimization for microservices architecture.

Key Features

  • Learn different approaches for testing microservices to design and implement, robust and secure applications
  • Become more efficient while working with microservices
  • Explore Testing and Monitoring tools such as JMeter, Ready API,and AppDynamics

Book Description

Microservices are the latest "right" way of developing web applications. Microservices architecture has been gaining momentum over the past few years, but once you've started down the microservices path, you need to test and optimize the services. This book focuses on exploring various testing, monitoring, and optimization techniques for microservices.

The book starts with the evolution of software architecture style, from monolithic to virtualized, to microservices architecture. Then you will explore methods to deploy microservices and various implementation patterns. With the help of a real-world example, you will understand how external APIs help product developers to focus on core competencies.

After that, you will learn testing techniques, such as Unit Testing, Integration Testing, Functional Testing, and Load Testing. Next, you will explore performance testing tools, such as JMeter, and Gatling. Then, we deep dive into monitoring techniques and learn performance benchmarking of the various architectural components. For this, you will explore monitoring tools such as Appdynamics, Dynatrace, AWS CloudWatch, and Nagios.

Finally, you will learn to identify, address, and report various performance issues related to microservices.

What you will learn

  • Understand the architecture of microservices and how to build services
  • Establish how external APIs help to accelerate the development process
  • Understand testing techniques, such as unit testing, integration testing, end-to-end testing, and UI/functional testing
  • Explore various tools related to the performance testing, monitoring, and optimization of microservices
  • Design strategies for performance testing
  • Identify performance issues and fine-tune performance

Who this book is for

This book is for developers who are involved with microservices architecture to develop robust and secure applications. Basic knowledge of microservices is essential in order to get the most out of this book.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Microservices – Monitoring and Testing
  3. Dedication
  4. Packt Upsell
    1. Why subscribe?
    2. Packt.com
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Code in action
      3. Conventions used
    4. Get in touch
      1. Reviews
  7. Software Architecture Patterns
    1. The monolithic architecture pattern
      1. Monolithic application example
      2. Benefits of monolithic application architecture
      3. When to use monolithic architecture
      4. Limitations of monolithic application architecture
      5. Software development processes with monolithic architecture
    2. Microservice architecture pattern
      1. Microservice application example
      2. Benefits of microservice application architecture
      3. Disadvantages of the microservice architecture pattern
      4. When to use microservice architecture
    3. Service-oriented architecture (SOA)
    4. SOA versus microservice architecture
    5. Summary
  8. Anatomy of Microservice Decomposition Services
    1. Anatomy of a microservice
      1. Context boundaries
    2. Decomposition based on business capability
    3. Decomposition on the basis of domain
    4. Microservice chassis to handle cross-cutting concerns
    5. Building microservices
    6. SOAP versus RESTful microservices
    7. Summary
  9. Microservices Deployment Patterns
    1. Microservices deployment
      1. Multiple instances of microservices per host
      2. A single instance of a microservice per host 
        1. Benefits
        2. Drawbacks
      3. A single instance of a microservice per VM
        1. Benefits
        2. Drawbacks
      4. A single instance of microservice per container
        1. Benefits
        2. Drawbacks
    2. Service deployment platforms
    3. Serverless deployment
    4. Summary
  10. Inter-Service Communication
    1. Approaches to service communication
      1. Synchronous communication
        1. REST
          1. Benefits of REST
        2. Google Remote Procedure Calls
        3. Apache Thrift
      2. Asynchronous communication
      3. Messaging
        1. Benefits of messaging
        2. Drawbacks of messaging
      4. Transactional messaging
        1. One-to-one service communication
        2. One-to-many service communication
    2. Event-based communication
      1. The Command Query Responsibility Segregation pattern
      2. The Event Sourcing Model pattern
        1. Benefits
      3. The Eventual Consistency pattern
    3. Domain-specific protocol
    4. Summary
  11. Service Registry and Discovery
    1. Technical Requirements
    2. The need for service discovery in microservice architecture
    3. Service discovery patterns
      1. The client-side discovery pattern
      2. The server-side discovery pattern
    4. Microservice registry and discovery with Eureka
      1. Implementing Service Registry with Eureka
      2. Implementing the Eureka Discovery server
    5. Summary
  12. External API Gateway
    1. Technical Requirements
    2. Introducing an API gateway
    3. Client-to-microservice communication
      1. Drawbacks
    4. Using an API gateway
      1. Benefits
      2. Drawbacks
    5. Building an API gateway
      1. API gateway performance and scalability
      2. Building an API gateway using a reactive programming model
      3. API gateway and service invocation mechanism support
      4. API gateway and service discovery
      5. Handling partial failures
    6. Building an API gateway using Spring Cloud's Netflix Zuul proxy
    7. MuleSoft
    8. Summary
  13. Testing of Microservices
    1. Technical Requirements
    2. Testing strategies for microservices
      1. The testing pyramid strategy
      2. The testing honeycomb strategy
    3. Unit testing
      1. Unit testing – an example
    4. Integration testing
      1. Database integration testing – an example
      2. REST API integration – an example
    5. Component testing
    6. Contract testing
    7. End-to-end testing
    8. UI/functional testing
    9. Summary
  14. Performance Testing of Microservices
    1. Technical Requirements
    2. JMeter
      1. Installing JMeter
      2. Performance testing microservices with JMeter
      3. Creating a performance test plan
    3. Gatling
      1. Installing Gatling
      2. Performance testing with Gatling
        1. Maven plugin configuration
        2. Gradle plugin configuration
        3. Running a Gatling test suite using the Gatling GUI
    4. The ReadyAPI
    5. Summary
  15. Performance Monitoring of Microservices
    1. Identifying performance counters to test microservices
    2. Performance monitoring tools
      1. AppDynamics
      2. Dynatrace
      3. AWS CloudWatch
      4. Nagios
      5. New Relic
      6. Datadog (for Docker performance monitoring)
    3. Component-level monitoring
    4. Domain-specific monitoring
    5. Dashboards and identifying issues by going through logs
    6. Grafana
    7. Summary
  16. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
52.15.147.20