Skip to main content

2018 | Buch

Microservices for the Enterprise

Designing, Developing, and Deploying

insite
SUCHEN

Über dieses Buch

Understand the key challenges and solutions around building microservices in the enterprise application environment. This book provides a comprehensive understanding of microservices architectural principles and how to use microservices in real-world scenarios.
Architectural challenges using microservices with service integration and API management are presented and you learn how to eliminate the use of centralized integration products such as the enterprise service bus (ESB) through the use of composite/integration microservices. Concepts in the book are supported with use cases, and emphasis is put on the reality that most of you are implementing in a “brownfield” environment in which you must implement microservices alongside legacy applications with minimal disruption to your business.
Microservices for the Enterprise covers state-of-the-art techniques around microservices messaging, service development and description, service discovery, governance, and data management technologies and guides you through the microservices design process. Also included is the importance of organizing services as core versus atomic, composite versus integration, and API versus edge, and how such organization helps to eliminate the use of a central ESB and expose services through an API gateway.

What You'll LearnDesign and develop microservices architectures with confidence
Put into practice the most modern techniques around messaging technologies Apply the Service Mesh pattern to overcome inter-service communication challenges
Apply battle-tested microservices security patterns to address real-world scenarios
Handle API management, decentralized data management, and observability
Who This Book Is For
Developers and DevOps engineers responsible for implementing applications around a microservices architecture, and architects and analysts who are designing such systems


Inhaltsverzeichnis

