Share
Embed
Per Anhalter zu Cloud-nativen API Gateways
Gute APIs sind das Herzstück erfolgreicher digitale Produkte und Cloud-nativer Anwendungen. Doch für komplexe Systeme mit zahlreichen Abnehmern ist die ordnungsgemäße Verwaltung dieser APIs von größter Bedeutung. Das API-Gateway-Muster ist bekannt und etabliert, um Traffic Management, Rollout-Szenarien, Versionierung, Zugriffskontrolle und Diagnostizierbarkeit zu regeln.
In diesem Vortrag werden wir das Cloud-native API-Gateway-Ökosystem näher betrachten: Ambassador, Gloo, KrakenD, Kong, Tyk et al. Aber welches davon ist das richtige für den Einsatz im nächsten Projekt? Lasst es uns herausfinden.
M.-Leander Reimer PRO
April 22, 2021
Transcript
30 slides
-
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf PER ANHALTER ZU CLOUD-NATIVEN API GATEWAYS -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 3 https://imgur.com/gallery/LGAZEqu The Earl y Code Monkey The Monolith -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 4 Monolithic Vintage System Users system.example.com -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 5 autonomous bounded contexts loosely coupled stateless makeameme.org -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 6 Users Monolithic Vintage System A Shared PaaS A Namespace Service A system.example.com service-a.default.example.com Route -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 7 Users Monolithic Vintage System A Shared PaaS A Namespace Service A system.example.com service-a.default.example.com Route Service B Route service-b… -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 8 Users Monolithic Vintage System A Shared PaaS A Namespace Service A system.example.com service-a.default.example.com Route Service B Route service-b… Service C Route service-c… -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 9 Users Monolithic Vintage System A Shared PaaS A Namespace Service A’ system.example.com service-a.default.example.com Route Service B Route service-b… Service C' Route service-c… 3rd Party Apps -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 10 Users Monolithic Vintage System A Shared PaaS A Namespace Service A’ system.example.com service-a.default.example.com Route Service B Route service-b… Service C' Route service-c… 3rd Party Apps B Namespace Service X Service Y Service Z’ Unreliable Legacy Systems SOAP gRPC -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 11 Users Monolithic Vintage System A Shared PaaS A Namespace Service A’ system.example.com service-a.default.example.com Route Service B Route service-b… Service C' Route service-c… 3rd Party Apps B Namespace Service X Service Y Service Z’ Unreliable Legacy Systems SOAP gRPC Route Internal Systems -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 12 https://thenewstack.io/history-service-mesh/ APIs sind das Herzstück erfolgreicher, digitaler Produkte. Das richtige Management der APIs von Beginn an ist essentiell, um den Big Ball of Mud zu vermeiden. -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 13 APIs sind das Herzstück erfolgreicher, digitaler Produkte. Das richtige Management der APIs von Beginn an ist essentiell, um den Big Ball of Mud zu vermeiden. https://thenewstack.io/history-service-mesh/ -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 14 Users Monolithic Vintage System A Shared PaaS A Namespace Service A Service B Service C 3rd Party Apps B Namespace Service X Service Y Service Z Unreliable Legacy Systems SOAP API Gateway Backend for Frontend Internal Systems API Gateway API Proxy -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 15 API Gateways sind wie das Façade Pattern für Cloud Native Application Design und Microservice Architekturen -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf • Tra ffi c Management: Path, Header, Host based Routing, Path Rewrite • Rollout and Deployment: A/B Deployment, Canary Release, et.al. • QoS and Resiliency: Circuit Breaker, Retry, Timeouts, Rate Limiting • Security: AAA, Terminate TLS, Support for JWT and JWKS, Open ID, … • Protocol Translation: XML to JSON, gRPC to JSON, … • Transformation: Fan Out / Collect, B4F, Versioning, GraphQL, … • Observability: Logging Integration, Monitoring, Distributed Tracing 16 -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf 17 W E N S Ingress Egress API Gateways für Nord-Süd Kommunikation Service Meshes für Ost-West Kommunikation -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf API Gateways in a Nutshell • Vorteile • Abstraktion der internen Anwendungsstruktur • Vereinfachter Client Code • Einfaches Rollout und Deployment, Versionierung, … • B4Fs reduzieren die Anzahl benötigter Client-Server Calls 18 • Nachteile • Weiterer hoch-verfügbarer Infrastruktur-Baustein der betrieben werden muss • Wird schnell zum DevOps Flaschenhals im Fall von zentralem Betrieb • Business Logik im API Gateway führt versehentlich zu einem ESB -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf Mögliche Kriterien für einen Vergleich • Maturity: Gute und aktive Community, keine Issues, häu fi ge Releases • License: Open Source oder Commercial • Supported Features: Tra ffi c Management, Deployment, Security, Translation, Transformation, QoS, Resiliency • DevOps Friendly: Einfaches Setup und Betreibbarkeit, Plattform, CI/CD und GitOps Support, Documentation • Performance: Kleiner Overhead, hoher Durchsatz, Skalierbarkeit, Verfügbarkeit • Observability: Möglichkeiten zur Logging, Monitoring, Tracing Integration 19 -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf Vier Kategorien von API Gateways A. API Management Solutions B. Build Your Own API Gateway C. Service Proxies D. Cloud Native API Gateways 22 -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf A. API Management Solutions 23 • Ausgewachsene API Management Lösungen: Kong, Tyk, Mulesoft, 3scale, Gravitee.io, Apigee, … • Machen Sinn für Enterprise Use Cases. Häu fi g kostenp fl ichtig. Einige bieten abgespeckte Open Source Varianten. • Bieten zusätzliche features wie API Kataloge, Developer Portale, API Key Management, Bezahlung oder Integration in EAM Lösungen • Für gewöhnlich zentral deployed und betrieben für alle Applikationen und Produkte im Unternehmen • Es gilt die 80/20 Regel (wie mit jedem COTS Produkt). -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf B. Build Your Own API Gateway 24 • Zahlreiche Frameworks stehen hier zur Auswahl: Net fl ix Zuul 2, Spring Cloud Gateway, Node, Vert.x, Ballerina, Java EE 8, Camel, Express Gateway, … • Bieten viel Flexibilität, alles was man programmieren kann geht! • Aber: das Team muss das API Gateway entwickeln, warten und betreiben. Das ist Aufwand und birgt Risiken! -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf C. Service Proxies 25 • Viel Auswahlmöglichkeiten: Apache, HA Proxy, Nginx, OpenResty, Trae fi k, Envoy, … • Leichtgewichtig und oft einfach in der Kon fi guration und Nutzung • Die unterstützte Funktionen unterscheiden sich teilweise signi fi kant -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf D. Cloud Native API Gateways 26 • Wenige Möglichkeiten: KrakenD, Ambassador Edge Stack (Emissary), Gloo, AWS API Gateway, … • Basieren häu fi g auf Envoy mit zusätzlichen Erweiterung und Plugins • Bieten eine tiefe Integration in Cloud-native Plattformen (K8s) und Cloud Provider -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf API Gateway Composition 27 The Enterprise API Management Solution On-Premise Servers Service Proxy Some Public Cloud Managed K8s Cloud Gateway A Shared PaaS A Namespace Custom Gateway Proxy Legacy Backend -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf DEMOS 28 https://github.com/lreimer/hitchhikers-guide-api-gateways https://github.com/lreimer/hands-on-krakend -
// betterCode() API 2021 // Per Anhalter zu Cloud-nativen API
Gateways // @LeanderReimer #cloudnativenerd #qaware @bettercodeconf THE ANSWER TO LIFE, UNIVERSE, THE CLOUD, AND API GATEWAYS. 29 42.