Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Serverless Architectures on AWS Lambda
1. SERHAT CAN • SOFTWARE ENGINEER • @SRHTCN•
Serverless Architectures on
AWS Lambda
The OpsGenie Experience
2. Forward IT alerts to
OpsGenie
View alerts using the
mobile app
Get notified via email,
SMS, mobile push
and phone calls
Define On-call schedules
and escalations policies
Respond to alerts
directly from
the OpsGenie app
3. • Does not mean running code without servers
• Cloud provider manages servers and provisioning
• No more long-running virtual machines
• Event driven - starts & stops execution between each
request
• Pay only when your code executed
What is Serverless (FaaS)
7. Limitations
Language limitations (Java, Nodejs, Python, C#)
Max memory is 1,5GB
Maximum execution duration per request 300 seconds
Concurrent executions 1000 (Immediate Increase to 3000)
8. Some of the Important Features
• VPC Support
• Environment Variables
• Dead Letter Queue
• Function Versioning and Aliases
• Tagging
10. • Java8 (mostly)
• Node.js & Python for custom solutions
• Custom Deployment Solution written in Java
(in DevOps Team)
• Serverless.js
Our Serverless Stack
11. • Operating on multiple AZ’s is good but not enough
• Even services with 99.99999999999% durability, 99.99%
availability can’t be trusted
• Needed to be ready for regional failures
• Goal is full region switch within a few minutes if not seconds
• Next step: operate on multiple regions simultaneously
Reliability Needs of OpsGenie
19. Elasticsearch Indexing
Motivation:
• Needed to index our data to ES
• Our ES data should be available in every region we operate
• Cross region replication should not be included in the
application logic as much as possible
21. • AWS Lambda is a life saver for custom solutions, because;
• Customers do not need to manage servers
• Easy to deploy (give a .zip file)
• Real pay what you use pricing
(not hourly but for each 100ms execution time)
Custom Solutions & Integrations
27. • Lambda functions, written in Java, experience a latency
during new container initialization mainly caused by Java
class loading
• To avoid this we are experimenting an approach called
“Warmup Lambda”
• Warmup Lambda is a lambda function that aims to keep a
given number of concurrent lambda functions up, to avoid the
startup latency
Java Cold Start Time
28. • No way to attach NewRelic agent to AWS Lambda
• We wanted to use NewRelic’s capabilities like NRQL
• Logs are processed using Cloudwatch trigger and sent to
NewRelic, Elasticsearch etc.
• Just started experimenting new
AWS X-Ray (Distributed Tracing System)
Proper Monitoring
29. AWS X-Ray
• X-Ray provides an end-to-end view of requests as they travel
through your application, and shows a map of your
application’s underlying components
32. • Blue green deployment using Alias support
• Allows our applications to call different Lambda function
versions during deployment using Lambda SDK
Deployment