Skip to main content

๐Ÿš€Master User Authentication in .NET 8 Web API Email Confirmation, Password Reset, 2FA & Lockout with JWT & Identity๐Ÿ”

Part1️⃣ - Configuring Yarp | ๐Ÿš€ Mastering Microservices: Using YARP as Your Ultimate API Gateway & Reverse Proxy! ๐Ÿ”—๐Ÿ’ก

 


Description

The BasicConfiguration class in the ApiGateway.Configurations namespace provides the configuration settings for YARP (Yet Another Reverse Proxy). This class defines the routing and clustering configurations required to direct API requests to appropriate backend services.

Routes Configuration

  • PRODUCT API

    • Route ID: product-route
    • Cluster ID: product-cluster
    • Match: Configures the URL path pattern to route requests with paths starting with /api/product/{**catch-all} to the product-cluster.
  • ORDER API

    • Route ID: order-route
    • Cluster ID: order-cluster
    • Match: Configures the URL path pattern to route requests with paths starting with /api/order/{**catch-all} to the order-cluster.

Clusters Configuration

  • Product Cluster

    • Cluster ID: product-cluster
    • Destinations: A dictionary defining the destination for the product-cluster. It maps to the backend service located at http://localhost:5001.
  • Order Cluster

    • Cluster ID: order-cluster
    • Destinations: A dictionary defining the destination for the order-cluster. It maps to the backend service located at http://localhost:5002.

This configuration ensures that API requests are appropriately routed to their respective backend services based on the defined paths, providing a streamlined and organized approach to API gateway management with YARP.

Comments

Popular Posts

Complete Employee Management System | .NET 8 Blazor Wasm & Web API - Perform CRUD, Print, PDF etc..

.NET 8 Clean Architecture with Blazor CRUD, JWT & Role Authorization using Identity & Refresh Token๐Ÿ”ฅ

Employee Management System | .NET 8 Blazor Wasm- Profile & real-time data retrieval. Update 1