淺談 spring cloud application - apistek

Post on 13-Jun-2022

11 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

淺談 Spring Cloud Application 轉換至 Kubernetes 的心得

黃健旻 Vincent Huang

About Me • 💎 https://jianminhuang.cc 🙋 You can find me via my personal page

• 😎 Wide Range Skill Set Software Engineer

• 🧰 Research, Architecture, Coding, DB, Agile, Ops, Testing, Infra.

• 👨‍💻 Mainly use JVM Languages (Java > Kotlin > Scala) but also ❤🧰

Python, Node.js and Go 🚀

• 🍀 Big fan of 🍎 Hackintosh, 🌈 Corsair RGB products, 💞 Ryan in

KAKAO FRIENDS and ⌨🧰 Mechnical Keyboard

Netflix OSS ● Netflix Open Source Software

– Eureka for Service Discovery

– Zuul for L7 Application Gateway

– Ribbon for Load Balance

– Hystrix for Latency and Fault Tolerance

– Governator for Dependency Injection

– Archaius for Configuration Management

– ...

Spring Cloud Netflix ● Spring Cloud Netflix provides Netflix OSS integrations for Spring Boot apps

through autoconfiguration and binding to the Spring Environment and other

Spring programming model idioms.

Netflix Microservice Architecture

Technique Stack Compare Feature Spring Cloud Kubernetes

Service Discovery Eureka Internal DNS

Gateway Cloud Gateway Istio Ingress Gateway

Traffic Ribbon, Feign Istio Sidecar (Envoy)

Circuit Break, Rate Limit, Retry,

Timeout, Fast Fall

Hystrix Istio

Monitor Dashboard Boot Admin, Zabbix Grafana, Prometheus

Trace Cloud Sleuth, Zipkin jaeger

Config Cloud Config Configmap

Schedule, Job Schedule, Batch Job, CronJob

Infrastructure Tool Ansible, Docker Compose Helm

Client Side Discovery

Server Side Discovery

KubernetesService Mesh (Istio)

Monitor Spring Cloud

Monitor Spring Cloud

Monitor Kubernetes

Spring Boot Actuator Prometheus Grafana

Monitor Kubernetes

Monitor Kubernetes

Monitor Kubernetes

ConfigSpring Cloud

ConfigKubernetes

ConfigKubernetes

Infrastructure Spring Cloud

• Deployment

– IaaS VM

– Docker

• IaC

– Terraform

– Chef, Puppet, Ansible, etc.

Kubernetes

• Resource Type

– Native

– Advance like Service Mesh

• IaC

– Terraform

– Helm

Docker Docker-Compose K8s • Docker -> Docker Compose -> Docker Swarm Kubernetes

• 1D -> 2D -> 3D free style

#!/bin/bash docker run --name member-service … docker run --name report-service … docker run --name wallet-service ...

Docker Docker-Compose K8s version: '3' services: # Member Service # member-service: image: ${repo_url}/member-service:${member_version} ... # Report Service # report-service image: ${repo_url}/report-service:${report_version} ... # Wallet Service # wallet-service image: ${repo_url}/wallet-service:${wallet_version} ...

Spring Cloud

Thinking • Replacement ?

• Pros. and Cons.

Thank you so much for your time

Q & A

References • https://matthung0807.blogspot.com/2019/03/spring-boot-netflix-ossspring-cloud.html

• https://spring.io/projects/spring-cloud-netflix

• https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture

• https://github.com/Jian-Min-Huang/k8s-sample-2020

• https://www.cnblogs.com/fengzheng/p/11242128.html

• https://cloud.spring.io/spring-cloud-config/reference/html/

• https://spring.io/projects/spring-cloud-kubernetes

top related