Home Page Icon
Home Page
Table of Contents for
Copyright
Close
Copyright
by Umesh Ram Sharma
Practical Microservices
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
Introduction to Microservices Architecture
General microservices architecture
Characteristics of microservice architecture
Problem definition
Solution
How much proposed solution is aligned with microservice architecture?
Challenges for a successful microservice architecture
Debugging through logging
Monitoring microservices
Common libraries
Messaging between services
Deployment and versioning of microservices
Future of microservices
Serverless architecture
Microservices as PaaS
Dominance of microservice architecture over traditional architecture
Huh? Doesn't it seem like SOA?
Assorting large business domains into microservice components
Organizing microservice components around business capabilities
To go or not to go for microservices
Organization buy-in
Experience DevOps
Analyze existing database model
Automation and CI/CD
Integration
Security
Example of successful migration
Sample project (credit risk engine)
Spring
Spring Boot
Things are easy with Spring Boot!
Summary
Defining Microservice Components
Definition of a microservice
Service Discovery and its role
DNS
Discovery service need
Registry/deregistry of services
Discovering other services
Example of service discovery pattern
Externalized configuration in the overall architecture
API Gateway and its need
Authentication
Different protocol
Load-balancing
Request dispatching (including service discovery)
Response transformation
Circuit breaker
Pros and cons of API Gateway
Example of API Gateway
Sample application used throughout the book
Development of user registration microservice
Configuration server
Table structure
Summary
Communication between Microservices Endpoints
How should microservices communicate with each other?
Orchestration versus choreography
Orchestration
Choreography
Synchronous versus asynchronous communication
Synchronous communication
Asynchronous communication
Message-based/event-based asynchronous communication
Implementing asynchronous communication with REST
Implementing asynchronous communication with message broker
Financial services
Summary
Securing Microservice Endpoints
Security challenges in microservices
Mix technology stack or legacy code presence
Authentication and authorization (access control)
Token-based security
Responsibility of security
Fear with orchestration style
Communication among services
Using JWT along with OpenID and OAuth 2.0
OpenID
OAuth 2.0
JWT
A few examples
Header
Sample application
Summary
Creating an Effective Data Model
Data and modeling
Comparison with a traditional data model
Data model in monolithic architecture
Data model in SOA
Data model in microservice architecture
Restricted tables for each microservice
Database per microservice
The Saga pattern
Intermixing data technologies when needed
Migrating a data model from monolithic to microservices
Domain-Driven Design
Methods of data model migration
Views
Clone table using trigger
Event sourcing
Sample application data model
Summary
Testing Microservices
The purpose of testing in the microservices world
Unit testing
Integration testing
Component (service) testing
Contract testing
Pact
Spring Cloud Contract
End-to-end testing
One step further
Summary
Deploying Microservices
Continuous integration
Continuous delivery
Configuring tools for CI and CD with our microservices
Dockerizing our microservice
Docker
Docker engine
Docker images
Docker storage
How things work in Docker
Public, private, and official image repositories
Docker versus VMs
Installing Docker in Linux
Using open source CI tools with our Dockerized microservices
Summary
Evolving the Existing System
Where to start
Architectural perspective and best practice
Database perspective and best practice
Sample application and its evolution
User management service
Cart/order service
Payment service
Shipping/tracking and communication service
Recommendation service
Scheduler service
Summary
Monitoring and Scaling
Principles in monitoring a microservice system
How and who will see the alerts
Monitoring and channeling from the start
Autoscale and autodiscovery
Monitor front door
Changing face of monitoring
Logging helps in monitoring
Principles in scaling a microservices system
X axis
Y axis
Z axis
Thoughts before scaling
Practical options for both monitoring and scaling microservices
Summary
Troubleshooting
Common issues with microservices
Slow performance
Different logging locations from different programming languages
Coupling or dependency issues in multiple components
Per-day deployment for more number of services
Monitor many services for performance degradation or issues
Relation between logs and different components
Techniques to solve the common issue
Steps to help with performance issues
Handle logging in different locations and from different languages
Dependencies between services
High DevOps involvement
Use smart tools
Use smart developers
Monitoring
Summary
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Title Page
Next
Next Chapter
Practical Microservices
< html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset