The restrictions on state management

In the FaaS model, the different parts of the application are built as separate functions where each function is executed on the occurrence of a certain event. When the application is supposed to be deployed, the cloud provider automatically manages the infrastructure where the application will run and how the application will scale up.

In comparison to the traditional applications that, once deployed, start a server process and are ready to accept the incoming connections, the FaaS-based applications are started dynamically as a response to a certain input. Once the event occurs, the function starts and executes, waits for some time, and then the instance in which the function is executing is terminated. Now, this makes the process a bit interesting because the time for which the function is present in the infrastructure is limited and there is no guarantee that the same instance of the function will also handle the next call.

This makes the state management, that is, the management of local data for a currently-executing operation, a challenging task inside FaaS-based offerings, which severely limits what local data we can store inside a function instance while it is executing.

For dealing with such a scenario, we depend upon an external offering that can store the state data for us. This may include the use of an external database or a caching server where the data can be persisted for future reference.

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

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