SlideShare a Scribd company logo
Scalable Cloud Solutions
with Node.js
Aaron Michael König & Mathias Peter
Team Centric Software
Foto: JD Hancock CC BY 2.0
Mathias Peter
mp@tcs.de

8+ years experience

JS, Redis, AWS



! mpneuried
Aaron Michael König
amk@tcs.de

10+ years experience

JS, iOS, C#



! exinferis
Team Centric Software
• Webapps & native mobile apps

• Amazon Web Services since 2007

• Redis & Node.js since 2010
Node.js since the early days
Node.js since the early days
• Node.js in production since 0.4
Node.js since the early days
• Node.js in production since 0.4
• Developed many building blocks in Node.js
Node.js since the early days
• Node.js in production since 0.4
• Developed many building blocks in Node.js
• Many microservices on Node.js
Node.js since the early days
• Node.js in production since 0.4
• Developed many building blocks in Node.js
• Many microservices on Node.js
• Released quite a few open source modules over the years
Scalable Cloud Solutions with Node.js
Node.js in customer projects
Cloud based setup.Electronic fitness devices.
Software in a health club?
Advanced electronic fitness devices?
Foto: JD Hancock CC BY 2.0
Software in a health club?
Advanced electronic fitness devices?
WAT?
Foto: JD Hancock CC BY 2.0
Training the “old way”
Training plan
Training the “old way”
Training plan
Training the “old way”
Training plan Training plan
Training the “old way”
Training the “milon way”
Training the “milon way”
☁️
Training the “milon way”
Training plan
☁️
Training the “milon way”
Training plan
milon care device logins
Scalability
Foto: JD Hancock CC BY 2.0
Bilder?
Asynchronous TasksSynchronous Tasks
Foto: JD Hancock CC BY 2.0
Scaling for synchronous tasks
• more servers

• better hardware

• storage

• Autoscaling
Scaling for synchronous tasks
Load
Balancer
Redis
MySQL
MySQL
S3 DynamoDB
EC2 Instances
Scaling for synchronous tasks
Load
Balancer
Redis
MySQL
MySQL
S3 DynamoDB
EC2 Instances
Autoscale
Scaling for synchronous tasks
Load
Balancer
Redis
MySQL
MySQL
S3 DynamoDB
EC2 Instances
Processing
Autoscale
Scaling for synchronous tasks
Load
Balancer
Redis
MySQL
MySQL
S3 DynamoDB
EC2 Instances
Scaling for asynchronous tasks
Queueing
• Logs

• Training archiving

• Training results

• Statistics

• House keeping

• Achievements
Scaling for asynchronous tasks
Queueing
Advantages of Queueing
Advantages of Queueing
• Asynchronous Execution

• Distribution of work

• Reliability

