API gateways in the serverless architecture

In Chapter 11, Taking the Microservices Approach, when we went through the concept of Microservices, we got introduced to API Gateways and how they help in the development of Microservices. These API gateways also play an important role in the development of the applications based upon the serverless architectures.

The API gateways are nothing but HTTP servers that embed the information about certain API endpoints of an application and associate these endpoints with some handlers. Once a request is made to a certain API endpoint, the handler associated with the API endpoint is called to handle the request.

In the serverless architecture, the handlers that are associated with a particular API endpoint inside the API gateway are the FaaS functions. When the API gateway receives a request at a particular API endpoint, the API gateway triggers an event that will make the FaaS function execute on the request. Any of the parameters that are required by the FaaS function to execute are forwarded by the API gateway to the function and the response generated by the function is then sent back to the requesting client.

Now, here is an important aspect related to the API gateways. These API gateways, which we use in the serverless application development, can usually be configured by us. But these API gateways are mostly hosted on the cloud service provider that is providing the support for serverless application deployment. This makes these API gateways a BaaS offering, which runs on the infrastructure of the provider with the power of configuration available to the user.

Now we have the knowledge of the different components that power the serverless architecture and are ready to take our first steps into the development of our first serverless application. But before we start with the development of our first serverless application, let's look at one last important concept in how a platform handles the execution of a serverless application, which will provide us with a much broader context of the kind of performance we can expect from the serverless applications.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.178.237