Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cloud Native Spring - Migrating Traditional Applications

Cloud Native Spring - Migrating Traditional Applications

The Spring ecosystem provides you with all you need to build cloud native applications, focusing on productivity, simplicity, and speed. If you decided that moving to the cloud will help your business, you’d need a strategy to migrate your existing applications. Luckily, Spring got you covered.

In this session, I’ll cover the main technical steps of migrating a traditional Spring application to be cloud native. You’ll learn best practices and common patterns to build self-contained apps by using embedded servers and packaging them as Docker images, use externalized configuration for immutable artifacts, and make the apps observable with logs, metrics, and traces. Drawing from real examples, you’ll have a roadmap to follow in your journey to the cloud with Spring Boot and Spring Cloud.

Thomas Vitale

November 07, 2020
Tweet

More Decks by Thomas Vitale

Other Decks in Programming

Transcript

  1. Thomas Vitale • Senior Software Engineer at Systematic, Denmark. •

    Spring, Cloud Native, DevOps, Application Security. • Author of “Cloud Native Spring in Action - With Spring Boot and Kubernetes” (Manning). About Me
  2. Agenda • 5 essential migration steps • Application server •

    Containerization • Configuration • Application lifecycle • Logging and monitoring #DevoxxUA @vitalethomas
  3. Application Server - Traditional WAR/EAR artifacts deployed to an application

    server #DevoxxUA @vitalethomas A lica i Se e (T ca , W d , J ) A 1 (WAR) A 2 (WAR) A 3 (WAR) A 4 (WAR)
  4. #DevoxxUA @vitalethomas Application Server - Cloud Native Embedded Server Blocking

    + Servlet API (Tomcat, Undertow, Jetty) Spring Web Embedded Server Non-Blocking + Project Reactor (Netty) Spring WebFlux Serverless Functions (AWS Lambda, Azure Functions, GCP Functions) Spring Cloud Functions
  5. Application Server - Cloud Native Executable JAR artifacts with embedded

    server #DevoxxUA @vitalethomas A 1 ( A ) A 2 ( A ) A 3 ( A ) A 4 ( A )
  6. Working with Docker Images Don’t use fat JARs Leverage layered

    JARs Security Don’t run as root or include secrets Performance Optimize build and runtime performance Maintenance Use up-to-date libraries #DevoxxUA @vitalethomas
  7. Configuration - Cloud Native #DevoxxUA @vitalethomas Spring Boot Properties Property

    files Command line arguments Environment variables Configuration Services Spring Cloud Config Server Spring Cloud Consul Config Spring Cloud Vault Spring Cloud Zookeeper Config Cloud Platform Services Spring Cloud Alibaba Spring Cloud AWS Spring Cloud Azure Spring Cloud GCP Kubernetes Platform ConfigMaps Secrets Environment Variables
  8. Application Lifecycle - Cloud Native Disposable and stateless applications #DevoxxUA

    @vitalethomas Horizontal scaling Disposable instances Fast startup time
  9. Logs - Now and Then From log files to event

    streams #DevoxxUA @vitalethomas Log to files File naming File sizing File rotation Log to stdout Event stream External log collection External log aggregation
  10. Metrics - Now and Then Towards observable applications #DevoxxUA @vitalethomas

    External agents Outside the application Internal agents The application exposes metrics
  11. II. Dependency management I. One codebase, one application III. Configuration,

    credentials, and code V. Design, build, release, run IV. Backing services VI. Stateless processes VIII. Concurrency VII. Port binding IX. Disposability XI. Logs X. Environment parity XII. Administrative processes XIV. Telemetry XIII. API first XV. Authentication and authorization
  12. What’s next? #DevoxxUA @vitalethomas Resilience Resilience4J Spring Cloud Circuit Breaker

    Distributed systems Spring Cloud Gateway Spring Cloud Stream Spring Security OAuth Reactive Spring WebFlux R2DBC Project Reactor Kubernetes Spring Boot Spring Cloud Kubernetes Skaffold
  13. With Spring Boot and Kubernetes • 35% discount code, valid

    for all products in all format • ctwdevoxxukr20 • manning.com • 5 free e-book codes • join Q&A for the raffle Cloud Native Spring in Action