SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
Serverless Computing & key Consideration
Anand Gupta
(Senior Solution Architect at Capgemini)
Linked in: https://www.linkedin.com/in/anand-gupta-415570160/
01
03
04
05
07
08
09
10
What Is Serverless ?
Use cases
Patterns.
Communication Patterns.
Key Benefits of Serverless.
How does Functions-as-a-service
work?
Key Considerations and best practices.
Introduction
Agenda
02 Brief of Cloud Computing
06 Serverless Application & AWS Lambda
3
Traditional way to
provide the
infrastructure
Data
Center
Provides CLI or API to
manage
infrastructure(AWS
EC2)
IAAS
Provides infrastructure
bases on developed
application (AWS
Beanstalk)
PAAS
Provides infrastructure
on demand when the
FaaS provider receive
the request(AWS
Lambda)
Serverless
Brief History of Cloud computing.
4
No Server provision or manage
Scale with Usage
Never Pay for Idle
High Availability and fault tolerance built in
What is Serverless ?
Serverless is new set of emerging practices that'll change the way we build the application, it
brings more agility, cuts cost and enables more efficient application development. This seems like
a real fundamental shift the way we are building out application.
How does Functions-as-a-service Works?
/users
/orders
/catalogue
Host Instance Application
FaaS Platform
/users
/orders
/catalogue
/users
Traditional Computing Serverless Computing
Request: Many To One Instance
Instance
Request: One To One
6
01
02
03
04
05
06
New Feature
Product engineers can innovate rapidly as serverless architecture has alleviated the problems of system engineering.
Thus, you spend less time on operational issues and can release new feature faster.
Pay for Use
With serverless, you only pay for what you use, there are no hardware costs and no costs when your services are not in
use, and you get away not paying anything when the application is not in use.
Deployment Package
Simplifies deployment and packaging, which eliminates the complex build and deploy process.
Resilience and Flexibility
Because Serverless is stateless, it is highly resilient when under load and in sub-optimal execution conditions.
Developer productivity
Smaller code, agile development and enables the developers to concentrate on code and deliver quickly.
No Server to provision
Eliminates the need of estimating what type of, and how many, resources our application requires also the process of
acquiring machine instances and setting them up ready for deployment
Key Benefits of Serverless Computing
7
Serverless Application
Event Source Function Service
Changes in
data state
Changes in
Resources
state
Request to
end points
Node.js
Python
Java
C#
Go
Ruby
Runtime
API
Database
External endpoint
8
Anatomy of AWS Lambda Function
Handler Function Event Object Context Object
Function to be executed
upon invocation
Data sent during Lambda
function invocation
Method available to interact
with runtime
information(request ID, log
group, more)
exports.handler = (event, context, callback) => {
// TODO implement
console.log("context object details");
console.log(JSON.stringify(context));
callback(null, “test response');
};
9
Serverless Communication Patterns
Synchronous
(Push)
API
Gateway
/master
Asynchronous
(Event)
Stream
(Poll Based)
SQS
S3
Lambda function Lambda function
Events
Kinesis
DynamoDB
changes
Lambda function
10
Design Pattern : API implementation
{….} https Endpoint
CloudWatch
Cognito(IDM)
/booking
IDM
MDM
Booking
API Gateway Service Database
11
Design Pattern : Microservice Integration
{….} https Endpoint
Lambda
API Gateway
Amazon MQ
RDS
/payment
/orders
/loyalty
{….}
https private
Endpoint
{….} third party
https Endpoint
API Layer
Source System Message Broker & Listener Target System
12
Design Pattern : Batch Job
Cloud Watch
Alarm
(time based) Step Functions
S3
/sendMail
Sendgrid
Lambda invoked when
scheduled time occurs
Scheduled Processor Internal Service
13
BACKENDS
• Apps & services.
• Mobile
• IoT
DATA PROCESSING
• Real Time
• Map Reduce
• Batch
VOICE ENABLED SERVICES
• Powering Voice Enabled
Apps.
• Alexa Skill Kit
IT AUTOMATIONS
• Policy Engines
• Extending AWS
Services.
• Infrastructure
Management
WEB APPLICATIONS
• Static Web sites.
• API development
• API Integration
CHAT BOTS
• Powering chat bots.
Use cases
14
1. Mono Repo 2. Repo per function
3. Repo per Group
/users
/orders
1. Key Consideration : Repository Structure
One Group of repo
should not have more
then 25 to 30 function
No Repo per function and
pipeline
Group the application
in function close to
functionality.
No mono repo.
1
2
3
4
15
Download code
and
dependency
Create, setup
and start
new container
Runtime
Bootstrapped
Code execution
2.a Key Consideration : Cold Start
The Request Life Cycle
AWS Provider Optimization Dev team Optimization
Cold Start Time
Warm Start Time
Request Execution time
16
Memory size
If you increase the memory, you will also get
more CPU, this memory balancing approach
will help to faster the start up time.
Runtime
Scripting languages (Python, Java script) perform
a lot better in startup time in comparison to
compiled runtimes (Java, .NET, C#).
Code package size
The larger the size, the more time it takes to
spin up a new container, avoid unnecessary
third-party libraries
Application initialization
If application is performing any task at startup, it will
add to cold start, try to load the resources lazily.
2.b Key Consideration : Cold Start Improve Startup Latency
17
• Minimize your package
size.
• There is a hard limit of
50MB for compressed
deployment package.
Application Package Size
• Put your dependency(e.g.
jar files) in a separate
directory.
• An uncompressed(Layer)
AWS Lambda hard limit of
250MB.
Lambda Layer
• Stop reaching for 3rd
party dependencies and
rather build your own
serverless library.
3rd party dependencies
3. Key Consideration : Application Package and Dependency management
18
API Gateway should have
mapping of error code to avoid
CORS error.
API Gateway Error Mapping
Follow the proper HTTP error
code.
Http Error Code
AWS API Gateway has a 29
second hard limit of timeout. Use
short timeout limits. set them at
3-6 seconds for API calls
API Gateway Timeout
Use global exception handler in
your code and do not allow
exception to propagate outside
of Lambda handler.
Global Exception Handling
Request and response
(synchronous calls) body
payload size can be up
to 6 MB.
Pay Load Size
Lambda time out limit is 15
minute, so do not perform long
job.
Lambda Timeout
4. Key Consideration : Exception Handling and timeout
19
S
START UP
TIME
• Minimize the complexity of your
dependencies.
• Choose interpreted languages like Node.js or
Python over languages like Java and C# if
cold start time is affecting user experience.
M
MEMORY
BALANCING
• Lambda costing depends on both memory
allocation and execution time. If we need to
reduce the Lambda execution time, one can
try increasing memory (and by extension,
CPU) to process it faster
C
CODE
OPTAMIZATION
• Store and reference external configurations
and dependencies locally after first
execution.
• Avoid memory intensive or iteration of
large data set.
R
RE-USE LAMBDA
CONTAINERS
• Cache reusable resources.
• Limit the re-initialization of variables/objects
on every invocation. Instead use static
initialization/constructor, global/static
variables and singletons.
5. Key Consideration : Performance
20
• Do not store secrets in
application code, environment
variables or in a source code.
• For sensitive information,
utilize a secret storage that
enables both runtime access,
as well as easy and routine
key rotation.
Manage secrets in secure
storage
• Offloading authentication
concerns from your functions
core business logic
• DDOS protection, traffic
throttling and rate limiting.
API gateways as a
security buffer
• Avoid globally defined roles
and resource access
permissions for functions.
• Minimize access rights to
resources for functions using
fine-grained permissions for
each function
Adopt Least privilege
• Audit and monitor how and
what functions are accessing
to ensure no illegal
paths are taken, and monitor
security vulnerabilities in
functions.
• Implement central logging
system to gain better
observability.
Monitor and log functions
6. Key Consideration : Security
21
Q/A

Más contenido relacionado

La actualidad más candente

Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversAmazon Web Services
 
Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)Amazon Web Services
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)Ashish Kushwaha
 
Tom Grey - Google Cloud Platform
Tom Grey - Google Cloud PlatformTom Grey - Google Cloud Platform
Tom Grey - Google Cloud PlatformFondazione CUOA
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
 Introduction google cloud platform
 Introduction google cloud platform Introduction google cloud platform
 Introduction google cloud platformmarwa Ayad Mohamed
 
Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing Rushi Namani
 
Introduction to AI/ML with AWS
Introduction to AI/ML with AWSIntroduction to AI/ML with AWS
Introduction to AI/ML with AWSSuman Debnath
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech TalkAmazon Web Services
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Google cloud platform introduction
Google cloud platform introductionGoogle cloud platform introduction
Google cloud platform introductionSimon Su
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Garvit Anand
 
Getting Started with AWS Compute Services
Getting Started with AWS Compute ServicesGetting Started with AWS Compute Services
Getting Started with AWS Compute ServicesAmazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateAmazon Web Services
 

La actualidad más candente (20)

Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about servers
 
Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)
 
Tom Grey - Google Cloud Platform
Tom Grey - Google Cloud PlatformTom Grey - Google Cloud Platform
Tom Grey - Google Cloud Platform
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
 Introduction google cloud platform
 Introduction google cloud platform Introduction google cloud platform
 Introduction google cloud platform
 
Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing
 
Introduction to AI/ML with AWS
Introduction to AI/ML with AWSIntroduction to AI/ML with AWS
Introduction to AI/ML with AWS
 
AWS Foundations
AWS FoundationsAWS Foundations
AWS Foundations
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
AWS Cloud Watch
AWS Cloud WatchAWS Cloud Watch
AWS Cloud Watch
 
Google cloud platform introduction
Google cloud platform introductionGoogle cloud platform introduction
Google cloud platform introduction
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)
 
Getting Started with AWS Compute Services
Getting Started with AWS Compute ServicesGetting Started with AWS Compute Services
Getting Started with AWS Compute Services
 
What is Serverless Computing?
What is Serverless Computing?What is Serverless Computing?
What is Serverless Computing?
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
 
Cost Optimisation on AWS
Cost Optimisation on AWSCost Optimisation on AWS
Cost Optimisation on AWS
 
Overview of Amazon Web Services
Overview of Amazon Web ServicesOverview of Amazon Web Services
Overview of Amazon Web Services
 

Similar a Serverless Computing Key Considerations

Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2kartraj
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsTensult
 
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Skillenza Build with Serverless Challenge -  Advanced Serverless ConceptsSkillenza Build with Serverless Challenge -  Advanced Serverless Concepts
Skillenza Build with Serverless Challenge - Advanced Serverless ConceptsDhaval Nagar
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at LifestageBATbern
 
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel PartnersCraeg Strong
 
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...Craeg Strong
 
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel PartnersCraeg Strong
 
Building Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the CloudBuilding Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the CloudSrini Karlekar
 
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...Srini Karlekar
 
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksDeep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksAmazon Web Services
 
Liquid Day - Serverless
Liquid Day - ServerlessLiquid Day - Serverless
Liquid Day - ServerlessSoftware Guru
 
AWS Serverless patterns & best-practices in AWS
AWS Serverless  patterns & best-practices in AWSAWS Serverless  patterns & best-practices in AWS
AWS Serverless patterns & best-practices in AWSDima Pasko
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on BluemixRam Vennam
 
Serverless APIs with JavaScript - Matt Searle - ChocPanda
Serverless APIs with JavaScript - Matt Searle - ChocPandaServerless APIs with JavaScript - Matt Searle - ChocPanda
Serverless APIs with JavaScript - Matt Searle - ChocPandaPaul Dykes
 
Serverless in Java Lessons learnt
Serverless in Java Lessons learntServerless in Java Lessons learnt
Serverless in Java Lessons learntKrzysztof Pawlowski
 
Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Mike Shutlar
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLNordic APIs
 
Apache Airflow (incubating) NL HUG Meetup 2016-07-19
Apache Airflow (incubating) NL HUG Meetup 2016-07-19Apache Airflow (incubating) NL HUG Meetup 2016-07-19
Apache Airflow (incubating) NL HUG Meetup 2016-07-19Bolke de Bruin
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdfseo18
 

Similar a Serverless Computing Key Considerations (20)

Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
 
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Skillenza Build with Serverless Challenge -  Advanced Serverless ConceptsSkillenza Build with Serverless Challenge -  Advanced Serverless Concepts
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at Lifestage
 
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
 
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
 
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
 
Building Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the CloudBuilding Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the Cloud
 
Going Serverless on AWS
Going Serverless on AWSGoing Serverless on AWS
Going Serverless on AWS
 
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
 
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksDeep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
 
Liquid Day - Serverless
Liquid Day - ServerlessLiquid Day - Serverless
Liquid Day - Serverless
 
AWS Serverless patterns & best-practices in AWS
AWS Serverless  patterns & best-practices in AWSAWS Serverless  patterns & best-practices in AWS
AWS Serverless patterns & best-practices in AWS
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
 
Serverless APIs with JavaScript - Matt Searle - ChocPanda
Serverless APIs with JavaScript - Matt Searle - ChocPandaServerless APIs with JavaScript - Matt Searle - ChocPanda
Serverless APIs with JavaScript - Matt Searle - ChocPanda
 
Serverless in Java Lessons learnt
Serverless in Java Lessons learntServerless in Java Lessons learnt
Serverless in Java Lessons learnt
 
Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of ML
 
Apache Airflow (incubating) NL HUG Meetup 2016-07-19
Apache Airflow (incubating) NL HUG Meetup 2016-07-19Apache Airflow (incubating) NL HUG Meetup 2016-07-19
Apache Airflow (incubating) NL HUG Meetup 2016-07-19
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
 

Último

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 

Último (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 

Serverless Computing Key Considerations

  • 1. Serverless Computing & key Consideration Anand Gupta (Senior Solution Architect at Capgemini) Linked in: https://www.linkedin.com/in/anand-gupta-415570160/
  • 2. 01 03 04 05 07 08 09 10 What Is Serverless ? Use cases Patterns. Communication Patterns. Key Benefits of Serverless. How does Functions-as-a-service work? Key Considerations and best practices. Introduction Agenda 02 Brief of Cloud Computing 06 Serverless Application & AWS Lambda
  • 3. 3 Traditional way to provide the infrastructure Data Center Provides CLI or API to manage infrastructure(AWS EC2) IAAS Provides infrastructure bases on developed application (AWS Beanstalk) PAAS Provides infrastructure on demand when the FaaS provider receive the request(AWS Lambda) Serverless Brief History of Cloud computing.
  • 4. 4 No Server provision or manage Scale with Usage Never Pay for Idle High Availability and fault tolerance built in What is Serverless ? Serverless is new set of emerging practices that'll change the way we build the application, it brings more agility, cuts cost and enables more efficient application development. This seems like a real fundamental shift the way we are building out application.
  • 5. How does Functions-as-a-service Works? /users /orders /catalogue Host Instance Application FaaS Platform /users /orders /catalogue /users Traditional Computing Serverless Computing Request: Many To One Instance Instance Request: One To One
  • 6. 6 01 02 03 04 05 06 New Feature Product engineers can innovate rapidly as serverless architecture has alleviated the problems of system engineering. Thus, you spend less time on operational issues and can release new feature faster. Pay for Use With serverless, you only pay for what you use, there are no hardware costs and no costs when your services are not in use, and you get away not paying anything when the application is not in use. Deployment Package Simplifies deployment and packaging, which eliminates the complex build and deploy process. Resilience and Flexibility Because Serverless is stateless, it is highly resilient when under load and in sub-optimal execution conditions. Developer productivity Smaller code, agile development and enables the developers to concentrate on code and deliver quickly. No Server to provision Eliminates the need of estimating what type of, and how many, resources our application requires also the process of acquiring machine instances and setting them up ready for deployment Key Benefits of Serverless Computing
  • 7. 7 Serverless Application Event Source Function Service Changes in data state Changes in Resources state Request to end points Node.js Python Java C# Go Ruby Runtime API Database External endpoint
  • 8. 8 Anatomy of AWS Lambda Function Handler Function Event Object Context Object Function to be executed upon invocation Data sent during Lambda function invocation Method available to interact with runtime information(request ID, log group, more) exports.handler = (event, context, callback) => { // TODO implement console.log("context object details"); console.log(JSON.stringify(context)); callback(null, “test response'); };
  • 9. 9 Serverless Communication Patterns Synchronous (Push) API Gateway /master Asynchronous (Event) Stream (Poll Based) SQS S3 Lambda function Lambda function Events Kinesis DynamoDB changes Lambda function
  • 10. 10 Design Pattern : API implementation {….} https Endpoint CloudWatch Cognito(IDM) /booking IDM MDM Booking API Gateway Service Database
  • 11. 11 Design Pattern : Microservice Integration {….} https Endpoint Lambda API Gateway Amazon MQ RDS /payment /orders /loyalty {….} https private Endpoint {….} third party https Endpoint API Layer Source System Message Broker & Listener Target System
  • 12. 12 Design Pattern : Batch Job Cloud Watch Alarm (time based) Step Functions S3 /sendMail Sendgrid Lambda invoked when scheduled time occurs Scheduled Processor Internal Service
  • 13. 13 BACKENDS • Apps & services. • Mobile • IoT DATA PROCESSING • Real Time • Map Reduce • Batch VOICE ENABLED SERVICES • Powering Voice Enabled Apps. • Alexa Skill Kit IT AUTOMATIONS • Policy Engines • Extending AWS Services. • Infrastructure Management WEB APPLICATIONS • Static Web sites. • API development • API Integration CHAT BOTS • Powering chat bots. Use cases
  • 14. 14 1. Mono Repo 2. Repo per function 3. Repo per Group /users /orders 1. Key Consideration : Repository Structure One Group of repo should not have more then 25 to 30 function No Repo per function and pipeline Group the application in function close to functionality. No mono repo. 1 2 3 4
  • 15. 15 Download code and dependency Create, setup and start new container Runtime Bootstrapped Code execution 2.a Key Consideration : Cold Start The Request Life Cycle AWS Provider Optimization Dev team Optimization Cold Start Time Warm Start Time Request Execution time
  • 16. 16 Memory size If you increase the memory, you will also get more CPU, this memory balancing approach will help to faster the start up time. Runtime Scripting languages (Python, Java script) perform a lot better in startup time in comparison to compiled runtimes (Java, .NET, C#). Code package size The larger the size, the more time it takes to spin up a new container, avoid unnecessary third-party libraries Application initialization If application is performing any task at startup, it will add to cold start, try to load the resources lazily. 2.b Key Consideration : Cold Start Improve Startup Latency
  • 17. 17 • Minimize your package size. • There is a hard limit of 50MB for compressed deployment package. Application Package Size • Put your dependency(e.g. jar files) in a separate directory. • An uncompressed(Layer) AWS Lambda hard limit of 250MB. Lambda Layer • Stop reaching for 3rd party dependencies and rather build your own serverless library. 3rd party dependencies 3. Key Consideration : Application Package and Dependency management
  • 18. 18 API Gateway should have mapping of error code to avoid CORS error. API Gateway Error Mapping Follow the proper HTTP error code. Http Error Code AWS API Gateway has a 29 second hard limit of timeout. Use short timeout limits. set them at 3-6 seconds for API calls API Gateway Timeout Use global exception handler in your code and do not allow exception to propagate outside of Lambda handler. Global Exception Handling Request and response (synchronous calls) body payload size can be up to 6 MB. Pay Load Size Lambda time out limit is 15 minute, so do not perform long job. Lambda Timeout 4. Key Consideration : Exception Handling and timeout
  • 19. 19 S START UP TIME • Minimize the complexity of your dependencies. • Choose interpreted languages like Node.js or Python over languages like Java and C# if cold start time is affecting user experience. M MEMORY BALANCING • Lambda costing depends on both memory allocation and execution time. If we need to reduce the Lambda execution time, one can try increasing memory (and by extension, CPU) to process it faster C CODE OPTAMIZATION • Store and reference external configurations and dependencies locally after first execution. • Avoid memory intensive or iteration of large data set. R RE-USE LAMBDA CONTAINERS • Cache reusable resources. • Limit the re-initialization of variables/objects on every invocation. Instead use static initialization/constructor, global/static variables and singletons. 5. Key Consideration : Performance
  • 20. 20 • Do not store secrets in application code, environment variables or in a source code. • For sensitive information, utilize a secret storage that enables both runtime access, as well as easy and routine key rotation. Manage secrets in secure storage • Offloading authentication concerns from your functions core business logic • DDOS protection, traffic throttling and rate limiting. API gateways as a security buffer • Avoid globally defined roles and resource access permissions for functions. • Minimize access rights to resources for functions using fine-grained permissions for each function Adopt Least privilege • Audit and monitor how and what functions are accessing to ensure no illegal paths are taken, and monitor security vulnerabilities in functions. • Implement central logging system to gain better observability. Monitor and log functions 6. Key Consideration : Security