Traefik API Gateway for Microservices: With Java and Python Microservices Deployed in Kubernetes

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Use Traefik as a load balancer or a reverse proxy for microservices-based architecture. This book covers Traefik integration for microservices architecture concerns such as service discovery, telemetry, and resiliency. The book focuses on building an in-depth understanding of Traefik. It starts with the fundamentals of Traefik, including different load balancing algorithms available, and failure handling for application resiliency. Examples are included for the failure scenarios. TLS support is explained, including scenarios of TLS termination and TLS forwarding. Traefik supports TLS termination using Let's Encrypt. Traefik deployment in prominent microservices ecosystems is discussed, including Docker and Kubernetes. Traefik is a language-neutral component. This book presents examples of its deployment with Java-based microservices. The examples in the book show Traefik integration with Jaeger/Zipkin, Prometheus, Grafana, and FluentD. Also covered is Traefik for Python-based services and Java-based services deployed in the Kubernetes cluster. By the end of the book, you will confidently know how to deploy and integrate Traefik into prominent microservices ecosystems.

Author(s): Rahul Sharma, Akshay Mathur
Publisher: Apress
Year: 2020

Language: English
Pages: 264

Table of Contents
About the Authors
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Introduction to Traefik
Microservice Architecture
Agility
Innovation
Resilience
Scalability
Maintainability
n-Tier Deployment
Four-Tier Deployment
Gateway Characteristics
Application Layer Protocols
Dynamic Configuration
Hot Reloads
Observability
Tracing
Metrics
TLS termination
Other Features
Traefik
Installation
Traefik Command Line
Traefik API
Traefik Dashboard
Summary
Chapter 2: Configure Traefik
Configuration Topics
Introduction to Sample Web Service
Traefik Configuration
Entrypoints
Starting Traefik with CLI Arguments
Starting Traefik with Entrypoint Defined with CLI
Starting Traefik with Entrypoint Defined in Environment Variables
Entrypoint Defined with Config File Traefik.yml in the Current Directory
TOML vs. YAML
Routers
Router Rules
Services
Middleware
Summary
Chapter 3: Load Balancing
HTTP Load Balancer
Round Robin
Sticky Session
Health Check
Weighted Round Robin
Sticky Session
Mirroring
TCP Service
Round Robin
Terminal Delay
Weighted Round Robin
UDP Service
Round Robin
Weighted Round Robin
Summary
Chapter 4: Configure TLS
Quick Overview of TLS
TLS Termination at Traefik
Exposing MongoDB Route on TLS
Let’s Encrypt Automatic Certificate Provisioning
Provisioning TLS Certificates for Public TCP Endpoints
Secure Traefik Dashboard over TLS
Traefik for TLS Forwarding
Summary
Chapter 5: Logs, Request Tracing, and Metrics
Prerequisites
Traefik Configuration
Traefik Logs
Access Logs
Log Filters
Log Fields
Log Rotation
Blacklisting
Request Tracing
Install Zipkin
Integrate Zipkin
Traefik Metrics
Configure Prometheus
Summary
Chapter 6: Traefik for Microservices
Pet-Clinic Application
Application Configuration
Consul Service Registry
Deploy Pet-Clinic
Pet-Clinic UI
Configure Gateway
Service Details
Circuit Breaker
Retries
Throttling
Middleware Chain
Canary Deployments
Summary
Chapter 7: Traefik as Kubernetes Ingress
Traefik as Kubernetes Ingress Controller
Installation of Traefik on Kubernetes
Installing the bookinfo Application
Installing Traefik with Helm
Exploring Traefik Helm Chart
Local Installation
Exposing the bookinfo Reviews Service
Configure Request Tracing with Jaeger
Setup Traefik on DigitalOcean Kubernetes Cloud
TLS Termination on Kubernetes via Let’s Encrypt Certificates
TLS Certificate Limitations with Multiple Traefik Instances
Summary
Index