From 1bc79e6f58c841b6f128aeb3f7369c1c0d0d7662 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Aug 2025 22:58:36 +0330 Subject: [PATCH] Treafik Information Doc --- .../Traefik/1-Information.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Web Servers & Reverse Proxies/Traefik/1-Information.md diff --git a/Web Servers & Reverse Proxies/Traefik/1-Information.md b/Web Servers & Reverse Proxies/Traefik/1-Information.md new file mode 100644 index 0000000..4f2c538 --- /dev/null +++ b/Web Servers & Reverse Proxies/Traefik/1-Information.md @@ -0,0 +1,83 @@ +# 🚦 **Traefik Overview** + +**Traefik** is a **modern reverse proxy** and load balancer that makes deploying, securing, and managing microservices easier. + +--- + +## πŸ”„ **Core Concepts** + +### 1️⃣ **Entrypoint** πŸ›¬ + +* The starting point for **incoming requests**. +* Example: `:80` for HTTP or `:443` for HTTPS. + +### 2️⃣ **Router** 🚏 + +* Decides **where a request should go** based on rules. +* Connects **entrypoints** to **services**. + +### 3️⃣ **Service** πŸ› οΈ + +* The actual application or backend that processes the request. + +--- + +## 🧩 **Routers Details** + +**Routers** can have: + +1. **Middleware** 🧱 + + * Modify requests/responses before reaching the service. + * Examples: + + * `StripPrefix` ➑️ Remove part of the URL path. + * `RateLimit` ➑️ Limit request rate. + * `Auth` ➑️ Add authentication. + +2. **Rules** πŸ“œ + + * Define **how to match a request**. + * Examples: + + * `Host("example.com")` + * `PathPrefix("/api")` + +--- + +## βš™οΈ **Traefik Configuration Types** + +1. **Static Configuration** πŸ—‚οΈ + + * Defines **Traefik’s own behavior**. + * Example: entrypoints, providers, log level. + * Set in `traefik.yml` or CLI args. + +2. **Dynamic Configuration** πŸ“‘ + + * Defines **how Traefik routes requests**. + * Example: routers, services, middlewares. + * Comes from files, Kubernetes CRDs, or Docker labels. + +--- + +## πŸ”— **Request Flow** + +``` +Request + ⬇️ + Entrypoint πŸ›¬ + ⬇️ + Router 🚏 + ⬇️ + Middleware 1 🧱 β†’ Middleware 2 🧱 + ⬇️ + Service πŸ› οΈ +``` + +--- + +## 🌟 **Summary** + +Traefik acts like a **smart traffic cop** πŸš“ for your microservices, ensuring that requests go exactly where they should, with the right rules and transformations applied along the way. +