Communicating with Functions across Function Apps using Durable Functions

Nick2035 71 Reputation points
2022-06-01T03:41:52.693+00:00

Just double checking my approach here...

Consider that you're using Azure Functions as a microservices platform -- you're drawing a boundary between separate concerns and making each one its own Function app.

Consider that you have a primary workflow modeled with Durable functions in one of the Apps that need to query data from multiple services (on the backend, not frontend). Can we use Durable functions CallHttpAsync to achieve this, or is this a better-preferred solution to cross communicate with Functions apps?

For example.

App1:
Durable Functions Orchestrator:
CallActivityAsync("some local function")
CallHttpAsync(some function from App2)
CallHttpAsync(some function from App3)
CallActivityAsync("some local function")
CallActivityAsync("some local function")

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,912 questions
0 comments No comments
{count} vote

Accepted answer
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2022-06-01T16:08:28.15+00:00

    Hi @Nick2035 ,

    Thanks for reaching out to Q&A forum.

    Durable functions would be a good solution to your requirement. Durable functions are stateful and long running. As you are aware of, you can use orchestrators, sub orchestrators and activity functions.

    Looking at the example you have provided, it can be achieved using durable function.

    Orchestrator would call the activity functions. The activity functions can call the other functions or do I/O operations. Starting with Durable Functions 2.0, orchestrations can natively consume HTTP APIs by using the orchestration trigger binding.

    Consume Http Api : https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-features?tabs=csharp#consuming-http-apis

    Before starting the development, I would suggest you to look into the orchestrator code constraints

    I hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    3 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.