Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (2024)

Overview

Path-based routing is a technique used in networking and web application routing to direct incoming traffic to different destinations based on the path component of the Uniform Resource Locator (URL).
In path-based routing, the URL path is used as a routing criterion to direct the request to the appropriate destination. For example, a web server or a load balancer may use the path component of the URL to route requests to different backends or services.

Path-based routing can direct requests for the web interface to a different backend or service then requests for the API, thus allowing for more granular control over traffic routing.

It is commonly used in modern web applications, especially those built using a microservices architecture, to enable flexible and efficient routing of traffic to different services based on the application’s specific needs.

Introduction Container App

A container app is an application that is packaged and deployed using containerization technology. Containerization is a way to package an application along with its dependencies into a self-contained unit called a container. Containers can be easily moved from one environment to another, making them ideal for deploying applications to the cloud.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment

Get Started

Step-by-Step Guide

  1. Create a container app
  • In the Azure portal, search for the container app
  • Click on Create Container app
  • Choose your resource group
  • Enter Container app name – mycontainerapp1
  • Choose a region
  • Click on Create New Container Apps Environment
  • Under the Basic and Monitoring tab, keep it default.
  • Under Networking tab
  • Select yes Use your virtual network
  • Select your Virtual network and infrastructure subnet and click on Create
  • Click on Next: Appsettings
  • Choose the image, and ingress should be enabled
  • Click on Review + Create
  • And click on create

Create One more Container app the same way on the same Virtual network and region

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (1)

Application Gateway

Azure Application Gateway is a web traffic load balancer and application delivery controller (ADC) that provides high scalability, security, and availability for web applications.

It is a fully managed service in Azure that provides several advanced features, such as SSL offloading, SSL termination, URL-based routing, path-based routing, session affinity, and web application firewall (WAF) capabilities.

Application Gateway enables you to route traffic to multiple backend servers based on various routing rules, such as cookie-based affinity, session persistence, and round-robin load balancing. It can also perform health checks on your backend servers and automatically remove unhealthy servers from the pool.

With Application Gateway, you can manage and optimize traffic to your web applications, improve application performance and availability, and protect your applications from common web application attacks.

2. Create and configure Application Gateway

  • Click on Create Application gateway
  • Choose your resource group
  • Enter Container app name – mycontainerapp1
  • Choose a region – Select the region where your Container Apps is provisioned.
  • Select Standard V2 for tier
  • Enable autoscaling – Leave as default
  • Availability zone – Choose None. Availability Zones are advised for higher availability in production environments.
  • HTTP2 – keep it default.
  • Choose the virtual network that your container app is associated with.
  • Click on Manage subnet configuration
    select +Subnet Enter the name of the subnet
  • Keep the default values for the remaining parameters.
  • To create the new subnet, choose Save.
  • Create a subnet for the application gateway.
  • Close the Subnets window. To return to the Create application gateway window

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (2)

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (3)

  • Click on Next: Frontends to proceed.
  • On the Frontends tab
  • Select Public for Frontend IP address type
  • In Public IP address – Select Add new. Enter the name of your frontend and select OK

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (4)

  • Click on Next: backends to proceed.
  • The backend pool is used to direct requests to the right backend servers.
  • The following resources can be combined to create backend pools:
  1. NICs
  2. Public IP addresses
  3. Internal IP addresses
  4. Virtual Machine Scale Sets
  5. Fully qualified domain names (FQDN)
  6. Multi-tenant back-ends like Azure App Service and Container Apps
  • Here we create a backend pool that targets the container app.
  • Create a backend pool that targets your container app.
  • Select Add a Backend pool
  • Select No to Add backend pool without targets
  • Target type – Select IP address or FQDN.
  • Target – copy the Application Url from the Overview window of the Container App and remove the https://
  • Select Add

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (5)

  • Click on Next: Configuration tab
  • Select Add a routing rule
  • Enter the name
  • Enter priority 1
  • Under the Listener tab, Enter Listener name
  • In Frontend IP – Select Public
  • Protocol – Pick HTTPS. HTTP can be chosen if you don’t have a certificate
  • Select Basic for Listener Type
  • Error page URL – Leave as No

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (6)

  • Toggle to the Backend Targets tab
  • Target type – Select the backend pool that is created earlier
  • Backend settings – Select Add new
  • Enter Backend settings name, Backend protocol – select HTTP
  • Select Yes for Override with a new hostname
  • Select Pick hostname from the backend target
  • Select Add,

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (7)

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (8)

  • Select Add to save the path rule and return to the Add a routing rule
  • Repeat to add another rule for images1.
  • Select Add to add the routing rule and return to the Configuration
  • Select Next: Tags and then Next: Review + Create.
  • In the Overview tab of the application gateway, copy the public IP address and paste it into the browser.
  • Change the URL to http://<ip-address>:80/images replace the <ip-address> with the public IP address of application gateway
  • The listener on port 80 routes the request to the Images backend pool

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (9)

  • Change the URL to http://<ip-address>:80/images1 replace the <ip-address> with the public IP address of application gateway
  • The listener on port 80 routes the request to the Images1 backend pool

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (10)

Comparison between the Azure Container app and AWS ECS

Azure Container App and AWS Elastic Container Service (ECS) are container orchestration platforms, but they have some differences in architecture, deployment, and management.

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (11)

Conclusion

Hence deploying a container app behind an application gateway as a backend pool can be a powerful solution for modern application delivery and deployment, providing improved performance, scalability, and security for your application.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment

Get Started

About CloudThat

CloudThatis also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to builda robustcloud computing ecosystem by disseminatingknowledge on technological intricacies within the cloud space.Our blogs, webinars,case studies, and white papersenable all the stakeholders in the cloud computing sphere.

Drop a query if you have any questions regarding Azure Container App and I will get back to you quickly.

To get started, go throughourConsultancypageandManaged Services Packagethat isCloudThat’sofferings.

FAQs

1. What are the benefits of using a container app behind an application gateway?

ANS: – Using a container app behind an application gateway can provide several benefits, including improved performance, scalability, and security, by leveraging the advanced networking features of the application gateway.

2. How do I monitor the traffic and performance of the container app behind the application gateway?

ANS: – You can monitor the traffic and performance of the container app behind the application gateway by using the application gateway logs and metrics, which provide detailed information on request rates, response times, error rates, and status codes.

Simplifying Container App Management with Path-Based Routing in Azure Application Gateway (2024)

FAQs

What is path based routing in Azure App Service? ›

Configure path-based routing
  • Create a storage account to store the NGINX configuration file: ...
  • Create a file share in the storage account: ...
  • Upload the NGINX configuration file to the file share: ...
  • Get the access key for the storage account: ...
  • Configure the file share in the Container Apps environment:
Feb 29, 2024

How to fix 403 forbidden Microsoft Azure Application Gateway v2? ›

How To Fix a 403 Forbidden Gateway in Azure
  1. Clear Your Browser Cache and History.
  2. Check Your Firewall Settings.
  3. Reconfigure Access Rules.
  4. Follow Upload Size Limits.

How does path-based routing work? ›

Path-based routing is one of the unique features offered by Application Load Balancer. Path-based routing is also referred to as URL-based routing. The Application load balancer will forward the requests to the specific targets based on the Rules configured in the load balancer.

What is URL path based routing rule? ›

URL Path Based Routing allows you to route traffic to backend server pools based on URL Paths of the request. One of the scenarios is to route requests for different content types to different backend server pools.

What is the difference between host based and path based routing? ›

Path-Based Routing: This method routes traffic based on the URL path. For example, traffic to example.com/app1 could be routed to a different target group than traffic to example.com/app2 . Host-Based Routing: This strategy directs traffic based on the domain name of the request.

What is the default route for Azure gateway? ›

By default, Azure routes traffic between subnets. You don't need to define route tables or gateways for Azure to route traffic between subnets. Though a virtual network contains subnets, and each subnet has a defined address range, Azure doesn't create default routes for subnet address ranges.

How to resolve 403 Forbidden error in Azure? ›

Here are a few things you can try to resolve the issue:
  1. Check your permissions: Make sure you have the appropriate permissions to access Azure Active Directory. ...
  2. Check your network settings: Ensure that you are not behind a proxy server or firewall that is blocking your access to Azure Active Directory.
Feb 28, 2023

How do I fix API 403 error? ›

Identify what's causing the error

Note: HTTP APIs don't support execution logging. To troubleshoot 403 errors returned by a custom domain name that requires mutual TLS and invokes an HTTP API, you must do the following: 1. Create a new API mapping for your custom domain name that invokes a REST API for testing only.

How do I overcome error 403? ›

These solutions will help you resolve and prevent potential downtime, keeping your site running smoothly.
  1. Use Hostinger AI Troubleshooter. ...
  2. Clear Your Browser Cache and Cookies. ...
  3. Disable VPN Temporarily. ...
  4. Disable CDN Temporarily. ...
  5. Scan for Malware. ...
  6. Restore the . ...
  7. Reset File and Directory Permissions. ...
  8. Disable WordPress Plugins.
May 17, 2024

Which Load Balancer supports path-based routing? ›

Only ALB operates at layer 7 and partially CLB, thus it can do path based routing. So you either have to use ALB, or maybe try to look for a third party load balancer which you can deploy on AWS.

What is the best path selection routing? ›

The best path is selected by a routing protocol based on the value or metric it uses to determine the distance to reach a network. A metric is the quantitative value used to measure the distance to a given network. The best path to a network is the path with the lowest metric.

How to configure path-based routing with ingress on kubernetes cluster? ›

  1. Step-01: Introduction.
  2. Kubernetes Manifests.
  3. Step-02: Create Nginx App1 & App2 Deployment & Service.
  4. Step-03: Update Health Check Path Annotation in User Management Node Port Service.
  5. Step-04: Create ALB Ingress Context path based Routing Kubernetes manifest.
  6. Step-05: Deploy all manifests and test.
  7. Step-06: Clean Up.

What is an Azure application gateway? ›

Azure Application Gateway is a web traffic (OSI layer 7) load balancer that enables you to manage traffic to your web applications. Traditional load balancers operate at the transport layer (OSI layer 4 - TCP and UDP) and route traffic based on source IP address and port, to a destination IP address and port.

What is an example of a path URL? ›

A path is the unique, last part of the URL for a specific function or piece of content. For example, for a page whose full URL is http://example.com/node/7, the path is node/7. Here are some examples of paths you might find in your site: node/7.

What is the difference between path and URL? ›

To sum up, the difference between the Page URL and Page Path is that Page URL returns almost the entire URL while Page Path returns the value that comes after the hostname (but before the query parameter). Here's an image that should give you a better understanding.

How do routing paths work? ›

A router determines the path data takes when it moves from a source to a destination. It tries to find the best path by analyzing network metrics such as delay, capacity, and speed.

What is the difference between route map and policy based routing? ›

This is PBR calling the route-map to apply the policy. Route-maps are used in BGP peerings to assign routing policies, distribute lists, and for PBR. Route-maps are the mechanism that identifies the traffic and contains instructions, PBR, Distribute lists, etc., are the platforms that make use of Route-maps.

What is the difference between route based and policy based Azure gateway? ›

Policy-based VPNs encrypt and encapsulate a subset of traffic flowing through an interface according to a defined policy (an access list). A route based VPN creates a virtual IPSec interface, and whatever traffic hits that interface is encrypted and decrypted according to the phase 1 and phase 2 IPSec settings.

What is path determination in routing? ›

The path determination function enables a router to evaluate the available paths to a destination and to establish the preferred handling of a packet. Data can take different paths to get from a source to a destination. At layer 3, routers really help determine which path.

Top Articles
200+ High DA Free Social Bookmarking Sites List 2024
How to Prepare for an Interview at a Hedge Fund (or Family Office) - TrendUp Now
Craigslist Houses For Rent In Denver Colorado
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Tabc On The Fly Final Exam Answers
Craigslist Furniture Bedroom Set
Farmers Branch Isd Calendar
Mylife Cvs Login
Snarky Tea Net Worth 2022
Lantana Blocc Compton Crips
12 Best Craigslist Apps for Android and iOS (2024)
Missing 2023 Showtimes Near Landmark Cinemas Peoria
Oriellys St James Mn
Hillside Funeral Home Washington Nc Obituaries
Wordle auf Deutsch - Wordle mit Deutschen Wörtern Spielen
MindWare : Customer Reviews : Hocus Pocus Magic Show Kit
Idaho Harvest Statistics
Overton Funeral Home Waterloo Iowa
Ups Access Point Lockers
Palm Springs Ca Craigslist
Faurot Field Virtual Seating Chart
Ge-Tracker Bond
Jeffers Funeral Home Obituaries Greeneville Tennessee
Yonkers Results For Tonight
Gas Buddy Prices Near Me Zip Code
Del Amo Fashion Center Map
Valic Eremit
Mdt Bus Tracker 27
EVO Entertainment | Cinema. Bowling. Games.
Ou Football Brainiacs
Radical Red Ability Pill
Yale College Confidential 2027
Sandals Travel Agent Login
Maisons près d'une ville - Štanga - Location de vacances à proximité d'une ville - Štanga | Résultats 201
Jazz Total Detox Reviews 2022
Roseann Marie Messina · 15800 Detroit Ave, Suite D, Lakewood, OH 44107-3748 · Lay Midwife
Neteller Kasiinod
Happy Shuttle Cancun Review
Sony Wf-1000Xm4 Controls
Used Safari Condo Alto R1723 For Sale
Bratislava | Location, Map, History, Culture, & Facts
The Attleboro Sun Chronicle Obituaries
Wordle Feb 27 Mashable
Minterns German Shepherds
Walmart Front Door Wreaths
Smoke From Street Outlaws Net Worth
Gear Bicycle Sales Butler Pa
Subdomain Finer
Www Extramovies Com
La Fitness Oxford Valley Class Schedule
Honeybee: Classification, Morphology, Types, and Lifecycle
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 6004

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.