Microservices in Action
Paperback Engels 2019 1e druk 9781617294457Samenvatting
Microservices promise a better way to sustainably deliver business impact. Rather than a single monolithic unit, applications built in this style are composed from loosely-coupled, autonomous services.
Microservices in Action is a practical book about building and deploying microservice-based applications. Written for developers and architects with a solid grasp of service-oriented development, it tackles the challenge of putting microservices into production.
Key features
- Review of microservice architecture
- Written by authors with daily, hands-on experience
- Building a delivery pipeline for microservices
Readers should be intermediate developers with some knowledge of enterprise application architecture.
Microservices change the dev process, maximizing the efficiency and independence of small teams. To be successful, developers, team leaders, and architects need to master both the implementation details and the big picture of how microservices work in a production environment.
Morgan Bruce and Paulo A. Pereira have years of experience building distributed applications, with particular expertise in the high-stakes finance and identity verification industries. They work daily with microservices in a production environment using the tools and techniques presented in this book.
Specificaties
Lezersrecensies
Inhoudsopgave
1 DESIGNING AND RUNNING MICROSERVICES
1.1 What is a microservice application?
1.1.1 Scaling through decomposition
1.1.2 Key principles
1.1.3 Who uses microservices?
1.1.4 Why are microservices a good choice?
1.2 What makes microservices challenging?
1.2.1 Design challenges
1.2.2 Operational challenges
1.3 Microservice development lifecycle
1.3.1 Designing microservices
1.3.2 Deploying microservices
1.3.3 Observing microservices
1.4 Responsible and operationally aware engineering culture
Summary
2 MICROSERVICES AT SIMPLEBANK
2.1 What does SimpleBank do?
2.2 Are microservices the right choice?
2.2.1 Risk and inertia in financial software
2.2.2 Reducing friction and delivering sustainable value
2.3 Building a new feature
2.3.1 Identifying microservices by modeling the domain
2.3.2 Service collaboration
2.3.3 Service choreography
2.4 Exposing services to the world
2.5 Taking your feature to production
2.5.1 Quality-controlled and automated deployment
2.5.2 Resilience
2.5.3 Transparency
2.6 Scaling up microservice development
2.6.1 Technical divergence
2.6.2 Isolation
2.7 What’s next?
Summary
PART 2: DESIGN
3 ARCHITECTURE OF A MICROSERVICE APPLICATION
3.1 Architecture as a whole
3.1.1 From monolith to microservices
3.1.2 The role of an architect
3.1.3 Architectural principles
3.1.4 The four tiers of a microservice application
3.2 A microservice platform
3.2.1 Mapping your runtime platform
3.3 Services
3.3.1 Capabilities
3.3.2 Aggregation and higher order services
3.3.3 Critical and noncritical paths
3.4 Communication
3.4.1 When to use synchronous messages
3.4.2 When to use asynchronous messages
3.4.3 Asynchronous communication patterns
3.4.4 Locating other services
3.5 The application boundary
3.5.1 API gateways
3.5.2 Backends for frontends
3.5.3 Consumer-driven gateways
3.6 Clients
3.6.1 Frontend monoliths
3.6.2 Micro-frontends
Summary
4 DESIGNING NEW FEATURES
4.1 A new feature for SimpleBank
4.2 Scoping by business capabilities
4.2.1 Capabilities and domain modeling
4.2.2 Creating investment strategies
4.2.3 Nested contexts and services
4.2.4 Challenges and limitations
4.3 Scoping by use case
4.3.1 Placing investment strategy orders
4.3.2 Actions and stores
4.3.3 Orchestration and choreography
4.4 Scoping by volatility
4.5 Technical capabilities
4.5.1 Sending notifications
4.5.2 When to use technical capabilities?
4.6 Dealing with ambiguity
4.6.1 Start with coarse-grained services
4.6.2 Prepare for further decomposition
4.6.3 Retirement and migration
4.7 Service ownership in organizations
Summary
5 TRANSACTIONS AND QUERIES IN MICROSERVICES
5.1 Consistent transactions in distributed applications
5.1.1 Why can’t you use distributed transactions?
5.2 Event-based communication
5.2.1 Events and choreography
5.3 Sagas
5.3.1 Choreographed sagas
5.3.2 Orchestrated sagas
5.3.3 Interwoven sagas
5.3.4 Consistency patterns
5.3.5 Event sourcing
5.4 Queries in a distributed world
5.4.1 Storing copies of data
5.4.2 Separating queries and commands
5.4.3 CQRS challenges
5.4.4 Analytics and reporting
5.5 Further reading
5.6 Summary
6 DESIGNING RELIABLE SERVICES
6.1 Defining reliability
6.2 What could go wrong?
6.2.1 Sources of failure
6.2.2 Cascading failures
6.3 Designing reliable communication
6.3.1 Retries
6.3.2 Fallbacks
6.3.3 Timeouts
6.3.4 Circuit breakers
6.3.5 Asynchronous communication
6.4 Maximizing service reliability
6.4.1 Load balancing and service health
6.4.2 Rate limits
6.4.3 Validating reliability and fault tolerance
6.5 Safety by default
6.5.1 Frameworks
6.5.2 Service mesh
Summary
7 BUILDING A REUSABLE MICROSERVICE FRAMEWORK
7.1 A microservice chassis
7.2 What’s the purpose of a microservice chassis?
7.2.1 Reduce risk
7.2.2 Faster bootstrapping
7.3 Designing a chassis
7.3.1 Service discovery
7.3.2 Observability
7.3.3 Balancing and limiting
7.4 Exploring the feature implemented using the chassis
7.5 Wasn’t heterogeneity one of the promises of microservices?
7.6 Summary
PART 3: DEPLOYMENT
8 DEPLOYING MICROSERVICES
8.1 Why is deployment important?
8.1.1 Stability and availability
8.2 A microservice production environment
8.2.1 Features of a microservice production environment
8.2.2 Automation and speed
8.3 Deploying a service, the quick way
8.3.1 Service startup
8.3.2 Provisioning a virtual machine
8.3.3 Run multiple instances of your service
8.3.4 Adding a load balancer
8.3.5 What have you learned?
8.4 Building service artifacts
8.4.1 What’s in an artifact?
8.4.2 Immutability
8.4.3 Types of service artifacts
8.4.4 Configuration
8.5 Service to host models
8.5.1 Single service to host
8.5.2 Multiple static services per host
8.5.3 Multiple scheduled services per host
8.6 Deploying services without downtime
8.6.1 Canaries and rolling deploys on GCE
Summary
9 DEPLOYMENT WITH CONTAINERS AND SCHEDULERS
9.1 Containerizing a service
9.1.1 Working with images
9.1.2 Building your image
9.1.3 Running containers
9.1.4 Storing an image
9.2 Deploying to a cluster
9.2.1 Designing and running pods
9.2.2 Load balancing
9.2.3 A quick look under the hood
9.2.4 Health checks
9.2.5 Deploying a new version
9.2.6 Rolling back
9.2.7 Connecting multiple services
Summary
10 BUILDING A DELIVERY PIPELINE FOR MICROSERVICES
10.1 Making deploys boring
10.1.1 A deployment pipeline
10.2 Building a pipeline with Jenkins
10.2.1 Configuring a build pipeline
10.2.2 Building your image
10.2.3 Running tests
10.2.4 Publishing artifacts
10.2.5 Deploying to staging
10.2.6 Staging environments
10.2.7 Deploying to production
10.3 Building reusable pipeline steps
10.3.1 Procedural versus declarative build pipelines
10.4 Techniques for low-impact deployment and feature release
10.4.1 Dark launches
10.4.2 Feature flags
Summary
PART 4: OBSERVABILITY AND OWNERSHIP
11 BUILDING A MONITORING SYSTEM
11.1 A robust monitoring stack
11.1.1 Good monitoring is layered
11.1.2 Golden signals
11.1.3 Types of metrics
11.1.4 Recommended practices
11.2 Monitoring SimpleBank with Prometheus and Grafana
11.2.1 Setting up your metric collection infrastructure
11.2.2 Collecting infrastructure metrics—RabbitMQ
11.2.3 Instrumenting SimpleBank’s place order
11.2.4 Setting up alerts
11.3 Raising sensible and actionable alerts
11.3.1 Who needs to know when something is wrong?
11.3.2 Symptoms, not causes
11.4 Observing the whole application
Summary
12 USING LOGS AND TRACES TO UNDERSTAND BEHAVIOR
12.1 Understanding behavior across services
12.1.1 Useful information to include in log entries
12.1.2 Structure and readability
12.2 Generating consistent, structured, human-readable logs
12.2.1 Useful information to include in log entries
12.2.2 Structure and readability
12.3 Setting up a logging infrastructure for SimpleBank
12.3.1 ELK- and Fluentd-based solution
12.3.2 Setting up your logging solution
12.3.3 Configure what logs to collect
12.3.4 Finding a needle in the haystack
12.3.5 Logging the right information
12.4 Tracing interactions between services
12.4.1 Correlating requests: traces and spans
12.4.2 Setting up tracing in your services
12.5 Visualizing traces
Summary
13 BUILDING MICROSERVICE TEAMS
13.1 Building effective teams
13.1.1 Conway’s Law
13.1.2 Principles for effective teams
13.2 Team models
13.2.1 Grouping by function
13.2.2 Grouping across functions
13.2.3 Setting team boundaries
13.2.4 Infrastructure, platform, and product
13.2.5 Who’s on-call?
13.2.6 Sharing knowledge
13.3 Recommended practices for microservice teams
13.3.1 Drivers of change in microservices
13.3.2 The role of architecture
13.3.3 Homogeneity versus technical flexibility
13.3.4 Open source model
13.3.5 Design review
13.3.6 Living documentation
13.3.7 Answering questions about your application
13.4 Further reading
Summary
APPENDIXES
APPENDIX A: INSTALLING JENKINS ON MINIKUBE
A.1 Running Jenkins on Kubernetes
A.1.1 Setting up Helm
A.1.2 Create a namespace and a volume
A.1.3 Installing Jenkins
A.1.4 Configuring RBAC
A.1.5 Testing it all works
Rubrieken
- advisering
- algemeen management
- coaching en trainen
- communicatie en media
- economie
- financieel management
- inkoop en logistiek
- internet en social media
- it-management / ict
- juridisch
- leiderschap
- marketing
- mens en maatschappij
- non-profit
- ondernemen
- organisatiekunde
- personal finance
- personeelsmanagement
- persoonlijke effectiviteit
- projectmanagement
- psychologie
- reclame en verkoop
- strategisch management
- verandermanagement
- werk en loopbaan