• Guaranteed success or failure
Queueing
… or how a queue should work
Foto: JD Hancock CC BY 2.0
Scalable Cloud Solutions with Node.js
Queue
create queue
message D
Queue
message C
message B
message A
create queueadd messages …
message D
Queue
message C
message B
message A
create queueadd messages …
Worker
create a worker
Worker
message D
Queue
message C
message B
message Acopy
receive and …
message A
Worker
message D
Queue
message C
message B
message Acopy
receive and …
message A
process
invisible for 30s
Worker
message D
Queue
message C
message B
delete on success
message A message Acopy
Worker
message D
Queue
message C
message B
delete on success
Worker
Queue
message D
message C
message Bcopy
receive and …
message B
Worker
Queue
message D
message C
message Bcopy
receive and …
message B
process
invisible for 30s
Worker
Queue
message D
message C
message B message Bcopy
Worker
Queue
message D
message C
💩 ERROR !
message B
Worker
message Bcopy
Worker
Queue
message D
message C
message B
… remain within stack
Wait … SCALING !
Foto: JD Hancock CC BY 2.0
Queue
message D
multiple workers 👍
Worker
message Ccopymessage C
Worker
message Bcopymessage B
Work
er
Work
er
Worker
Worker
Queue
message D
multiple workers 👍
Worker
message Ccopy
message C
Worker
message Bcopymessage B
Work
er
Work
er
Worker
Worker
Redis Simple Message Queue
RSMQ made by
npm install rsmq
Design concept
Simple & Fast
Only Redis - No management server
Guaranteed delivery to a single recipient
Visibility timeout for received messages
Design concept
How to …
Foto: JD Hancock CC BY 2.0
Scalable Cloud Solutions with Node.js
rsmq.createQueue({qname:"foo", vt:30}, function(err, created){
// ...
});
create
rsmq.createQueue({qname:"foo", vt:30}, function(err, created){
// ...
});
rsmq.sendMessage({qname:"foo", message:"bar"}, function(err){
// ...
});
create
send
rsmq.createQueue({qname:"foo", vt:30}, function(err, created){
// ...
});
rsmq.sendMessage({qname:"foo", message:"bar"}, function(err){
// ...
});
rsmq.receiveMessage({qname:"foo"}, function(err, message){
// ... { id: "42abc", message: "bar", rc: 1, ... }
});
create
send
receive
rsmq.createQueue({qname:"foo", vt:30}, function(err, created){
// ...
});
rsmq.sendMessage({qname:"foo", message:"bar"}, function(err){
// ...
});
rsmq.receiveMessage({qname:"foo"}, function(err, message){
// ... { id: "42abc", message: "bar", rc: 1, ... }
});
create
send
receive
rsmq.deleteMessage({qname:"foo", id: msgid}, function(err, success){
// ...
});
delete
Foto: JD Hancock CC BY 2.0
Foto: JD Hancock CC BY 2.0
npm install rsmq-worker
How to …
Foto: JD Hancock CC by 2.0
Scalable Cloud Solutions with Node.js
var RSMQWorker = require( "rsmq-worker" );
var worker = new RSMQWorker( "foo" ); // poll the "foo" queueinit
var RSMQWorker = require( "rsmq-worker" );
var worker = new RSMQWorker( "foo" ); // poll the "foo" queue
worker.on("message", function(message, next, msgid){
// ... processing
next(); // on error use: next( err );
});
init
listen
var RSMQWorker = require( "rsmq-worker" );
var worker = new RSMQWorker( "foo" ); // poll the "foo" queue
worker.on("message", function(message, next, msgid){
// ... processing
next(); // on error use: next( err );
});
worker.start();
init
listen
start
var RSMQWorker = require( "rsmq-worker" );
var worker = new RSMQWorker( "foo" ); // poll the "foo" queue
worker.on("message", function(message, next, msgid){
// ... processing
next(); // on error use: next( err );
});
worker.start();
init
listen
start
worker.send(„bar"); // send to "foo"send
DEMO
Foto: JD Hancock CC by 2.0
Demo results
1x worker.js 4x worker.js
performance
> 250%
Lightweight

just redis

No overhead

trusted environments only, no security

Fast

depends on redis
Features
Want more?
Terminal Client
RSMQ
rest-interface
REST Interface
For PHP, ASP, Curl …
rsmq-cli (under dev.)
RSMQ
cli
Monitoring
Usage charts
rsmq-monitor (planned)
RSMQ
monitor
Notification Engine
Email Buffer
Questions?
Foto: JD Hancock CC by 2.0
Team Centric Software:
http://www.tcs.de/
RSMQ:
! http://smrchy.github.io/rsmq/
RSMQ-worker:
! https://github.com/mpneuried/rsmq-worker
Demo-Source:
! https://github.com/mpneuried/rsmq-mnug-demo
Images:
Thanks to JD Hancock for providing CC licensed images
Credits
Scalable Cloud Solutions with Node.js
RabbitMQ

management server

Kue

too complex and not lightweight

SQS

only AWS, higher latency

Redis-List

we need more than that
Why not use …?

More Related Content

PDF
Why and how we built teowaki
PDF
GCPUG meetup 201610 - Dataflow Introduction
ZIP
MacRuby to The Max
KEY
Mac ruby to the max - Brendan G. Lim
PPTX
Evolution of a cloud start up: From C# to Node.js
PDF
Why Grails?
PDF
CloudFork
PPTX
Azure sql insert perf
Why and how we built teowaki
GCPUG meetup 201610 - Dataflow Introduction
MacRuby to The Max
Mac ruby to the max - Brendan G. Lim
Evolution of a cloud start up: From C# to Node.js
Why Grails?
CloudFork
Azure sql insert perf

What's hot (19)

PDF
COSCUP 2017 - infrastructure As Code
PDF
Node.js introduction
PPTX
Promises, Promises
PDF
AWS ElasticBeanstalk and Docker
PDF
MongoDB and Node.js
PDF
Altitude SF 2017: Nomad and next-gen application architectures
PPTX
High Performance API Mashups with Node.js and ql.io
PDF
Analyse Yourself
PDF
JS Chicago Meetup 2/23/16 - Redux & Routes
PDF
"Service Worker: Let Your Web App Feel Like a Native "
PDF
Nodejs meetup-12-2-2015
KEY
Core animation
PPTX
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
PDF
Web Development with NodeJS
PDF
TIAD 2016 : Using and abusing container metadata
PDF
Communication tool & Environment for Remote Worker
PPTX
Run C++ as serverless with GCP Cloud Functions
PDF
Terraform in deployment pipeline
PDF
HTTPBuilder NG: Back From The Dead
COSCUP 2017 - infrastructure As Code
Node.js introduction
Promises, Promises
AWS ElasticBeanstalk and Docker
MongoDB and Node.js
Altitude SF 2017: Nomad and next-gen application architectures
High Performance API Mashups with Node.js and ql.io
Analyse Yourself
JS Chicago Meetup 2/23/16 - Redux & Routes
"Service Worker: Let Your Web App Feel Like a Native "
Nodejs meetup-12-2-2015
Core animation
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
Web Development with NodeJS
TIAD 2016 : Using and abusing container metadata
Communication tool & Environment for Remote Worker
Run C++ as serverless with GCP Cloud Functions
Terraform in deployment pipeline
HTTPBuilder NG: Back From The Dead
Ad

Similar to Scalable Cloud Solutions with Node.js (20)

PPTX
NServiceBus - introduction to a message based distributed architecture
PPTX
Open Source Versions of Amazon's SNS and SQS.pptx
PDF
Work Queue Systems
PDF
Ironmq slides
PPTX
Real-time Communication using SignalR and cloud
ODP
Art Of Message Queues
PPTX
Scalable Web Apps
PDF
Queues queues queues — How RabbitMQ enables reactive architectures
ODP
The Art of Message Queues - TEKX
PDF
Queue Everything and Please Everyone
PDF
RabbitMQ Status Quo Critical Review
PDF
Microservices using Node.js and RabbitMQ
PPTX
Overview of Message Queues
PPT
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
KEY
Cooking a rabbit pie
PDF
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
ODP
Introduction to Python Celery
PDF
Enterprise messaging
PPTX
ODP
Deferred Processing in Ruby - Philly rb - August 2011
NServiceBus - introduction to a message based distributed architecture
Open Source Versions of Amazon's SNS and SQS.pptx
Work Queue Systems
Ironmq slides
Real-time Communication using SignalR and cloud
Art Of Message Queues
Scalable Web Apps
Queues queues queues — How RabbitMQ enables reactive architectures
The Art of Message Queues - TEKX
Queue Everything and Please Everyone
RabbitMQ Status Quo Critical Review
Microservices using Node.js and RabbitMQ
Overview of Message Queues
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Cooking a rabbit pie
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
Introduction to Python Celery
Enterprise messaging
Deferred Processing in Ruby - Philly rb - August 2011
Ad

Recently uploaded (20)

PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
medical staffing services at VALiNTRY
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
L1 - Introduction to python Backend.pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
ai tools demonstartion for schools and inter college
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
AI in Product Development-omnex systems
PPTX
Essential Infomation Tech presentation.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Introduction to Artificial Intelligence
PDF
top salesforce developer skills in 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Operating system designcfffgfgggggggvggggggggg
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Design an Analysis of Algorithms I-SECS-1021-03
medical staffing services at VALiNTRY
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 41
L1 - Introduction to python Backend.pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
ai tools demonstartion for schools and inter college
Design an Analysis of Algorithms II-SECS-1021-03
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
AI in Product Development-omnex systems
Essential Infomation Tech presentation.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Introduction to Artificial Intelligence
top salesforce developer skills in 2025.pdf

Scalable Cloud Solutions with Node.js