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
- Title Page
- Copyright and Credits
- Dedication
- About Packt
- Contributors
- Preface
-
1. Software Architecture Patterns
- The monolithic architecture pattern
- Monolithic application example
- Benefits of monolithic application architecture
- When to use monolithic architecture
- Limitations of monolithic application architecture
- Software development processes with monolithic architecture
- Microservice architecture pattern
- Microservice application example
- Benefits of microservice application architecture
- Disadvantages of the microservice architecture pattern
- When to use microservice architecture
- Service-oriented architecture (SOA)
- SOA versus microservice architecture
- Summary
- 2. Anatomy of Microservice Decomposition Services
-
3. Microservices Deployment Patterns
- Microservices deployment
- Multiple instances of microservices per host
- A single instance of a microservice per host
- Benefits
- Drawbacks
- A single instance of a microservice per VM
- Benefits
- Drawbacks
- A single instance of microservice per container
- Benefits
- Drawbacks
- Service deployment platforms
- Serverless deployment
- Summary
-
4. Inter-Service Communication
- Approaches to service communication
- Synchronous communication
- REST
- Benefits of REST
- Google Remote Procedure Calls
- Apache Thrift
- Asynchronous communication
- Messaging
- Benefits of messaging
- Drawbacks of messaging
- Transactional messaging
- One-to-one service communication
- One-to-many service communication
- Event-based communication
- The Command Query Responsibility Segregation pattern
- The Event Sourcing Model pattern
- Benefits
- The Eventual Consistency pattern
- Domain-specific protocol
- Summary
-
5. Service Registry and Discovery
- Technical Requirements
- The need for service discovery in microservice architecture
- Service discovery patterns
- The client-side discovery pattern
- The server-side discovery pattern
- Microservice registry and discovery with Eureka
- Implementing Service Registry with Eureka
- Implementing the Eureka Discovery server
- Summary
-
6. External API Gateway
- Technical Requirements
- Introducing an API gateway
- Client-to-microservice communication
- Drawbacks
- Using an API gateway
- Benefits
- Drawbacks
- Building an API gateway
- API gateway performance and scalability
- Building an API gateway using a reactive programming model
- API gateway and service invocation mechanism support
- API gateway and service discovery
- Handling partial failures
- Building an API gateway using Spring Cloud's Netflix Zuul proxy
- MuleSoft
- Summary
-
7. Testing of Microservices
- Technical Requirements
- Testing strategies for microservices
- The testing pyramid strategy
- The testing honeycomb strategy
- Unit testing
- Unit testing – an example
- Integration testing
- Database integration testing – an example
- REST API integration – an example
- Component testing
- Contract testing
- End-to-end testing
- UI/functional testing
- Summary
-
8. Performance Testing of Microservices
- Technical Requirements
- JMeter
- Installing JMeter
- Performance testing microservices with JMeter
- Creating a performance test plan
- Gatling
- Installing Gatling
- Performance testing with Gatling
- Maven plugin configuration
- Gradle plugin configuration
- Running a Gatling test suite using the Gatling GUI
- The ReadyAPI
- Summary
-
9. Performance Monitoring of Microservices
- Identifying performance counters to test microservices
- Performance monitoring tools
- AppDynamics
- Dynatrace
- AWS CloudWatch
- Nagios
- New Relic
- Datadog (for Docker performance monitoring)
- Component-level monitoring
- Domain-specific monitoring
- Dashboards and identifying issues by going through logs
- Grafana
- Summary
- Other Books You May Enjoy
Product information
- Title: Hands-On Microservices - Monitoring and Testing
- Author(s):
- Release date: October 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789133608
You might also like
book
Monitoring Microservices and Containerized Applications: Deployment, Configuration, and Best Practices for Prometheus and Alert Manager
Discover the methodologies and best practices for getting started with container services monitoring using Prometheus, AppDynamics, …
book
Microservices Security in Action
Unlike traditional enterprise applications, Microservices applications are collections of independent components that function as a system. …
book
Microservices: Up and Running
Microservices architectures offer faster change speeds, better scalability, and cleaner, evolvable system designs. But implementing your …
book
Datadog Cloud Monitoring Quick Start Guide
A comprehensive guide to rolling out Datadog to monitor infrastructure and applications running in both cloud …