Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Hands-On Microservices ??? Monitoring and Testing
Hands-On Microservices ??? Monitoring and Testing

Hands-On Microservices ??? Monitoring and Testing: A performance engineer's guide to the continuous testing and monitoring of microservices

eBook
€13.98 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Microservices ??? Monitoring and Testing

Anatomy of Microservice Decomposition Services

In Chapter 1, Software Architecture Patterns, we discussed the microservice architecture and its benefits and challenges. The microservice architecture approach is all about dividing a complex monolithic application into several different independent services, which run independently on several machines or cloud servers. In this chapter, we will discuss the anatomy of the microservice architecture and look at how to decompose a monolithic application into a number of processes.

This chapter will discuss microservices in detail, including how to use applications and services. We will also look at the decomposition of the microservice architecture on the basis of business capability and the domain and subdomain.

By the end of this chapter, you will understand how microservices are built and will be able to build your own. You will also...

Anatomy of a microservice

One of the biggest challenges in using a microservice architecture is deciding how to break an existing, complex monolithic system into several services. A microservice architecture structures a complex system into more manageable, separate services, each of which focuses on a specific part of your business goal.

As we know, managing complex monolithic applications is much harder than managing a small service, for developers as well as Quality Assurance (QA) teams. A potential method of reducing the complexity of a monolithic application is by using a distributed application development approach, which refers to the decomposition of a monolithic application into several smaller microservices. It is important to consider how microservices can be made to achieve the same business goal as the original monolithic application. Microservices provide a perfect...

Decomposition based on business capability

Business capability refers to structured modeling, which provides a high-level overview of the business. Business capabilities are the top layer of the business architecture and belong to the business domain. We can split a monolithic application into services based on their business capabilities. These services have broad context boundaries, including user interface, persistent storage, and any external collaborations. Consequently, the teams are cross-functional and include the full range of skills required for the development: user experience, database, and project management.

A business capability refers to how a business architecture model behaves in order to achieve a business goal. A business capability is similar to a business object. Let's define the services of our application based on its business capabilities:

  • Customer...

Decomposition on the basis of domain

You can also split a monolithic application into a microservice-based application based on its domain. The domain decomposition methods focus on a bounded context, which is a central pattern of Domain-Driven Design (DDD). Domain decomposition methods split a domain into subdomains. You can define services that correspond to the subdomains of the DDD, as shown in the following diagram:

The preceding diagram shows a decomposition based on subdomains. Each subdomain has a corresponding service. Subdomains can be classified according to business processes. For example, as you can see in the preceding diagram, we have decomposed the online bookshop application into the following subdomains:

  • Customer Account Management
  • Book Inventory Management
  • Order Management
  • Shipping Management

The main challenge of this approach lies in identifying the subdomains...

Microservice chassis to handle cross-cutting concerns

In any new application development, you are often required to implement particular scenarios or services, such as cross-cutting concerns. You have to spend a significant amount of time implementing common cross-cutting concerns in the development of a new application. Let's have a look at the following cross-cutting concerns:

  • Build system and externalized configuration: We have to choose either a Maven or a Gradle-based system to compile, package, version, and resolve external dependencies. This will also deal with further external configurations, such as credentials, and the network locations of external services, including databases or message brokers.
  • Implement logging: Logging is also required for all services of a new application development. You have to configure a logging framework, such as Java, Log4j, Logj42...

Building microservices

In this section, we will discuss how to build a microservice-based application using the same online bookshop example as in the previous sections. Our application has the following four modules:

  • Customer Account Management
  • Order Management
  • Book Inventory Management
  • Shipping Management

I will create a microservice for each of these modules. The following microservices correspond to the application modules:

  • Customer Account Management → Account Service
  • Order Management → Order Service
  • Book Inventory Management → Book Service
  • Shipping Management → Shipping Service

The following diagram shows the architecture of this online bookshop application:

As you can see in the preceding diagram, we have four core microservices in this application. This architecture also has two more services: an API Gateway and the Shopfront UI web application...

SOAP versus RESTful microservices

SOAP and RESTful microservices have the following differences:

SOAP

RESTful microservices

An XML-based message protocol.

An architectural style.

Uses WSDL for communication between the consumer and the provider.

Use XML or JSON to send and receive data.

Invokes services by calling the RPC method.

Simply call services via the URL path.

The transfer is over HTTP. Also uses other protocols, such as SMTP or FTP.

The transfer is over HTTP only.

SOAP-based reads can't be cached.

RESTful microservice reads can be cached.

SOAP is not very scalable

RESTful microservices are very scalable.

SOAP is more suitable for enterprise systems and high-security systems, such as a banking system.

RESTful microservices are suitable for all types of systems apart from where high security and high reliability is critical...

Summary

In this chapter, we have discussed the decomposition of a monolithic application into a microservice-based architecture. You can decompose a monolithic application based on either its business capabilities or its domain. Business capabilities are the processes that are required for the business goal. In domain-based decomposition, we can use a bounded context, which is a central pattern for the DDD. In the DDD, we have to identify the domain's subdomains, each of which has a corresponding service in the application architecture.

We have built an online bookshop application with a microservice architecture. We have also discussed the differences between SOAP and RESTful microservices.

In Chapter 3, Microservices Deployment Patterns, we'll gain an understanding of how to deploy microservices and how these services communicate with each other in the architecture...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • 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

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.

Who is this book 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.

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

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 30, 2018
Length: 160 pages
Edition : 1st
Language : English
ISBN-13 : 9781789133608
Vendor :
Apache
Languages :
Concepts :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 30, 2018
Length: 160 pages
Edition : 1st
Language : English
ISBN-13 : 9781789133608
Vendor :
Apache
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 108.97
Hands-On Microservices ??? Monitoring and Testing
€24.99
Software Architect’s Handbook
€41.99
Microservices Development Cookbook
€41.99
Total 108.97 Stars icon

Table of Contents

10 Chapters
Software Architecture Patterns Chevron down icon Chevron up icon
Anatomy of Microservice Decomposition Services Chevron down icon Chevron up icon
Microservices Deployment Patterns Chevron down icon Chevron up icon
Inter-Service Communication Chevron down icon Chevron up icon
Service Registry and Discovery Chevron down icon Chevron up icon
External API Gateway Chevron down icon Chevron up icon
Testing of Microservices Chevron down icon Chevron up icon
Performance Testing of Microservices Chevron down icon Chevron up icon
Performance Monitoring of Microservices Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.7
(6 Ratings)
5 star 33.3%
4 star 0%
3 star 0%
2 star 33.3%
1 star 33.3%
Filter icon Filter
Most Recent

Filter reviews by




Bayr Mar 12, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
good
Subscriber review Packt
Yogesh Mehta Nov 19, 2022
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Writer has written limited things about AWS CloudWatch in the book who is selling on the platform of amazon itself
Amazon Verified review Amazon
Devesh Apr 27, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
It seems the content in the book is stiched together after being picked from many places. It takes only basic implementation examples of frameworks and brief description of tools. It totally "ignores" to pick complex examples and scenarios. Overall, its not a very thoughtful piece of work.
Amazon Verified review Amazon
ARJIT GAUTAM Oct 25, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very well written and provides you clear understanding.
Amazon Verified review Amazon
Amazon Customer Jun 27, 2019
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Expected better
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.