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
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • A Glimpse Into the Future for Developers and Leaders
  • From Zero to Scale With AWS Serverless
  • AWS Cloud Security: Key Components, Common Vulnerabilities, and Best Practices
  • Implementing and Deploying a Real-Time AI-Powered Chatbot With Serverless Architecture

Trending

  • Transforming AI-Driven Data Analytics with DeepSeek: A New Era of Intelligent Insights
  • How to Convert XLS to XLSX in Java
  • Microsoft Azure Synapse Analytics: Scaling Hurdles and Limitations
  • It’s Not About Control — It’s About Collaboration Between Architecture and Security
  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 user avatar
Madhan Muralimanohar
·
May. 01, 24 · Analysis
Likes (1)
Comment
Save
Tweet
Share
1.5K Views

Join the DZone community and get the full member experience.

Join For Free

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

  • A Glimpse Into the Future for Developers and Leaders
  • From Zero to Scale With AWS Serverless
  • AWS Cloud Security: Key Components, Common Vulnerabilities, and Best Practices
  • Implementing and Deploying a Real-Time AI-Powered Chatbot With Serverless Architecture

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!