Achraf Ben Alaya
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
SUBSCRIBE
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
No Result
View All Result
Achraf Ben Alaya
No Result
View All Result
ADVERTISEMENT
Home

Migrate and modernize your applications on Azure – Part 2.0 (Proxy Function)

achraf by achraf
April 3, 2021
in Azure, Blog, Cloud
2 min read
0
Migrate and modernize your applications on Azure
0
SHARES
749
VIEWS
Share on FacebookShare on Twitter

What are Azure Function Proxies?

Azure Function Proxy are quite similar to Azure API management but they are not the same ,they allow us to define a single API surface for multiple function apps.

Azure Function Proxy is a unified API layer (façade) on top of Azure functions hosted inside the Application Service container. A proxy exists as a set of additional HTTP endpoints in front of functions based apps. One important note, proxy calls are billed the same way as Azure Functions. Because proxy is essentially another function, that is pre-warmed and always ready to receive requests.
Now any function app can define an endpoint that serves as a Reverse Proxy for another API. The endpoint can be a function app or it can be anything else.

But Why we need proxy Function ?

In a high load enterprise solution we use APi Management but since we are working with very simple projects and for the best practice for medium and low load solution the best choice is to use azure Functions Proxy .
Azure Function Proxies come to the rescue by providing a unified URI (Uniform Resource Identifier) which the client can actually consume. In the meantime, we can abstract all of the different function apps or other APIs and it would also enable us to build our API at a faster rate.

Creating Our proxy

First of all we need to create a new azure function from the portal and after it’s created we need to :

  1. Navigate to the function app in the portal.
  2. Click New proxy.
  3. Provide a Name for your proxy, such as “HiProxy”.
  4. Set the Route template to /api/Task.
  5. In Backend URL, enter the URL for the HttpTrigger you created on the backend app.
    Click Create.
  6. Copy the Proxy URL, and then use Postman or the HTTP client of your choosing, and send a GET request that URL.

In our case this is what the proxy will look like :

{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"/api/Task": {
"matchCondition": {
"route": "/api/Task",
"methods": [
"POST"
]
},
"backendUri": "http://proxyfunction01.azurewebsites.net/api/CreateTodo"
},

"Collection redirect": {
"matchCondition": {
"route": "/api/Task",
"methods": [
"GET",
"OPTIONS"
]
},
"backendUri": "https://to-do-api.azurewebsites.net/api/Task"
},

"Item redirect": {
"matchCondition": {
"route": "/api/Task/{id}",
"methods": [
"GET",
"OPTIONS",
"DELETE",
"PUT"
]
},
"backendUri": "https://to-do-api.azurewebsites.net/api/Task/{id}"
}


}
}

In order to understand all the steps you can enjoy the below video

 

ShareTweet
Previous Post

Migrate and modernize your applications on Azure – Part 2.0 (Azure Functions)

Next Post

Auto Post and Schedule Tweets & Linkedin using Azure Logic Apps

Related Posts

Switch to Azure Container Registry from Docker Hub
Azure

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
132
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
229
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022
102
How to setup nginx reverse proxy for aspnet core apps with and without  Docker compose
Azure

How to setup nginx reverse proxy for aspnet core apps with and without Docker compose

November 23, 2022
153
Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁
Blog

Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁

May 28, 2022
107
Generating report for SSL Certificates for Websites with PowerShell
Azure

Generating report for SSL Certificates for Websites with PowerShell

April 10, 2022
386
Next Post
Auto Post and Schedule Tweets & Linkedin using Azure Logic Apps

Auto Post and Schedule Tweets & Linkedin using Azure Logic Apps

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Terraform

Certifications

Microsoft certified trainer (MCT)

Recommended

Azure Static Web App Service

Azure Static Web App Service

September 27, 2020
548
Achraf First Post

Achraf First Post

April 26, 2020
286
The easiest way to deploy a website to Azure with Azure App Service

The easiest way to deploy a website to Azure with Azure App Service

April 21, 2020
520
Azure Tips

Azure Tips

April 28, 2020
311
Finally Azure Static Web Apps no more in Preview!

Finally Azure Static Web Apps no more in Preview!

May 15, 2021
556
Azure Automation :  How to create PowerShell Runbook

Azure Automation : How to create PowerShell Runbook

February 4, 2021
594
Facebook Twitter LinkedIn Youtube
Switch to Azure Container Registry from Docker Hub

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022

Categories

  • Apps (1)
  • Azure (39)
  • blazor (2)
  • Blog (62)
  • c# (7)
  • Cloud (37)
  • Dapr (4)
  • docker (3)
  • Games (1)
  • General Tips & Fix (1)
  • Motivation (3)
  • motivation (2)
  • News (9)
  • Resume (1)
  • sql (4)
  • Tricks, Tips and Fixes (3)
  • xamarin (5)
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume