microservices with spring boot
TRANSCRIPT
![Page 1: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/1.jpg)
Microservices w/ Spring Boot
Mesut Can Gürle
![Page 2: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/2.jpg)
● Extreme Programmer● Open Source Enthusiast● PhD Student● Devops Turkey, Istanbul
Coders● #793 @LKD● @mesutcang ● Jedi
![Page 3: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/3.jpg)
Agenda ❏ Monolithic Architecture❏ Advantages & Disadvantages❏ Microservice Architecture❏ Advantages & Disadvantages ❏ Suggestions❏ Spring Boot Solution
![Page 4: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/4.jpg)
Burj Khalifa 828 m
![Page 5: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/5.jpg)
![Page 6: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/6.jpg)
Characteristics● Large Codebase● Many Components, no clear ownership● Long deployment cycles
![Page 7: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/7.jpg)
Advantages● Single codebase● Easy to develop / debug /
deploy● Good IDE support● Easy to scale horizontally ● Ops team can efficiently
handle
![Page 8: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/8.jpg)
![Page 9: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/9.jpg)
Problems● As codebase increases …● Tends to increase “tight
coupling” between components
● All components have to be coded in the same language
● Scaling is “undifferentiated”
![Page 10: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/10.jpg)
![Page 11: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/11.jpg)
Characteristics● Many smaller (fine grained), clearly scoped services● Single Responsibility Principle● Domain Driven Development● Bounded Context● Independently Managed● Clear ownership for each service● Typically need/adopt the “DevOps” model
![Page 12: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/12.jpg)
Unix philosophy● Write programs that do one thing and do it well.● Write programs to work together.
$ du | sort -nr |head -n 2 | tail -n 1
![Page 13: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/13.jpg)
Why● Faster and simpler deployments and rollbacks● Independent Speed of Delivery ● Right framework / tool / language for each domain● Recommendation component using Python?, Catalog Service in Java ..● Greater Resiliency● Fault Isolation● Better Availability
![Page 14: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/14.jpg)
![Page 15: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/15.jpg)
![Page 16: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/16.jpg)
Problems● Service Discovery● Operational Overhead ● Distributed Systems are
inherently Complex● Service Versioning● Testing● Fan out of Requests
![Page 17: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/17.jpg)
![Page 18: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/18.jpg)
![Page 19: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/19.jpg)
![Page 20: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/20.jpg)
![Page 21: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/21.jpg)
![Page 22: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/22.jpg)
![Page 23: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/23.jpg)
![Page 24: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/24.jpg)
Why Spring Boot?● Stand-alone Spring applications ● Embedded Tomcat or Jetty ● Starter dependencies ● Automatic configuration ● Production-ready environment ● No code generation / no XML config
![Page 25: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/25.jpg)
![Page 26: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/26.jpg)
Actuator● Adds common non-functional features to your application and exposes
MVC endpoints to interact with them. ● Endpoints: /metrics, /health, /trace, /dump,
/shutdown, /beans Audit /info ● If embedded in a web app or web service can use the same port or a
different one (and a different network interface).
![Page 27: Microservices with spring boot](https://reader031.vdocuments.us/reader031/viewer/2022020113/587985b71a28ab6c358b64d7/html5/thumbnails/27.jpg)
Questions