This document discusses low latency data processing in serverless computing. It begins with an overview of serverless architectures and why industries are adopting serverless. Typical scenarios for low-latency processing like fraud detection are presented. Common sources of latency in serverless like cold starts are explained. Approaches to optimize serverless performance through warming functions, co-locating services, and caching hot data are covered. A demo of a serverless fraud detection system using Hazelcast Cloud is shown and other data storage options discussed. The summary emphasizes that while low-latency processing is possible with serverless, latency sources must be addressed and in-memory computing can help reduce function costs.
3. 3
Brief Agenda
• Serverless - Not Just The Lambda Functions?
• What do we call Serverless?
• Why industry goes Serverless
4. 4
Brief Agenda
• Serverless - Not Just The Lambda Functions?
• What do we call Serverless?
• Why industry goes Serverless
• Low-Latency Data Processing in Serverless – Any Chance?
• Typical scenarios of Low-Latency Processing
• What brings the latency in Serverless
• Approaches to optimize Serverless Computing
5. 5
Brief Agenda
• Serverless - Not Just The Lambda Functions?
• What do we call Serverless?
• Why industry goes Serverless
• Low-Latency Data Processing in Serverless – Any Chance?
• Typical scenarios of Low-Latency Processing
• What brings the latency in Serverless
• Approaches to optimize Serverless Computing
• Demo Time – The Serverless Fraud Detection
7. 7
About me
• 9 years of experience of on different
positions from Java Engineer to
Team Lead and Solutions Architect
@n_cherkas @ncherkas NazariyCherkas1
8. 8
About me
• 9 years of experience of on different
positions from Java Engineer to
Team Lead and Solutions Architect
• Conference speaker, Program
Committee member at Devoxx UA
@n_cherkas @ncherkas NazariyCherkas1
9. 9
About me
• 9 years of experience of on different
positions from Java Engineer to
Team Lead and Solutions Architect
• Conference speaker, Program
Committee member at Devoxx UA
• Cloud Developer at Hazelcast Inc.
@n_cherkas @ncherkas NazariyCherkas1
10. 10
About me
• 9 years of experience of on different
positions from Java Engineer to
Team Lead and Solutions Architect
• Conference speaker, Program
Committee member at Devoxx UA
• Cloud Developer at Hazelcast Inc.
• Moving you to the Cloud
@n_cherkas @ncherkas NazariyCherkas1
45. 45
Typical scenarios of Low-Latency Processing
• Algorithmic trading in Financial markets
• Real-time Bidding for Ads
46. 46
Typical scenarios of Low-Latency Processing
• Algorithmic trading in Financial markets
• Real-time Bidding for Ads
• Fraud detection for the in-flight transactions
47. 47
Typical scenarios of Low-Latency Processing
• Algorithmic trading in Financial markets
• Real-time Bidding for Ads
• Fraud detection for the in-flight transactions
• Personalized user experience in E-commerce
67. 67
Approaches to optimize Serverless Computing
Caching “hot” data in the external In-Memory Store
Latency Numbers Every Programmer Should Know
https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html
Read 1 MB sequentially from
disk
1 ms
68. 68
Approaches to optimize Serverless Computing
Caching “hot” data in the external In-Memory Store
Latency Numbers Every Programmer Should Know
https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html
Read 1 MB sequentially from
disk
1 ms
Read 1 MB sequentially from
SSD
78 μs
69. 69
Approaches to optimize Serverless Computing
Caching “hot” data in the external In-Memory Store
Read 1 MB sequentially from
disk
1 ms
Read 1 MB sequentially from
SSD
78 μs
Read 1 MB sequentially from
memory
5 μs
Latency Numbers Every Programmer Should Know
https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html
80. 80
The Serverless Fraud Detection
Why Hazelcast Cloud
• Managed Service for the Hazelcast IMDG – a full-featured In-
Memory Data Grid
81. 81
The Serverless Fraud Detection
Why Hazelcast Cloud
• Managed Service for the Hazelcast IMDG – a full-featured In-
Memory Data Grid
• Co-located Hazelcast IMDG cluster can transform and ingest data
in microseconds (see https://hazelcast.com/resources-
type/?type=Benchmark)
82. 82
The Serverless Fraud Detection
Why Hazelcast Cloud
• Managed Service for the Hazelcast IMDG – a full-featured In-
Memory Data Grid
• Co-located Hazelcast IMDG cluster can transform and ingest data
in microseconds (see https://hazelcast.com/resources-
type/?type=Benchmark)
• Comes with the Enterprise-grade Security
83. 83
The Serverless Fraud Detection
Why Hazelcast Cloud
• Managed Service for the Hazelcast IMDG – a full-featured In-
Memory Data Grid
• Co-located Hazelcast IMDG cluster can transform and ingest data
in microseconds (see https://hazelcast.com/resources-
type/?type=Benchmark)
• Comes with the Enterprise-grade Security
• AWS Lambda-ready
93. 93
Summary
• Serverless is a perfect match when you want to move fast
• You can do Low-Latency Processing in Serverless but be aware
of the common pitfalls
94. 94
Summary
• Serverless is a perfect match when you want to move fast
• You can do Low-Latency Processing in Serverless but be aware
of the common pitfalls
• Think about latency and H/A when you choose the data storage
95. 95
Summary
• Serverless is a perfect match when you want to move fast
• You can do Low-Latency Processing in Serverless but be aware
of the common pitfalls
• Think about latency and H/A when you choose the data storage
• Using the In-Memory Computing helps to reduce the FaaS costs
96. 96
Summary
• Serverless is a perfect match when you want to move fast
• You can do Low-Latency Processing in Serverless but be aware
of the common pitfalls
• Think about latency and H/A when you choose the data storage
• Using the In-Memory Computing helps to reduce the FaaS costs
• KEEP CALM and leverage 50$ trial
https://console.hazelcast.cloud
1st this term was introduced with the launch of Amazon Functions and hence is oftent associated with it but IS IT JUST a lambda functions? let’s try to learn more about what it is.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Beginning of Mainframes Era when when the giant companies like IBM or HP ruled the industry
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing.
Serverless applications
... At a back-end, you will not manage your own deployment of DB, User Authentication etc. but will be using the Cloud Provider managed services for it
... At a back-end, you will not manage your own deployment of DB, User Authentication etc. but will be using the Cloud Provider managed services for it
... At a back-end, you will not manage your own deployment of DB, User Authentication etc. but will be using the Cloud Provider managed services for it
... At a back-end, you will not manage your own deployment of DB, User Authentication etc. but will be using the Cloud Provider managed services for it
Serverless allows you to run code in…
Lambda Function is a compute service that lets you run code without provisioning or managing servers.
Let’s stop for a while here, question to you guys – what’s the most expensive thing in IT world nowadays? It’s you. And this is why the serverless can save your money. [then story about my friends]
Mention about elastic scalability
So, the Serverless is good for this, for that… but what if we want to solve some really specific problems, e.g. Low-Latency Processing?
Where the latency comes from in the Serverless?
Background threads – no possibility to do asynchronous processing
TODO: animate red boxes!!!
What are the ways to solve these problems?
How to deal with the Cold Start latencies?
Other case when we can have problems with the performance are the CPU-bound tasks
Another aspect which impacts the performance is the way we deploy our Serverless system
How to deploy the system if we want to minimise a latency?
At the end, naturally, we may cache the “hot” data - the read-mostly data which is rarely updated.
Since our “hot” data may not fit the lambda function memory, the external in-memory store is the most common choice for such cases. Why In-Memory Store?
TODO: remove “Distributed”?
TODO: review license
So, these numbers talk for themselves – In-Memory Store is what you go for when you need a low-latency data access.
Now, after we reviewed various technics how to speed-up the Serverless computing, let’s see how do we apply them in a live demo.
NOW, DEMO
Now, let’s try to use all this in practice and try to solve one of the common low-latency problems – the Fraud Detection Problem
Why we decided to build Hazelcast Cloud?
Mention that it will be public-available soon?
Mention that it is “simple to deploy and use”
Mention that it is “simple to deploy and use”
Mention that it is “simple to deploy and use”
Mention that it is “simple to deploy and use”
Mention that it is “simple to deploy and use”
Mention that it is “simple to deploy and use”
Mention that it is “simple to deploy and use”
- review s3 function
- review validate function
- review API GW
- review KeepAlive rule
- create cluster, meanwhile review code
- update functions
- enable KeepAlive rule
- call validate API
P.S. explore logs along way
Better graph?
Better graph?
Better graph?
Better graph?
Mention about Amazon FireCracker and Apache OpenWhisk.