Microservices - A Practical Guide
Microservices - A Practical Guide
Principles, Concepts, and Recipes
About the Book
Microservices have many advantages: Efficiently implementing more features, bringing software into production faster, robustness and easy scalability are among them. But implementing a microservices architecture and selecting the necessary technologies are difficult challenges.
This book shows microservices recipes that architects can customize and combine into a microservices menu. In this way, the implementation of microservices can be individually adapted to the requirements of the project.
Eberhard Wolff introduces microservices, self-contained systems, micro- and macro-architecture and the migration to microservices. The second part shows the microservices recipes: Basic technologies such as Docker or PaaS, frontend integration with links, JavaScript or ESI (Edge Side Includes). This is followed by asynchronous microservices with Apache Kafka or REST / Atom. In the synchronous approaches, the book discusses REST with the Netflix stack, Consul, PaaS with Cloud Foundry, and Kubernetes. Finally, operations is discussed: Log Analysis with Elasticsearch and Kibana, Monitoring with Prometheus, and tracing with Zipkin.
The second edition is based on the feedback about the first edition. All chapters have been clarified, updated and extended. A new chapter discusses services meshes, in particular Istio with an example application. The second edition has about 35 pages more than the first edition.
For each recipe there are suggestions for variations and combinations. Readers can experience all technologies hands-on with a demo project on GitHub. The outlook picks up on the operation of microservices and also shows how the reader can start with microservices in concrete terms.
The book provides the technical tools to implement a microservices architecture. Demo projects and suggestions for self-study will complete the book.
Bundles that include this book
Table of Contents
-
0 Introduction
- 0.1 Structure of the Book
- 0.2 Target Group
- 0.3 Prior Knowledge
- 0.4 Quick Start
- 0.5 Acknowledgements
- 0.6 Website
- Part I: Principles of Microservices
-
1 Microservices
- 1.1 Microservices: Definition
- 1.2 Reasons for Microservices
- 1.3 Challenges
- 1.4 Variations
- 1.5 Conclusion
-
2 Micro and Macro Architecture
- 2.1 Bounded Context and Strategic Design
- 2.2 Technical Micro and Macro Architecture
- 2.3 Operation: Micro or Macro Architecture?
- 2.4 Give a Preference to Micro Architecture!
- 2.5 Organizational Aspects
- 2.6 Independent Systems Architecture Principles (ISA)
- 2.7 Variations
- 2.8 Conclusion
-
3 Migration
- 3.1 Reasons for Migrating
- 3.2 A Typical Migration Strategy
- 3.3 Alternative Strategies
- 3.4 Build, Operation, and Organization
- 3.5 Variations
- 3.6 Conclusion
- Part II: Technology Stacks
-
4 Docker
- 4.1 Docker for Microservices: Reasons
- 4.2 Docker Basics
- 4.3 Docker Installation and Docker Commands
- 4.4 Installing Docker Hosts with Docker Machine
- 4.5 Dockerfiles
- 4.6 Docker Compose
- 4.7 Variations
- 4.8 Conclusion
-
5 Technical Micro Architecture
- 5.1 Requirements
- 5.2 Reactive
- 5.3 Spring Boot
- 5.4 Go
- 5.5 Variations
- 5.6 Conclusion
-
6 Self-contained Systems
- 6.1 Reasons for the Term Self-contained Systems
- 6.2 Definition
- 6.3 An Example
- 6.4 SCSs and Microservices
- 6.5 Challenges
- 6.6 Benefits
- 6.7 Variations
- 6.8 Conclusion
-
7 Concept: Frontend Integration
- 7.1 Frontend: Monolith or Modular?
- 7.2 Options
- 7.3 Resource-oriented Client Architecture (ROCA)
- 7.4 Challenges
- 7.5 Benefits
- 7.6 Variations
- 7.7 Conclusion
-
8 Recipe: Links and Client-side Integration
- 8.1 Overview
- 8.2 Example
- 8.3 Variations
- 8.4 Experiments
- 8.5 Conclusion
-
9 Recipe: Server-side Integration using Edge Side Includes (ESI)
- 9.1 ESI: Concepts
- 9.2 Example
- 9.3 Varnish
- 9.4 Recipe Variations
- 9.5 Experiments
- 9.6 Conclusion
-
10 Concept: Asynchronous Microservices
- 10.1 Definition
- 10.2 Events
- 10.3 Challenges
- 10.4 Advantages
- 10.5 Variations
- 10.6 Conclusions
-
11 Recipe: Messaging and Kafka
- 11.1 Message-oriented Middleware (MOM)
- 11.2 The Architecture of Kafka
- 11.3 Events with Kafka
- 11.4 Example
- 11.5 Recipe Variations
- 11.6 Experiments
- 11.7 Conclusion
-
12 Recipe: Asynchronous Communication with Atom and REST
- 12.1 The Atom Format
- 12.2 Example
- 12.3 Recipe Variations
- 12.4 Experiments
- 12.5 Conclusion
-
13 Concept: Synchronous Microservices
- 13.1 Definition
- 13.2 Benefits
- 13.3 Challenges
- 13.4 Variations
- 13.5 Conclusion
-
14 Recipe: REST with the Netflix Stack
- 14.1 Example
- 14.2 Eureka: Service Discovery
- 14.3 Router: Zuul
- 14.4 Load Balancing: Ribbon
- 14.5 Resilience: Hystrix
- 14.6 Recipe Variations
- 14.7 Experiments
- 14.8 Conclusion
-
15 Recipe: REST with Consul and Apache httpd
- 15.1 Example
- 15.2 Service Discovery: Consul
- 15.3 Routing: Apache httpd
- 15.4 Consul Template
- 15.5 Consul and Spring Boot
- 15.6 DNS and Registrator
- 15.7 Recipe Variations
- 15.8 Experiments
- 15.9 Conclusion
-
16 Concept: Microservices Platforms
- 16.1 Definition
- 16.2 Variations
- 16.3 Conclusion
-
17 Recipe: Docker Containers with Kubernetes
- 17.1 Kubernetes
- 17.2 The Example with Kubernetes
- 17.3 The Example in Detail
- 17.4 Additional Kubernetes Features
- 17.5 Recipe Variations
- 17.6 Experiments
- 17.7 Conclusion
-
18 Recipe: PaaS with Cloud Foundry
- 18.1 PaaS: Definition
- 18.2 Cloud Foundry
- 18.3 The Example with Cloud Foundry
- 18.4 Recipe Variations
- 18.5 Experiments
- 18.6 Serverless
- 18.7 Conclusion
- Part III: Operation
-
19 Concept: Operation
- 19.1 Why Operation Is Important
- 19.2 Approaches for the Operation of Microservices
- 19.3 Effects of the Discussed Technologies
- 19.4 Conclusion
-
20 Recipe: Monitoring with Prometheus
- 20.1 Basics
- 20.2 Metrics for Microservices
- 20.3 Metrics with Prometheus
- 20.4 Example with Prometheus
- 20.5 Recipe Variations
- 20.6 Experiments
- 20.7 Conclusion
-
21 Recipe: Log Analysis with the Elastic Stack
- 21.1 Basics
- 21.2 Logging with the Elastic Stack
- 21.3 Example
- 21.4 Recipe Variations
- 21.5 Experiments
- 21.6 Conclusion
-
22 Recipe: Tracing with Zipkin
- 22.1 Basics
- 22.2 Tracing with Zipkin
- 22.3 Example
- 22.4 Recipe Variations
- 22.5 Conclusion
-
23 Recipe: Service Mesh Istio
- 23.1 What Is a Service Mesh?
- 23.2 Example
- 23.3 How Istio Works
- 23.4 Monitoring with Prometheus and Grafana
- 23.5 Tracing with Jaeger
- 23.6 Visualization with Kiali
- 23.7 Logging
- 23.8 Resilience
- 23.9 Challenges
- 23.10 Benefits
- 23.11 Variations
- 23.12 Experiments
- 23.13 Conclusion
- 24 And Now What?
- Appendix A: Installation of the Environment
- Appendix B: Maven Commands
- Appendix C: Docker and Docker Compose Commands
- Notes
Authors have earned$9,893,383writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Functional Design and Architecture
Alexander GraninSoftware Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
The book is almost daily updated. These incremental updates ease my interaction with the proofreaders.
Introductory Statistics with Randomization and Simulation
Mine Cetinkaya-Rundel, Christopher Barr, OpenIntro, and David DiezA complete foundation for Statistics, also serving as a foundation for Data Science, that introduces inference using randomization and simulation while covering traditional methods.
Leanpub revenue supports OpenIntro, so we can provide free desk copies to teachers interested in using our books in the classroom.
More resources: openintro.org.
Java OOP Done Right
Alan MellorObject Oriented Programming is still a great way to create clean, maintainable code. But only if you use it right.
This book gives you 25 years of OO best practice, ready to use.
You'll learn to design objects behaviour-first, use TDD to help, then confidently apply Design Patterns, SOLID principles and Refactoring to make clean, crafted code.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Composing Software
Eric ElliottAll software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.
Cloud Strategy
Gregor Hohpe“Strategy is the difference between making a wish and making it come true.” A successful migration to the cloud shouldn’t be driven by wishes, but guided by a sound strategy, frameworks, and decision models. This book tells you how—without becoming superficial nor getting lost in technology and product details.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #4
CCDE Practical Studies (All labs)
3 Books
CCDE lab - #5
Modern Management Made Easy
3 Books
Read all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization. - #6
The Future of Digital Health
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy and how technology giants such as Amazon or Google want to conquer... - #7
Modern C++ by Nicolai Josuttis
2 Books
- #8
Django for Beginners/APIs/Professionals
3 Books
- #9
"The C++ Standard Library" and "Concurrency with Modern C++"
2 Books
Get my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library... - #10
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité...