Friday, October 8, 2021

 

The cost of relays:

Introduction: Azure Functions provide the convenience of extending existing applications with event-based programming in a serverless environment. They improve application modularity and maintenance. They react to critical events. When there are many requests, the functions can scale instances as necessary and once the traffic has died down, they can scale down. All the compute resources come from Azure Functions and as a developer of Azure functions, there is no need to be concerned about infrastructure and operations.  When the function is written, a hosting plan must be chosen. The Notification Hub Output Binding for Azure functions enables us to send push notifications by using Azure Notification Hubs. Azure functions support output bindings for Notification Hubs. There are many languages to choose from for writing the Azure function, but in all these choices, the Notification Hub must be configured for the Platform Notification Service. We can get the push notifications in the client application from Notification Hub.

With the help of requestIds, in the request and response headers, it is easy to correlate callers and callee and their logs. When the API of a backend service cannot be consumed by clients, the Azure functions serve as a proxy easily translating the requests back and forth in a way suitable to both parties. It is also possible to chain numerous functions such that the output of one form the input of another. This sequence is especially useful for data transformations that must be independent of the source and destination but does not require any storage.

One of the toughest problems that arise from proxy or chaining is that the end-to-end fidelity and visibility to the flow of data is lost unless the logs are going to the same destination and correlated with an identifier. It is harder to enforce consistency across the functions especially given that they may be implemented differently, at different times and by different authors. Yet they prove critical for DevOps and short release cycle functionalities such as for infrastructure needs and Information Technology perspectives.

The total cost of ownership for Azure Functions is not a constant even it can be calculated with the help of immense features from the Azure billing and cost management dashboard. While controls can be put in place to not exceed a budget, it is harder to estimate the business value of the requests rejected when the threshold is exceeded. Besides, these continue to be operational cost and the not the cost of software development. The serverless paradigm lowers the cost of maintenance of a single function but it does not factor in the overall expense associated with the proliferation of different functions which tend to multiply based on variations in data and processing. When the existing functions are left behind and the new ones added, the old ones continue to incur costs unless they are sunset. A regression model can be attempted that depends on multiple variables and not all of which are linear.

While cost can be reduced for different variables, the overall cost is cumulative and increases over time.

No comments:

Post a Comment