Microservices in Action
-
Upload
bhagwat-kumar -
Category
Design
-
view
249 -
download
0
Transcript of Microservices in Action
Microservices in Action
Bhagwat Kumar
2
Agenda
• Traditional/Monolith Architecture• Get familiar with microservice architecture• Challenges due to distributed nature• Netflix and Spring Cloud project• Build a microservice application
3
Traditional architecture
E-comm Web Application
Traditional architecture cont.…Simple to
Develop Test Deploy Scale
But… Your IDE hangs Complex engogh for
new feature Adding new developer
to the team Frequent deployments
and the long running jobs
Framework stack committment
Modules not deployable independently
Decomposition
Decomposition cont.…
7
What are microservices?
Microservices are a style of software architecture that involves delivering systems as a suite of very small, granular, independent collaborating services.
8
What are microservices cont.…
Each microservice: Built around business capabilities Runs in its own process Collaborate with lightweight mechanisms e.g.
HTTP resource API, Messaging
9
Microservices characteristics
• Componentization via Services• Organized around Business Capabilities• Smart endpoints and dumb pipes• Decentralized governance• Decentralized data management• Infrastructure Automation
10
Microservices Benefits
• Ease of development and maintenance• Deployed independently of other services• Truly scalable systems• Fault isolation e.g. memory leak• Polyglot mode of development e.g. Nodejs
for one service and C/C++ for other
11
Microservices challenges
• Distributed systems are harder to program, since remote calls are slow and are always at risk of failure
• Operational Complexity: You need a mature operations team to manage lots of services, which are being redeployed regularly
• Challenging to slice the app into services
12
Fallacies of Distributed Computing
• Proved to be false in the long run• The network is reliable• Latency is zero• Bandwidth is infinite• The network is secure• Topology doesn't change• There is one administrator• Transport cost is zero• The network is homogeneous
13
Spring Cloud and
Netflix OSS
14
Spring Cloud and Netflix OSS
Spring Cloud integrates the Netflix components in the Spring environment in a very nice way using auto configuration and convention over configuration similar to how Spring Boot works.
15
Spring Cloud and Netflix OSS
16
Centralized configuration service
17
Centralized configuration service
18
Eureka Discovery Service
19
Eureka Discovery Service
20
Client Side Load balancer
21
Client Side load-balance: Ribbon
22
Client Side load-balance: Feign
23
Zuul API Gateway
24
Zuul API Gateway Cont...
Let me know if you still have few questions unanswered.
[email protected]://twitter.com/bhagwatkumarhttp://www.tothenew.com/blog/author/bhagwat/
27
Referenceshttp://martinfowler.com/articles/microservices.htmlhttp://projects.spring.io/spring-cloud/http://www.infoworld.com/article/2925047/application-development/build-self-healing-distributed-systems-with-spring-cloud.htmlhttp://blog.arungupta.me/microservice-design-patterns/https://gssachdeva.wordpress.com/2015/06/02/microservices-in-a-nutshell/http://www.slideshare.net/SpringCentral/building-a-microservice-federation-with-grailshttps://spring.io/blog/2015/07/14/microservices-with-springhttp://callistaenterprise.se/blogg/teknik/2015/04/10/building-microservices-with-spring-cloud-and-netflix-oss-part-1/