Azure function architecture design for large enterprise

DevBuster007 181 Reputation points
2020-11-07T00:44:11.263+00:00

I am trying to create an integration layer between our client applications and external API's.
This integration layer is to be serverless and designed in Azure function.

I know when we are working with API there are numerous architecture to follow for example: micro services, n-tier etc....

When it comes to server less azure functions in .net core i am not able to find any architecture pattern to follow.
I fear when we have too many functions it will get too clumsy without any architecture defining our development.

For this question as an example let's say i have 10 azure functions in an eCommerce site:

3 for Order management
3 for Catalog management
3 for account management
And 1 for Promos

Now how can i group all these 10 functions in my visual studio.

  1. Should i create one big project and add all these functions inside the project/solution?
  2. Should i create 4 separate projects
  3. And lastly should i have again a separate project for my models, as i would be having lot of model classes?

Please help.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,605 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,611 Reputation points Microsoft Employee
    2020-11-09T13:59:38.893+00:00

    You could leverage domain analysis to model your microservices. Based on this, you would have 4 microservices (function apps in this case) - one each for order, catalog, account, and promos.

    You can read more about Building Microservices on Azure in the Azure Architecture Center docs.

    Coming to your questions on code structure, a single solution with projects for each microservice and a common project for shared code would be ideal. So, a total of five projects, at the least.

    This approach would enable code reuse as required between the function apps. And for a single entry point, you could front your function apps with Azure APIM.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. growth360 81 Reputation points
    2020-11-11T04:15:00.837+00:00

    Well, the answer is - it depends. Microservices require a different approach to designing and building applications. For more information, see Designing a microservices architecture.

    With that said, it also depends if we are talking about an eCommerce store optimization or a general B2B Business.

    During the strategic phase of DDD, you are mapping out the business domain and defining bounded contexts for your domain models. Tactical DDD is when you define your domain models with more precision. The tactical patterns are applied within a single bounded context. In a microservices architecture, we are particularly interested in the entity and aggregate patterns.

    1 person found this answer helpful.
    0 comments No comments