CNA

CCP2 CNA Service Mesh

Service Mesh Disadvantages of Microservice Architectures Overall System is more complex then in a “big” Application each component needs to implement a new set of cross cutting concerns (Network communication, asychronous requests, distributed state, security, …) large effort to implement seamless and polyglot tendency to uniform frameworks (spring, .net, …) Coordination of API, Protocol Version, migration, … Additional operations overhead (monitorin, logging, debugging, certificate mgmt) 8 common fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite The network is secure Topology does not change There is one Administrator Transport cost is zero The network is homogenous Challanges of microservice Architectures Network Resilience

CCP2 CNA Cloud Patterns

Cloud Patterns Service Registry Circuit Breaker Load Balancer API Gateway Endpoint Monitoring (Health, Metering,…) CNA - Service Registry Endpoint Monitoring Service orientation at scale means using/running many services These Services need to be monitored. a Process could stil be a live but the API is not responding Commands Command description k3d cluster create –config ./lab-setup/k3d-ccp2-config.yaml create cluster Health monitor add this to the deplyoment yaml files: in spec.template.spec.containers livenessProbe: initialDelaySeconds: 20 httpGet: path: /actuator/health/liveness port: 8080 readinessProbe: httpGet: path: /actuator/health/readiness port: 8080 env Variables for URL microservice-shipping.

CCP2 CNA Kubernets LAB

12 factor Applications LAB Overview Cloud-Native application is an application optimized for running in the cloud (IaaS or PaaS) Each phase in the application life-cycle has to be adopted and optimized to run in the cloud typically desigened as a distributed application LAB Used Applications K3S: a lightweigt Kubernetes designed to run on low-ressource systems fully CNCF-certified K3D: a wrapper to run K3s in Docker makes it easy to run single- and multi-node k3s clusters i.

CCP2 Cloud Native Application Composition

Architecture SOA Principles Standardized protocols Abstraction (from service implementation) Loose coupling reusability composability stateless service discoverable services Microservices architecture is a SOA architectural style to develop applications as a suite of “small” services, each running in its own process and communicating with lightweight mechanisms (REST APIs or Messaging). They are built around business capabilities following the “do one thing well” principle. Services are highly decoupled (yet composed) and focus on doing a small task