Part 5️⃣ - Ocelot Gateway API๐ Build .NET 8 eCommerce Microservice ๐with API Gateway, Rate Limiting, Caching & more ๐งบ
Ocelot Configuration File - ocelot.json This configuration file sets up routes for an API Gateway using Ocelot. The gateway manages requests for three main services: Authentication, Product, and Order APIs. Here's a detailed description of each section: Authentication Routes Path : /api/authentication/{everything} Host : localhost:5000 Methods : GET, POST, PUT, DELETE Rate Limiting : Allows 1 request per 10 seconds. Product Routes Get All Products Path : /api/products Host : localhost:5001 Method : GET Caching : 60 seconds with custom header eCommerce-Caching-Control . Get Product By ID Path : /api/products/{id} Host : localhost:5001 Method : GET Caching : 60 seconds with custom header eCommerce-Caching-Control . Modify Products Path : /api/products/{everything} Host : localhost:5001 Methods : POST, PUT, DELETE Authentication : Bearer token required. Order Routes Get All Orders Path : /api/orders Host : localhost:5002 Method : GET Caching : 20 seconds with custom header eCommerce-C