In this series of articles i will talk you through creating a serverless API using API Management, Logic Apps and Azure function.

This is first article of this series. let’s skim through different concepts.

What is Serverless computing?

Serverless architecture is becoming very popular nowadays. In serverless computing, your code runs on any dynamically allocated server in the data centre and you will only pay for resource utilization during the execution of your code. You don’t need to worry about infrastructure cost or maintenance cost and time of servers.

Serverless computing makes really easy to deploy microservices code and you will have an option to scale one service instead of the server.

What is Azure API Management?

Azure API management is a scalable API gateway offering of Azure that serves as a reverse proxy for all your APIs. “API Gateway” in AWS (Amazon) and Google cloud are similar products.

You can use one gateway of all your APIs or microservices (WebApps, Azure functions or Logic Apps). Few benefits of using Azure API management

  • One authentication for all your APIs
  • You can integrate with Azure AD to authenticate and authorize API users.
  • Response caching (External Radius caching also supported)
  • Manage/define API usage quota per user and per service.
  • Manage/define policies per user or per service.
  • Painless documentation using Developer portal.
  • Default Mock option to segregate front-end and back-end.
  • You can also manipulate request before sending to backend service.
  • You can monitor health check of your APIs
  • You can see request/response, error code analytics in nice visual graphs.

What are Logic Apps

Logic Apps are one of the most existing products in the Azure platform. Logic Apps let user Schedule, Automate & orchestrate tasks.

In logic Apps you will create work flows (using on-page designer or using ARM) just like your bussiness flows and you can easily automate them as well.

For example, the system needs to access a third party API to get information. After that process, this information and store in a database or send to some other service. You can do this workflow in LogicApps within few minutes.

Few benefits to using LogicApp

  • LogicApp trigger through an event. This event can be an Http request, change in a specific database table, blob storage, Scheduler, Office 365 etc. That makes LogicApp externally flexible and power to use.
  • At the time of writing this blog, LogicApps has more than 200+ connectors available to integrate.
  • Logic Apps are scalable and very lightweight.
  • Workflow designs are mostly drag & drop.
  • It’s serverless, you will pay what you use. Easy to create and do not need any upfront cost.

What are Azure functions

Azure functions are the perfect example of the KISS principle (Keep it stupid simple). These are a piece of code that runs, do business logic execution and return the result. It runs on serverless infrastructure so you only have to pay what you use and the majority of times execution of these functions are totally free because of free execution quota in Azure.

  • Azure Functions can be trigger by an event such as Http request, blob storage, database, event hub, service bus or azure queue etc.
  • Azure functions are quick to build, easy to deploy and maintain and very powerful to run.
  • Azure functions are scalable and lightweight.
  • Azure functions are essentials in building serverless microservices on Azure.

What’s Next …

In next article of this series we will

  1. Create an API in Azure API management
  2. Mock API response
  3. Test this API in Postman & Developer portal
  4. Update Products in API Management
  5. Update/Manage API subscriptions
  6. Update/Manage User Groups
  7. Update/Manage rate limit of API
  8. Update/Manage cache response of API
  9. Change back-end of API
  10. use LogicApps with API Http event.
  11. use Azure functions to send the response back.

Categorized in: