Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
8 1-2 things about serverless
Search
Slobodan Stojanović
May 09, 2017
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
8 1-2 things about serverless
Presentation from GeekNight #5
Slobodan Stojanović
May 09, 2017
Transcript
103 slides
THINGS ABOUT SERVERLESS WITH NODE.JS
I AM SLOBODAN STOJANOVIĆ CTO OF CLOUD HORIZON AND JS
BELGRADE MEETUP ORGANIZER github.com/stojanovic twitter.com/slobodan_
SOME OF THE QUESTIONS I WILL TRY TO ANSWER TODAY
• WHAT IS SERVERLESS? • HOW DOES IT WORK? •
WHY IS IT IMPORTANT? • MOST IMPORTANT SERVERLESS PLATFORMS? • PROGRAMMING LANGUAGES? • WHAT CAN TRIGGER SERVERLESS FUNCTION? • HOW DOES IT WORK WITH NODE.JS? • WHEN SHOULD I USE IT?
1. WHAT IS SERVERLESS?
LET’S TRY TO EXPLAIN HOW IT WORKS USING LEGO BRICKS
Imagine Lego 4x4 white piece is a physical server
Building and deploying monolith app
Then people start using it and you need to scale
Then people start using it and you need to scale
You need to scale everything, but only green and blue
parts are really used
MICROSERVICES TO THE RESCUE
Hello, from our physical server, again! Now it can be
in the cloud, it doesn’t matter
Now each service should be independent, right?
Scaling is easy
And if no one is using some service it’s simple
to remove or replace it
And if no one is using some service it’s simple
to remove or replace it
ARE SERVERS THAT CHEAP?
How do we make microservices cheaper?
How do we make microservices cheaper?
By bundling them together
By bundling them together
By bundling them together
BETTER, RIGHT? BUT…
WHAT IF WE DON’T NEED 4x4 PIECE ANYMORE?
Imagine our microservices without 4x4 white pieces!
Imagine our microservices without 4x4 white pieces!
Than scaling is simply adding more services
Than scaling is simply adding more services
And, if we don’t need some service…
And, if we don’t need some service…
And, if we don’t need some service…
NOW IMAGINE THAT SCALING AND REMOVING ARE DONE AUTOMATICALLY
ALSO IMAGINE THAT YOU PAY ONLY FOR THE PARTS THAT
YOU ARE USING AT THE MOMENT
WELL, THAT’S SERVERLESS!
Our 4x4 white piece still exists, but it’s not our
problem anymore
SO SERVERLESS IS SIMPLY PLATFORM-AS-A-SERVICE
OR MORE RECENTLY FUNCTION-AS-A-SERVICE
None
2. HOW DOES IT WORK?
EVENT-DRIVEN
None
None
None
3. WHY IS IT IMPORTANT?
• MINIMAL MAINTENANCE • NO CONFIGURATION • REAL MICROSERVICES •
AUTO SCALING • FINANCIAL INCENTIVES
https://gojko.net/2016/08/27/serverless.html
4. WHAT ARE THE MOST IMPORTANT SERVERLESS PLATFORMS?
None
None
None
None
• TIMEOUT BETWEEN 1 AND 300 SECONDS • 128MB TO
1.5GB OF MEMORY • 500MB OF NON-PERSISTENT STORAGE (/TMP) • DEFAULT CONCURRENT EXECUTION LIMIT: 1000
• $0.20 PER 1 MILLION REQUESTS • FIRST MILLION REQUESTS
/ MONTH ARE FREE • $0.00001667 FOR EVERT GB-SECOND • FIRST 400.000 GB-SECONDS / MONTH ARE FREE
LAMBDA @ EDGE
5. WHAT PROGRAMMING LANGUAGES CAN I USE?
• NODE.JS • PYTHON • JAVA • C# • SHELL
SCRIPTS • ANY EXECUTABLE AWS LAMBDA
• NODE.JS • C# • F# • PYHON • PHP
• SHELL SCRIPTS • ANY EXECUTABLE AZURE FUNCTIONS
GOOGLE CODE FUNCTIONS JUST NODE.JS AT THE MOMENT
6. WHAT CAN TRIGGER SERVERLESS FUNCTION?
API Gateway Amazon S3 DynamoDB Amazon Aurora Simple Notification Service
Simple Email Service Amazon Cognito CloudWatch Kinesis Streams Kinesis Firehose AWS CloudFormation AWS CodeCommit Amazon Lex AWS Config AWS Snowball
7. HOW DOES IT WORK WITH NODE.JS?
NODE WORKS PERFECTLY WITH LAMBDA
NODE WORKS PERFECTLY WITH LAMBDA Almost
PROS
• GOOD START-UP PERFORMANCE • SMALL MODULES • GOOD PERFORMANCE
WITH LOW MEMORY AND CPU • SINGLE THREAD • ASYNC • EASY TO LEARN
CONS
• NODE_MODULES SIZE • SINGLE THREAD • ASYNC • EASY
TO LEARN BUT EASY TO FUCKUP
FRAMEWORKS
• SERVERLESS FRAMEWORK • CLAUDIA.JS • APEX
CLAUDIAJS.COM
CLAUDIAJS.COM > 64.000 DOWNLOADS
None
“HELLO WORLD”
'use strict' const Api = require('claudia-api-builder') const api = new
Api() const excuse = require('huh') api.get('/', () => { return excuse.get() }) module.exports = api api.js
claudia create \ --region eu-central-1 \ --api-module api deploy
{ "lambda": { "role": "geeknight-executor", "name": "geeknight", "region": "eu-central-1" },
"api": { "id": "d1weoszyg7", "module": "api", "url": "https://d1weoszyg7.execute-api.eu-central-1.amazonaws.com/latest" } } result
http://bit.ly/2pfNjGL
None
CHATBOTS
None
8. WHEN SHOULD I USE SERVERLESS?
OR EVEN MORE IMPORTANT
WHEN YOU SHOULD NOT USE SERVERLESS?
• REAL-TIME APPS WITH WEB SOCKETS • LOW-LATENCY APPS •
WHEN YOU NEED CUSTOM SERVER CONFIG • WHEN YOU NEED COMPLIANCE • LONG RUNNING TASKS • COMPEX COMPUTING • WHEN YOU NEED TO PROVIDE SLA
8 1/2. WAIT, WHAT ABOUT THE NAME?
WELL…
None
2012
“Why The Future Of Software And Apps Is Serverless" by
Ken Fromm
2014
AWS LAMBDA
2015
API GATEWAY
“Servers are dead.." by Ant Stanley
“Servers are dead.." by Ant Stanley
JAWS BECOMES SERVERLESS FRAMEWORK
2016
“SERVERLESS” IS JUST A NAME. WE COULD HAVE CALLED IT
“JEFF” Paul Johnston
NOW
SERVERLESS IS EVERYWHERE
THAT'S IT. THANKS!
QUESTIONS? twitter.com/slobodan_ speakerdeck.com/slobodan/ 8-1-2-things-about-serverless
More Decks by Slobodan Stojanović
See All by Slobodan Stojanović
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
AI Agents: How Do They Work and How to Build Them @ Shift 2025
slobodan
0
250
Prompt Engineering for Developers @ AWS Community Day Timișoara
slobodan
0
190
AI Agents with JavaScript
slobodan
0
510
Prompt Engineering for Developers @ AWS Community Day Adria 2024
slobodan
0
360
From 1 to 250 Lambda Functions in Production: Evolving a Startup Serverless Architecture @ Serverless Days Milan
slobodan
0
250
Building Production-Ready Apps with AI
slobodan
0
400
Advanced GraphQL Architectures: Serverless Event Sourcing and CQRS @ ReactSummit
slobodan
0
350
CofounderGPT - Can an AI be a better co-founder than a human?
slobodan
0
270
Other Decks in Technology
See All in Technology
Terraform 0 to 100:100個以上のリポジトリを常に最新にし続けるための自動化
sue445
3
1.4k
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
160
IoTのデータ保存をSREの観点で考える
grimoh
1
120
常時稼働エージェントの作り方(Claude公式ブログを資料化)
minorun365
PRO
19
29k
Kubernetes, Agones, WebRTC, GPU で作る クラウドゲーミング基盤を本番運用に乗せるまで
vivion
0
270
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
240
セキュリティチームは どのコンテナイメージの脆弱性対応を優先すべきか 〜CISA新指針とSCCで作る脆弱性トリアージ〜
swdtkuy
0
300
ポケモンバトルのAIエージェント
koji_kawamura
0
150
コーディングできない僕にBobが舞い降りた
shumpei3
0
190
OCI Artifact による自動運転タクシーに向けた OTA 基盤の構築
biwashi
1
290
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
140
【Oracle AI SPOTLIGHT ウェビナー】AI時代、狙われるデータと止められない業務をどう守るか?
oracle4engineer
PRO
1
140
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
370
Building the Perfect Custom Keyboard
takai
2
970
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
310
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Documentation Writing (for coders)
carmenintech
77
5.6k
Utilizing Notion as your number one productivity tool
mfonobong
4
650
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k