Frontmatter
Chapter 1. The Case for Microservices
Abstract
Enterprise software architecture always evolves with new architectural styles. These are paradigm shifts in the technology, coupled with the desire to find better ways to build software application in a fast but reliable way.
Kasun Indrasiri, Prabath Siriwardena
Chapter 2. Designing Microservices
Abstract
Steve Jobs believed that design is not just what something looks like and feels like, but how it works. How a microservice works within itself and interacts with other microservices highly depends on its design. Most of the architectural concepts and design principles discussed in terms of microservices don’t just relate to microservices. They’ve been here for some time, even during the early days when SOA (Service Oriented Architecture) was popular. Some even call microservices SOA done right! The fundamental issue with SOA was that people didn’t get the design right. They got caught up in the hype and left behind the key design principles. Over time, SOA became just another buzzword, while the original need for it was left unaddressed. Microservices as a concept has emerged to fill this vacuum. Unless you pay close attention to microservices architectural concepts and design principles, you are not doing microservices!
Kasun Indrasiri, Prabath Siriwardena
Chapter 3. Inter-Service Communication
Abstract
In the microservices architecture, services are autonomous and communicate over the network to form a business use case. A collection of such services forms a system and the consumers often interact with those systems. Therefore, a microservices-based application can be considered a distributed system running multiple services on different network locations. A given service runs on its own process. So microservices interact using inter-process or inter-service communication styles.
Kasun Indrasiri, Prabath Siriwardena
Chapter 4. Developing Services
Abstract
Netflix has taken three steps to build an anti-fragile organization. The first step is to treat every developer as an operator of the corresponding service. The second is to treat each failure as an opportunity to learn and the third is to foster a blameless culture. These three little steps have helped Netflix become the top-leading organization in the microservices world. Many look to Netflix to learn how things are being done and for best practices. Netflix in fact optimized everything for the speed of delivery. As we already discussed in the book, at its core of any microservices design, time to production, scalability, complexity localization, and resiliency are key elements. Developer experience is one of the most important factors to reach these goals. The experience of a developer in a microservices environment is quite different from engineering a monolithic application. As rightly identified by Netflix, the developer’s task does not end after pushing the code into a source repository and expecting a DevOps engineer to build and push the changes to production, or a support engineer to take on any issues that happen in the production environment. A microservices development environment demands a broader skillset from the developer.
Kasun Indrasiri, Prabath Siriwardena
Chapter 5. Data Management
Abstract
In most business services, the service logic is built on top of an underlying persistent layer. Often a database is used as the persistent layer and it is acting as the system of record for a given service. As we’ve discussed, microservices are built as autonomous entities and should have control over the data layer that they operate on. This essentially means that microservices cannot depend on a data layer that is owned by or shared by another entity. So, in the process of building autonomous services, it is also required to have an isolated persistent layer for each microservice. In this chapter, we discuss the commonly used patterns and best practices for transforming centralized or shared database-based enterprise applications to microservices that are based on decentralized databases.
Kasun Indrasiri, Prabath Siriwardena
Chapter 6. Microservices Governance
Abstract
The microservices architecture inherently has to deal with dozens to hundreds or thousands of services. When you operate at that scale, you need to have some governance processes in place. However, using a strict centralized governance process will hinder the autonomy of the microservices architecture. Therefore, we need to rethink a strategy for microservices governance.
Kasun Indrasiri, Prabath Siriwardena
Chapter 7. Integrating Microservices
Abstract
The microservices architecture fosters building a software application as a suite of independent services. When we have to realize a given business use case, we often need to have the communication and coordination between multiple microservices. Therefore, integrating microservices and building inter-service communication has become the one of the most challenging tasks needed to realize the microservices architecture.
Kasun Indrasiri, Prabath Siriwardena
Chapter 8. Deploying and Running Microservices
Abstract
The two main objectives of a microservices architecture is the speed to production and the capability of the application to evolve. Unlike a monolithic application, a microservices deployment includes many individual (and independent) deployments. Instead of one single deployment, now we have hundreds of deployments. Unless we have an automated build system, managing such a deployment is a nightmare. An automated build system will help to streamline the deployment process, but will not solve all the issues in a large-scale deployment. We also need to worry about making a microservice portable, along with all its dependencies, so that the environment the developer tests will not be different from the test and production environments. This helps identify any issues very early in the development cycle and the chances are quite minimal that there will be issues in production. In this chapter we talk about different microservices deployment patterns, containers, container orchestration, container native microservices frameworks, and finally continuous delivery.
Kasun Indrasiri, Prabath Siriwardena
Chapter 9. Service Mesh
Abstract
In Chapter 7, “Integrating Microservices,” we discussed that microservices have to talk to each other and inter-service communication is one of the key challenges in realizing the microservices architecture. In the conventional Service Oriented Architecture (SOA), the centralized Enterprise Service Bus (ESB) facilitated most of the inter-service communication requirements and with the shift to the smart endpoints and dumb pipes, now the service developers have to take care of all the complexities of inter-service communication. Service Mesh has immerged as a pattern to overcome most of these challenges. It does this by providing a generic distributed layer that encapsulates the commodity features of inter-service communication.
Kasun Indrasiri, Prabath Siriwardena
Chapter 10. APIs, Events, and Streams
Abstract
In this chapter, we focus on how external services and systems can consume your business capabilities and how your microservices applications can act on these changes in the external services and systems. In that context, we discuss how the microservices architecture works with APIs, events, and streams.
Kasun Indrasiri, Prabath Siriwardena
Chapter 11. Microservices Security Fundamentals
Abstract
The microservices architecture expands the attack surface with multiple microservices communicating with each other remotely. Instead of having one or two entry points, now we have hundreds of entry points to worry about. It’s a common principle in security that the strength of a given system is only as strong as the strength of its weakest link. The more entry points we have, the broader the attack surface, and the higher the risk of being attacked. Unlike in a monolithic application, the depth and breadth we need to worry about in securing a microservice is much higher. There are multiple perspectives in securing microservices: secure development lifecycle and test automation, security in DevOps, and application level security.
Kasun Indrasiri, Prabath Siriwardena
Chapter 12. Securing Microservices
Abstract
In Chapter 11, “Microservices Security Fundamentals,” we discussed the common patterns and fundamentals related to securing microservices. If you haven’t gone through it, we strongly recommend you do that. In this chapter, we discuss how to implement security for microservices using Spring Boot. We explain how you can invoke a microservice directly, either as an end user or a system, secure the communication between two microservices, access controlling, and protecting access to the actuator endpoints.
Kasun Indrasiri, Prabath Siriwardena
Chapter 13. Observability
Abstract
Collecting data is cheap, but not having it when you need it can be expensive. In March 2016, Amazon was down for 20 minutes and the estimated revenue loss was $3.75 million. Also in January 2017, there was a system outage at Delta Airlines, which caused cancellation of more than 170 flights and resulted in an estimated loss of $8.5 million. In both cases if we had the right level of data collected, we could have predicted such behavior or could have recovered from it as soon as it has happened by identifying the root cause. The more information we have, the better decisions we can make.
Kasun Indrasiri, Prabath Siriwardena
Backmatter
Metadaten
Titel
Microservices for the Enterprise
verfasst von
Kasun Indrasiri
Prabath Siriwardena
Copyright-Jahr
2018
Verlag
Apress
Electronic ISBN
978-1-4842-3858-5
Print ISBN
978-1-4842-3857-8
DOI
https://doi.org/10.1007/978-1-4842-3858-5