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
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

Low-Code Development: Leverage low and no code to streamline your workflow so that you can focus on higher priorities.

DZone Security Research: Tell us your top security strategies in 2024, influence our research, and enter for a chance to win $!

Launch your software development career: Dive head first into the SDLC and learn how to build high-quality software and teams.

Open Source Migration Practices and Patterns: Explore key traits of migrating open-source software and its impact on software development.

Related

  • When You Need More Power Than a Lambda Provides
  • Unleashing Serverless Computing With Azure Functions: Advantages, Best Practices and Scope
  • Embracing Local Development in Serverless AWS Environments
  • Future of Software Development

Trending

  • Unleashing the Power of Redis for Vector Database Applications
  • What Is Plagiarism? How to Avoid It and Cite Sources
  • A Comprehensive Guide To Building and Managing a White-Label Platform
  • Microservices Design Patterns for Highly Resilient Architecture
  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
Like (1)
Save
Tweet
Share
1.1K 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

  • When You Need More Power Than a Lambda Provides
  • Unleashing Serverless Computing With Azure Functions: Advantages, Best Practices and Scope
  • Embracing Local Development in Serverless AWS Environments
  • Future of Software Development

Partner Resources


Comments

ABOUT US

  • About DZone
  • Send 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: