Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Service Mesh

You're reading from   Mastering Service Mesh Enhance, secure, and observe cloud-native applications with Istio, Linkerd, and Consul

Arrow left icon
Product type Paperback
Published in Mar 2020
Publisher Packt
ISBN-13 9781789615791
Length 626 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Vikram Khatri Vikram Khatri
Author Profile Icon Vikram Khatri
Vikram Khatri
Anjali Khatri Anjali Khatri
Author Profile Icon Anjali Khatri
Anjali Khatri
Arrow right icon
View More author details
Toc

Table of Contents (31) Chapters Close

Preface 1. Section 1: Cloud-Native Application Management
2. Monolithic Versus Microservices FREE CHAPTER 3. Cloud-Native Applications 4. Section 2: Architecture
5. Service Mesh Architecture 6. Service Mesh Providers 7. Service Mesh Interface and SPIFFE 8. Section 3: Building a Kubernetes Environment
9. Building Your Own Kubernetes Environment 10. Section 4: Learning about Istio through Examples
11. Understanding the Istio Service Mesh 12. Installing a Demo Application 13. Installing Istio 14. Exploring Istio Traffic Management Capabilities 15. Exploring Istio Security Features 16. Enabling Istio Policy Controls 17. Exploring Istio Telemetry Features 18. Section 5: Learning about Linkerd through Examples
19. Understanding the Linkerd Service Mesh 20. Installing Linkerd 21. Exploring the Reliability Features of Linkerd 22. Exploring the Security Features of Linkerd 23. Exploring the Observability Features of Linkerd 24. Section 6: Learning about Consul through Examples
25. Understanding the Consul Service Mesh 26. Installing Consul 27. Exploring the Service Discovery Features of Consul 28. Exploring Traffic Management in Consul 29. Assessment 30. Other Books You May Enjoy

Monolithic applications

The application evolution journey from monolithic to microservices can be seen in the following diagram:

Monolithic applications were created from small applications and then built up to create a tiered architecture that separated the frontend from the backend, and the backend from the data sources. In this architecture, the frontend manages user interaction, the middle tier manages the business logic, and the backend manages data access. This can be seen in the following diagram:

In the preceding diagram, the middle tier, also known as the business logic, is tightly bound to the frontend and the backend. This is a one-dimensional monolithic experience where all the tiers are in one straight line.

The three-tier modular architecture of the client-server, consisting of a frontend tier, an application tier, and a database tier, is almost 20+ years old now. It served its purpose of allowing people to build complex enterprise applications with known limitations regarding complexity, software upgrades, and zero downtime.

A large development team commits its code to a source code repository such as GitHub. The deployment process from code commits to production used to be manual before the CICD pipeline came into existence. The releases needed to be manually tested, although there were some automated test cases. Organizations used to declare a code freeze while moving the code into production. The application became overly large, complex, and very difficult to maintain in the long term. When the original code developers were no longer available, it became very difficult and time-consuming to add enhancements.

To overcome the aforementioned limitations, the concept of SOA started to evolve around 2002 onward and the Enterprise Service Bus (ESB) evolved to establish a communication link between different applications in SOA.

Brief history of SOA and ESB

The one-dimensional model of the three-tier architecture was split into a multi-dimensional SOA, where inter-service communication was enabled through ESB using the Simple Object Access Protocol (SOAP) and other web services standards.

SOA, along with ESB, could be used to break down a large three-tier application into services, where applications were built using these reusable services. The services could be dynamically discovered using service metadata through a metadata repository. With SOA, each functionality is built as a coarse-grained service that's often deployed inside an application server.

Multiple services need to be integrated to create composite services that are exposed through the ESB layer, which becomes a centralized bus for communication. This can be seen in the following diagram:

The preceding diagram shows the consumer and provider model connected through the ESB. The ESB also contains significant business logic, making it a monolithic entity where the same runtime is shared by developers in order to develop or deploy their service integrations.

In the next section, we'll talk about API gateways. The concept of the API gateway evolved around 2008 with the advent of smartphones, which provide rich client applications that need easy and secure connectivity to the backend services.

API Gateway

The SOA/web services were not ideal for exposing business functionality as APIs. This was due to the complex nature of web service-related technologies in which SOAP is used as a message format for service-to-service communication. SOAP was also used for securing web services and service-to-service communication, as well as for defining service discovery metadata. SOAP lacked a self-service model, which hindered the development of an ecosystem around it.

We use application programming interface (API), as a term, to expose a service over REST (HTTP/JSON) or a web service (SOAP/HTTP). An API gateway was typically built on top of existing SOA/ESB implementations for APIs that could be used to expose business functionality securely as a managed service. This can be seen in the following diagram:

In the preceding diagram, the API gateway is used to expose the three-tier and SOA/ESB-based services in which the business logic contained in the ESB still hinders the development of the independent services.

With containerization availability, the new paradigm of microservices started to evolve from the SOA/ESB architecture in 2012 and seriously took off in 2015.

Drawbacks of monolithic applications

Monolithic applications are simple to develop, deploy, and scale as long as they are small in nature.

As the size and complexity of monoliths grow, various disadvantages arise, such as the following:

  • Development is slow.
  • Large monolithic code bases intimidate new developers.
  • The application is difficult to understand and modify.
  • Software releases are painful and occur infrequently.
  • Overloaded IDE, web container.
  • Continuous deployment is difficult – Code Freeze period to deploy.
  • Scaling the application can be difficult due to an increase in data volume.
  • Scaling development can be difficult.
  • Requires long-term commitment to a technology stack.
  • Lack of reliability due to difficulty in testing the application thoroughly.

Enterprise application development is coordinated among many smaller teams that can work independently of each other. As an application grows in size, the aforementioned complexities lead to them looking for better approaches, resulting in the adoption of microservices.

You have been reading a chapter from
Mastering Service Mesh
Published in: Mar 2020
Publisher: Packt
ISBN-13: 9781789615791
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime