Consuming OnPrem SignalR service from Azure App service/Function app

Solution 1:

I believe that you need information regarding:

  1. Consume on-prem signal R service from Azure Functions/Az App Service
  2. Azure Functions/Az App Service can be consumed by client apps hosted in another cloud provider

One of the workaround is to do for the above is:

Consume On-Prem signal R service from Azure Functions / Azure App Service

SignalR Service is a fully managed Azure Service that simplifies the process of adding real-time web functionality to applications over HTTP. This real-time functionality allows the service to push messages and content updates to connected clients using technologies such as WebSocket. As a result, clients are updated without the need to poll the server or submit new HTTP requests for updates.

So, You can consume this SignalR Service using Azure Functions. All you need to do is send messages to the Azure Functions, which will send it to SignalR who will broadcast to listeners.

There is a Microsoft Documentation provided as step-by-step to achieve the above.

Azure Functions/Az App Service can be consumed by client apps hosted in another cloud provider

I'm not sure about the client app from another cloud provider but the workaround of consuming the azure function by the client application is like:

If the client application is ASP .NET Core Web App, add the Azure Function URL with Code in appsettings.json file:

  "AppSettings": {
  "AzureFunctionURL": "https://[AppName].azurewebsites.net/api/[FunctionName]?code=<API_Key>"
  }

And the step-by-step instructions with an example is provided in an article.

For more information, please refer these documentations:

  1. Would i need to set up another Hub on the api side? - https://docs.microsoft.com/en-us/azure/azure-signalr/signalr-quickstart-dotnet-core
  2. Real-time serverless applications with the SignalR Service bindings in Azure Functions
  3. Enable automatic updates in a web application using Azure Functions and SignalR Service