More Related Content
Similar to DevOps best practices in microservices | Walkingtree Technologies (20)
DevOps best practices in microservices | Walkingtree Technologies
- 2. Copyrights ©2019 Walking Tree
Agenda
● Devops & Microservices - What is the relation?
● DevOps core building blocks
● Pitfalls Vs Best Practices
● Summary
● Q & A
- 7. Copyrights ©2019 Walking Tree
Give me one more chance to love you. You get only one chance, aim to do it right
Can a change fail?
- 8. Copyrights ©2019 Walking Tree
Nothing is certain except for death and
taxes.
Nothing is certain except for death and
production failure.
Benjamin Franklin Software Genie
Time for Recovery
- 9. Copyrights ©2019 Walking Tree
Lead Time
Deployment
Frequency
Mean Time to
Restore
Change Fail
Percentage
9
Delivery performance
- 10. Copyrights ©2019 Walking Tree
Complement each other
Microservices Devops
I will make things lite I will bring agility
I will make
development swift
I will scale themI will make things
independent
I will identify failure
early
- 13. Copyrights ©2019 Walking Tree
Continuous Integration
● Dev team relies on manual testing may get feedback in a couple hours, comprehensive test feedback
comes a day–or several days
● The primary goal of CI is to keep everyone in sync with each other(Developer’s code)
● CI servers detects that the code has been committed, checks it out and compiles,tests.
● CI also builds the artifact(s), which are used for further validation such as deploying a running service
to run tests against it.
● Ideally we should build these artifacts only once and use across the all deployments of that version
code.
- 14. Copyrights ©2019 Walking Tree
Continuous Integration
● Having single code repository for all the
services
● Not having CI or Having monolithic CI
● Not commiting code to trunk at least once
in a day
● Not having suite of tests to validate
changes
● Low priority for broken build
● Separate repository for each service
● Separate CI build for each service
● As many commits as possible to main
trunk in a day
● Good test suite which will validate the
results immediately
● Highest priority for broken build
Best PracticesPitfalls
- 15. Copyrights ©2019 Walking Tree
Continuous Deployment
● Continuous Deployment is an approach where teams release quality products frequently and predictably
from source code repository to production in an automated fashion
● Continuous Deployment(CD) is a strategy for software releases
● Releases become smaller and easier to understand.
● No one is required to drop their work to make a deployment because everything is automated.
● The feedback loop with your customers is faster: new features and improvements go straight to
production when they're ready
● CD eliminates the human safeguards against unproven code in live software.
- 16. Copyrights ©2019 Walking Tree
Continuous Deployment
● Not covering all the stages of journey from
code to production
● Tailoring CI tools to do CD work
● Technology specific CD tools
● Generating artifacts separately for each
stage
● Not having a configuration server
● Not having images for each service
● Lack of versioning for artifacts
● CD covers all stages
● Use specific CD tools
● Identify technology agnostic CD tools
● Single artifact for all the stages
● Having configuration server which takes
care of all configurations
● Maintain Image for each Service
● Mandatory versioning of artifacts
Pitfalls Best Practices
- 17. Copyrights ©2019 Walking Tree
Scaling
● Scaling helps you quickly and easily scale multiple resources
Maintain performance
Add more resources to meet
application performance targets.
Benefits
Control costs
Automatically remove unneeded
resources to avoid overspending.
Simplify scaling
Discover scalable resources and
build a scaling plan in just a few
steps.
Scale Predictively
Use historical load metrics to learn
your application’s traffic patterns
and proactively scale resources
ahead of time.
- 18. Copyrights ©2019 Walking Tree
Scaling
● Lack of containerization
● Inadequate Image management
● No link between metrics and scale
● No or Semi automation of scaling
● Effective Containerization
● Comprehensive Image management
● Linking of metrics with scaling
● Auto updation of load balancer
● Must be automated ( both up and down )
Best PracticesPitfalls
- 19. Copyrights ©2019 Walking Tree
Metrics
● Host and Infrastructure metrics - Metrics of the infrastructure and the servers on which the microservice
is running
○ Hardware
○ Communication
○ Application Platform
● Microservice metrics - Metrics that are unique to the individual microservice
○ Microservices
- 20. Copyrights ©2019 Walking Tree
Metrics
● Services having no clue of its own metrics
● No aggregation or drill down option for
service and host level metrics
● Insufficient storage system for metrics
● Design services to expose basic metrics
themselves( Like response time & error
rate)
● Aggregation of service level metrics
● Aggregation of host level metrics
● Drill down option for metrics at service as
well as host level
● Metric storage platform must be elastic
enough to store data which can allow you
to create and observe trends
Best PracticesPitfalls
- 21. Copyrights ©2019 Walking Tree
Monitoring
● We should be able to monitor the application logs,alarms..etc
View alarms
Set alarms on any of your
metrics
View logs
Monitor Application logs
View dashboards
Dashboards can be created to
monitor the health of the
Services
- 22. Copyrights ©2019 Walking Tree
Monitoring
● No mechanism to upfront know the
underlying problem before end user gets
affected
● Lack of standardization in logs
● Watching logs from specific hosts
● Lack of tracing mechanism for sequence of
events
● No mechanism to check the health of
downstream dependencies
● Synthetic events and Semantic Monitoring
● Standardization of logs
● Aggregated logging
● Correlation IDs
● Mechanism to track the health of
Downstream dependencies
Best PracticesPitfalls
- 23. Copyrights ©2019 Walking Tree
Recommended DevOps Process
Version Control /
SCM
Continuous
Testing
Continuous
Deployment
Continuous
Integration
Continuous
Integration
MS
Cluster
Monitoring
- 24. Copyrights ©2019 Walking Tree
Summary
● Covered the importance of the DevOps in the Microservices environment
● Gone through the each building block of DevOps
● Pitfalls
● Best Practices