chapter eight

8 Serverless

 

This chapter covers

  • Creating an Azure Function App and Azure Function from Visual Studio Code
  • Creating Azure Logic Apps to integrate with other services
  • Introducing Azure API Management and creating a public-facing API
  • Understanding where serverless cloud services excel

Serverless is one of those terms that your manager loves and that has come to signify using and implementing cloud computing like the cool kids. There’s a certain expectation of efficiency and cost saving if you start describing your solution as serverless. While that can certainly be true when approached correctly, let’s get one thing clear right from the start: there’s no such thing as server-less. You can’t do any kind of computing without a server of some kind, whether that’s your laptop, an on premises data center, or cloud computing. Instead, serverless actually refers to using a server that someone else manages. You and your project are serverless, but the computation you perform is not.

The best way to look at serverless is like chapter 6 on security in the sense that serverless is a spectrum, rather than a yes/no decision. As shown in figure 8.1, you’re somewhere between a server-based architecture and fully serverless. It’s perfectly okay to have a mix of services relying on servers and some relying on serverless services. As always, use the right tool for the job.

Figure 8.1 The server to serverless spectrum

8.1 Alpaca-Ma-Bags web shop and nonfungible tokens

8.2 Azure Functions

8.2.1 Triggers

8.2.2 Bindings

8.2.3 Hosting

8.3 Azure Logic Apps

8.3.1 Connectors

8.3.2 Triggers

8.3.3 Actions

8.4 Azure API Management

8.4.1 API gateway

8.4.2 Management plane

8.4.3 Developer portal

8.4.4 Connecting the Azure Function

8.4.5 Connecting the Logic App

8.5 Is serverless just platform as a service?

Summary