Implementing Multiple durable functions to use different subsets of a superset of functions. Scaling?

Chris Phillips 1 Reputation point
2020-06-25T19:00:51.947+00:00

We have setup a series of [Azure Functions] sub-Functions: {A, B, C, D, E, ...}.
We have clients who use varying subsets of these functions in various orders:

  • client1 uses {A -> C -> E}
  • client2 uses {D -> E -> B}

My goal is to setup each client's logic within a durable function
I would like to avoid duplicating code within our environment and ensure that we can update any sub-function once and have that update cascade to all clients

Would the best design here be to setup all components - (Durable Functions, and Functions) within a single app service?
Would it be possible to scale a single clients durable function without scaling other clients?
I expect there to be hundreds of clients, and hundreds of sub-functions. Is this ideal on a single app service?

Thanks!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,110 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,913 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,636 Reputation points Microsoft Employee
    2020-06-30T11:12:49.847+00:00

    Would the best design here be to setup all components - (Durable Functions, and Functions) within a single app service?

    While this would be fine for a few customers with less load, I wouldn't recommend this approach. (I believe you mean a single function app here and not app service)

    Instead, it would be best to split the sub-functions into separate function apps. You could group them together into smaller groups too if required. These sub-functions would be exposed as Durable Async HTTP APIs.

    The client specific functions would leverage the Durable HTTP Client to make calls to these sub-functions based on their scenario.

    Would it be possible to scale a single clients durable function without scaling other clients?

    If they are all in deployed as a single function app, then no. But the approach that I shared above would for the client functions. The sub-functions would scale based on how often they are called.

    I expect there to be hundreds of clients, and hundreds of sub-functions. Is this ideal on a single app service?

    This would completely depend on how much load is present and size of this app service. You can surely deploy multiple function apps into a single app service for the above approach to work.

    You could also consider the newer Premium Plan which scales similar to the consumption plan but has higher compute options.

    0 comments No comments

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.