DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Implementing Budget Policies and Budget Limits on Databricks
  • Creating Serverless Applications With AWS Lambda: A Step-by-Step Guide
  • A Glimpse Into the Future for Developers and Leaders
  • From Zero to Scale With AWS Serverless

Trending

  • How Predictive Analytics Became a Key Enabler for the Future of QA
  • The Real Cost of Change in Software Development
  • How Performance Engineers Find and Fix Hidden System Bottlenecks
  • 5 Proven Strategies for Modernizing Legacy .NET Applications

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. API-Based Web Service as Serverless Function

API-Based Web Service as Serverless Function

Serverless architecture is a method of decoupling server maintenance, scalability, and availability from the development process.

By 
Madhan Muralimanohar
·
May. 01, 24 · Analysis
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
2.0K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

What is serverless architecture and how does it affect the development process and help to unlock several benefits for an enterprise? Simply put, serverless architecture is a method of decoupling server maintenance, scalability, and availability from the development process. It is one of the best ways to build and run applications and services without having to manage their underlying infrastructure. It is also a powerful way to reduce toil and deliver engineering excellence.

serverless

Serverless architecture can be implemented in two ways: 1.) Serverless functions and 2.) Serverless databases. 

choose

This article focuses on the serverless function, which is nothing more than a logical entity running only in the cloud infrastructure that is focused on business logic. There are various providers available in the industry that offer serverless functions. To name a few, AWS Lambda and Fargate, Microsoft Azure Functions, and Google Cloud Functions. 

serverless providersA few ideal use cases for serverless functions could be (but are not limited to):

  • Task invocation based on specific triggers (e.g. — Triggering alert functions based on usage threshold). 
  • Building scalable RESTful APIs by leveraging Amazon API G/W. 
  • Back-end application tasks (e.g. - Invoking back-end functions in parallel to other front-end applications).
  • Applications or processes that can be invoked on demand to perform behind-the-scenes work.

Though there are various ways to host an API-based application in the cloud platform, the level of infrastructure abstraction varies depending on the cloud technology. As mentioned earlier, the goal is to unlock better performance and significantly reduce the infrastructure cost. AWS Lambda and Fargate are two major compute-based serverless services offered by Amazon. 

business logic

The level of infrastructure abstraction is significant enough for the Lambda function to completely decouple the server maintenance, scalability, and availability aspects from the development process.  Developers are then required to focus only on the business logic of the application, leaving the rest of the underlying infrastructure details to the cloud service providers. 

infrastructure details

Based on the above analysis, one of the best use cases for the serverless architecture is the handling of notifications from the Network. The asynchronous notifications coming from the network shall trigger the Lambda function through the exposed APIs. 

Moving toward the serverless architecture will enable one-click code deployment, decrease infrastructure costs, automate scaling, improve the performance of the application, and eliminate the underlying server maintenance.

A serverless Lambda function can be invoked by various choices of execution. In case of migrating an existing application to a serverless function from On-prem or other cloud platforms when the API is already hosted in APIGEE, a simple integration between APIGEE gateway to Lambda function is sufficient to successfully migrate to a serverless system without impacting API clients. 

integration between APIGEE gateway to Lambda function

The life cycle of a Serverless Function (Lambda) typically involves several key stages, such as creation, invocation, execution, monitoring, completion, scaling, and retention. Understanding the concept of warm-start and cold-start in the serverless function will help fine-tune the serverless function configuration and attain better performance. 

life cycle of a Serverless Function (Lambda)

The implementation of a Serverless Function for an appropriate use case shall benefit an enterprise with significant infrastructure cost savings. Unlike non-serverless cloud platform types where cloud providers charge based on the size and the number of instances, charges for the Serverless Lambda function are on a per-invocation basis, which saves cost on unused servers and virtual machines. 

AWS Lambda Business logic Cloud Web Service Serverless Framework Serverless computing

Published at DZone with permission of Madhan Muralimanohar. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Implementing Budget Policies and Budget Limits on Databricks
  • Creating Serverless Applications With AWS Lambda: A Step-by-Step Guide
  • A Glimpse Into the Future for Developers and Leaders
  • From Zero to Scale With AWS Serverless

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook