Node Interactive: Node.js Performance and Highly Scalable Micro-Services

Chris Bailey
Chris BaileyDistinguished Engineer, IBM Observability and AIOps à IBM
Highly Scalable

Node.js Microservices




Chris Bailey
(@Chris__Bailey) 

Node.js and Swift Runtimes
Chris Vignola
(@ChrisVignola) 

Cloud Native Node.js
: Key Technologies
: Key Technologies
Container
: Key Technologies
Container Orchestration
: Key Technologies
Container Orchestration
Package and Deploy
: Key Technologies
Container Orchestration
MonitoringPackage and Deploy
: Key Technologies
Container Orchestration
Monitoring Distributed TracingPackage and Deploy
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
0
1,150
IO Speed
• Performance
• Scale
MICROSERVICES: Key Performance Characteristics
0
300
600
900
200
0
1,150
IO Speed
• Performance
• Scale
MICROSERVICES: Key Performance Characteristics
0
300
600
900
200
897
1,150
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150
Startup
• Availability
• Scaling
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150
00.9
Startup
• Availability
• Scaling
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150 13.7
0.9
Startup
• Availability
• Scaling
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150 13.7
0.9
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150 13.7
0.9 023.6
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150 13.7
0.9
422
23.6
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
Benchmarking WG: Performance Gains
IO Speed
• Performance
• Scale
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
3,049
2,914
2,076
1,866
4.x master6.x 8.x
Benchmarking WG: Performance Gains
IO Speed
• Performance
• Scale
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
50,42052,640
42,500
71,000
3,049
2,914
2,076
1,866
4.x master6.x 8.x 4.x master6.x 8.x
Benchmarking WG: Performance Gains
IO Speed
• Performance
• Scale
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
50,42052,640
42,500
71,000
89,024
92,84091,47688,9603,049
2,914
2,076
1,866
4.x master6.x 8.x 4.x master6.x 8.x 4.x master6.x 8.x
Benchmarking WG: Performance Gains
IO Speed
• Performance
• Scale
Building Scalable
Microservices
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
const appName = require('./../package').name;
const express = require('express');
const log4js = require(‘log4js');
const logger = log4js.getLogger(appName);
const app = express();
app.get('/', function (req, res) {
res.send('Hello World!')
})
const port = process.env.PORT || 3000;
app.listen(port, function(){
logger.info(`Express listening on: ` + port);
});
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
FROM ibmcom/ibmnode
ENV NODE_ENV production
ENV PORT 3000
WORKDIR "/app"
# Install app dependencies
COPY package.json /app/
RUN cd /app; npm install
# Bundle app source
COPY . /app
EXPOSE 3000
CMD ["npm", "start"]
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
node_modules/
npm-debug.log
$ docker build -t <your username>/node-app .

$ docker build -t <your username>/node-app .

$ docker run -p 49160:3000 -d <your username>/node-app
$ docker build -t <your username>/node-app .

$ docker run -p 49160:3000 -d <your username>/node-app
$ docker build -t <your username>/node-app .

$ docker run -p 49160:3000 -d <your username>/node-app
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
chart/node-app/Chart.yaml
chart/node-app/templates/deployment.yaml
chart/node-app/templates/hpa.yaml
chart/node-app/templates/service.yaml
chart/node-app/values.yaml
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
chart/node-app/Chart.yaml
chart/node-app/templates/deployment.yaml
chart/node-app/templates/hpa.yaml
chart/node-app/templates/service.yaml
chart/node-app/values.yaml
HELM CHARTS
apiVersion: v1
description: A Helm chart for Kubernetes
name: node-app
version: 1.0.0
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
chart/node-app/Chart.yaml
chart/node-app/templates/deployment.yaml
chart/node-app/templates/hpa.yaml
chart/node-app/templates/service.yaml
chart/node-app/values.yaml
HELM CHARTS
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: “node-app-deployment"
labels:
chart: “node-app-1.0.0”
spec:
replicas: “5”
revisionHistoryLimit: “1”
template:
metadata:
labels:
app: “node-app-selector"
version: “1.0.0”
spec:
containers:
- name: “node-app”
image: “repository:1.0.0”
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 3000
periodSeconds: 1000
resources:
requests:
cpu: "200m"
memory: "300Mi"
env:
- name: PORT
value : “3000”
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
chart/node-app/Chart.yaml
chart/node-app/templates/deployment.yaml
chart/node-app/templates/hpa.yaml
chart/node-app/templates/service.yaml
chart/node-app/values.yaml
HELM CHARTS
apiVersion: autoscaling/v2alpha1
kind: HorizontalPodAutoscaler
metadata:
name: “node-app-hpa-policy"
namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1beta1
kind: Deployment
name: “node-app-deployment"
minReplicas: 5
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 70
- type: Resource
resource:
name: memory
targetAverageUtilization: 70
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ”5”
let b = 3
public/*
test/*
server/server.js
package.json
README.md
.gitignore
Dockerfile
Dockerfile-tools
.dockerignore
chart/node-app/Chart.yaml
chart/node-app/templates/deployment.yaml
chart/node-app/templates/hpa.yaml
chart/node-app/templates/service.yaml
chart/node-app/values.yaml
HELM CHARTS
apiVersion: v1
kind: Service
metadata:
name: “node-app“
labels:
chart: “node-app-1.0.0”
spec:
type: NodePort
ports:
- port: 3000
selector:
app: “node-app-selector"
$ helm package ./chart/node-app
$ helm package ./chart/node-app
$ helm install ./node-app-1.0.0.tgz
$ helm package ./chart/node-app
$ helm install ./node-app-1.0.0.tgz
$ helm package ./chart/node-app
$ helm install ./node-app-1.0.0.tgz
Understanding
Microservices Performance
PUBLIC NETWORK CLOUD NETWORK
CATALOG
ORDER
INVENTORY
USER
MySQL
MongoDB
SPARK
ELASTICSEARCH
BACKEND FOR

FRONTEND
MICROSERVICES SERVICES
LOAD

BALANCER
PUBLIC NETWORK CLOUD NETWORK
CATALOG
ORDER
INVENTORY
USER
MySQL
MongoDB
SPARK
ELASTICSEARCH
BACKEND FOR

FRONTEND
MICROSERVICES SERVICES
LOAD

BALANCER
PUBLIC NETWORK CLOUD NETWORK
CATALOG
ORDER
INVENTORY
USER
MySQL
MongoDB
SPARK
ELASTICSEARCH
BACKEND FOR

FRONTEND
MICROSERVICES SERVICES
LOAD

BALANCER
PUBLIC NETWORK CLOUD NETWORK
CATALOG
ORDER
INVENTORY
USER
MySQL
MongoDB
SPARK
ELASTICSEARCH
BACKEND FOR

FRONTEND
MICROSERVICES SERVICES
LOAD

BALANCER
PUBLIC NETWORK CLOUD NETWORK
CATALOG
ORDER
INVENTORY
USER
MySQL
MongoDB
SPARK
ELASTICSEARCH
BACKEND FOR

FRONTEND
MICROSERVICES SERVICES
LOAD

BALANCER
PUBLIC NETWORK CLOUD NETWORK
CATALOG
ORDER
INVENTORY
USER
MySQL
MongoDB
SPARK
ELASTICSEARCH
BACKEND FOR

FRONTEND
MICROSERVICES SERVICES
LOAD

BALANCER
PUBLIC NETWORK CLOUD NETWORK
CATALOG
ORDER
INVENTORY
USER
MySQL
MongoDB
SPARK
ELASTICSEARCH
BACKEND FOR

FRONTEND
MICROSERVICES SERVICES
LOAD

BALANCER
BROWSER
TIME
BROWSER
LOAD BALANCER
TIME
BROWSER
LOAD BALANCER
WEB BFF
TIME
BROWSER
LOAD BALANCER
WEB BFF
ORDER SERVICE
TIME
BROWSER
LOAD BALANCER
WEB BFF
ORDER SERVICE
MongoDB
TIME
BROWSER
LOAD BALANCER
WEB BFF
ORDER SERVICE
MongoDB
INVENTORY SERVICE
TIME
MySQL
BROWSER
LOAD BALANCER
WEB BFF
ORDER SERVICE
MongoDB
INVENTORY SERVICE
TIME
MySQL
BROWSER
LOAD BALANCER
WEB BFF
ORDER SERVICE
MongoDB
INVENTORY SERVICE
MongoDB
TIME
• Collects data from each enabled service

• Propagates correlation ID using HTTP headers

• Provides sampling, tracing, and debug capabilities
• Collects microsecond timestamps

• Correlates data in Zipkin server
• Presents data in Zipkin dashboard
Request Tracking: OpenTracing and Zipkin
const zipkin = require(‘appmetrics-zipkin’);
const rest = require(‘rest');
const express = require('express');
const app = express();
app.get('/', (req, res) => {
rest('http://localhost:9000/api')
.then(response => res.send(response.entity))
.catch(err => console.error('Error', err.stack));
});
const port = process.env.PORT || 3000;
app.listen(port, function(){
logger.info(`Express listening on: ` + port);
});
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
• Collects data from each enabled service

• Requires /metrics endpoint providing data

• Provides storage and correlation capabilities
• Provide customisable dashboard

• Integrates with Graphana, Graphite, etc
Microservice Metrics: Prometheus
const zipkin = require(‘appmetrics-zipkin’);
const prometheus = require(‘appmetrics-prometheus’).attach();
const rest = require(‘rest');
const express = require('express');
const app = express();
app.get('/', (req, res) => {
rest('http://localhost:9000/api')
.then(response => res.send(response.entity))
.catch(err => console.error('Error', err.stack));
});
const port = process.env.PORT || 3000;
app.listen(port, function(){
logger.info(`Express listening on: ` + port);
});
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
• ‘appmetrics-dash’ provides self-hosted monitoring

• Inbound and Outbound request performance
• Resource and event loop monitoring
• Request a node-report

• Enable profiling and flame graphs
Deep Analysis: ‘appmetrics-dash’ and Flame Graphs
const zipkin = require(‘appmetrics-zipkin’);
const prometheus = require(‘appmetrics-prometheus’).attach();
const dash = require(‘appmetrics-dash’).attach();
const rest = require(‘rest');
const express = require('express');
const app = express();
app.get('/', (req, res) => {
rest('http://localhost:9000/api')
.then(response => res.send(response.entity))
.catch(err => console.error('Error', err.stack));
});
const port = process.env.PORT || 3000;
app.listen(port, function(){
logger.info(`Express listening on: ` + port);
});
‘appmetrics-dash’
‘appmetrics-dash’
‘appmetrics-dash’
$ yo nodeserver$ yo nodeserver
developer.ibm.com/node
const rest = require(‘rest');
const express = require('express');
const CLSContext = require('zipkin-context-cls');
const {Tracer} = require('zipkin');
const {recorder} = require('./recorder');
const ctxImpl = new CLSContext('zipkin');
const tracer = new Tracer({ctxImpl, recorder});
const app = express();
const zipkinMiddleware = require('zipkin-instrumentation-express').expressMiddleware;
app.use(zipkinMiddleware({tracer, serviceName: 'frontend'}));
const {restInterceptor} = require('zipkin-instrumentation-cujojs-rest');
const zipkinRest = rest.wrap(restInterceptor, {tracer, remoteServiceName: ‘backend'});

app.get('/', (req, res) => {
zipkinRest('http://localhost:9000/api')
.then(response => res.send(response.entity))
.catch(err => console.error('Error', err.stack));
});
1 sur 70

Recommandé

IBM Cloud University: Build, Deploy and Scale Node.js Microservices par
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesChris Bailey
543 vues88 diapositives
Swift Cloud Workshop - Swift Microservices par
Swift Cloud Workshop - Swift MicroservicesSwift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift MicroservicesChris Bailey
2.4K vues80 diapositives
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More par
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
842 vues203 diapositives
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401) par
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)Amazon Web Services
2.6K vues74 diapositives
Transforming Infrastructure into Code - Importing existing cloud resources u... par
Transforming Infrastructure into Code  - Importing existing cloud resources u...Transforming Infrastructure into Code  - Importing existing cloud resources u...
Transforming Infrastructure into Code - Importing existing cloud resources u...Shih Oon Liong
2.8K vues57 diapositives
Terraform at Scale par
Terraform at ScaleTerraform at Scale
Terraform at ScaleCalvin French-Owen
1.6K vues85 diapositives

Contenu connexe

Tendances

Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv par
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Amazon Web Services
5.9K vues28 diapositives
Final terraform par
Final terraformFinal terraform
Final terraformGourav Varma
464 vues59 diapositives
Run your Java apps on Cloud Foundry par
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryAndy Piper
2.4K vues49 diapositives
Debasihish da final.ppt par
Debasihish da final.pptDebasihish da final.ppt
Debasihish da final.pptKalkey
33 vues49 diapositives
Helm intro par
Helm introHelm intro
Helm introHaggai Philip Zagury
2.7K vues98 diapositives
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09) par
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)Stephane Jourdan
6.6K vues49 diapositives

Tendances(20)

Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv par Amazon Web Services
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Run your Java apps on Cloud Foundry par Andy Piper
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud Foundry
Andy Piper2.4K vues
Debasihish da final.ppt par Kalkey
Debasihish da final.pptDebasihish da final.ppt
Debasihish da final.ppt
Kalkey33 vues
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09) par Stephane Jourdan
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Stephane Jourdan6.6K vues
Terraform - Taming Modern Clouds par Nic Jackson
Terraform  - Taming Modern CloudsTerraform  - Taming Modern Clouds
Terraform - Taming Modern Clouds
Nic Jackson383 vues
Developingapiplug insforcs-151112204727-lva1-app6891 par NetApp
Developingapiplug insforcs-151112204727-lva1-app6891Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891
NetApp54 vues
Heat optimization par Rico Lin
Heat optimizationHeat optimization
Heat optimization
Rico Lin547 vues
Deploying deep learning models with Kubernetes and Kubeflow par DataPhoenix
Deploying deep learning models with Kubernetes and KubeflowDeploying deep learning models with Kubernetes and Kubeflow
Deploying deep learning models with Kubernetes and Kubeflow
DataPhoenix108 vues
Introduction to Cloud Foundry #JJUG par Toshiaki Maki
Introduction to Cloud Foundry #JJUGIntroduction to Cloud Foundry #JJUG
Introduction to Cloud Foundry #JJUG
Toshiaki Maki9.9K vues
Antons Kranga Building Agile Infrastructures par Antons Kranga
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
Antons Kranga1.8K vues
So I Wrote a Manifest par Puppet
So I Wrote a ManifestSo I Wrote a Manifest
So I Wrote a Manifest
Puppet2.1K vues
BOSH / CF Deployment in modern ways #cf_tokyo par Toshiaki Maki
BOSH / CF Deployment in modern ways #cf_tokyoBOSH / CF Deployment in modern ways #cf_tokyo
BOSH / CF Deployment in modern ways #cf_tokyo
Toshiaki Maki4.9K vues

Similaire à Node Interactive: Node.js Performance and Highly Scalable Micro-Services

Node Summit 2018: Cloud Native Node.js par
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsChris Bailey
707 vues99 diapositives
StrongLoop Overview par
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
2.3K vues44 diapositives
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-... par
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Daniel Bryant
368 vues30 diapositives
Open shift enterprise 3.1 paas on kubernetes par
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetesSamuel Terburg
3.1K vues29 diapositives
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere) par
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)Docker, Inc.
23.2K vues40 diapositives
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs par
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbsAWS Chicago
378 vues50 diapositives

Similaire à Node Interactive: Node.js Performance and Highly Scalable Micro-Services(20)

Node Summit 2018: Cloud Native Node.js par Chris Bailey
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
Chris Bailey707 vues
StrongLoop Overview par Shubhra Kar
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
Shubhra Kar2.3K vues
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-... par Daniel Bryant
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Daniel Bryant368 vues
Open shift enterprise 3.1 paas on kubernetes par Samuel Terburg
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetes
Samuel Terburg3.1K vues
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere) par Docker, Inc.
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)
Docker, Inc.23.2K vues
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs par AWS Chicago
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
AWS Chicago378 vues
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus par Emily Jiang
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
Emily Jiang114 vues
All Things Open 2019 weave-services-istio par Lin Sun
All Things Open 2019 weave-services-istioAll Things Open 2019 weave-services-istio
All Things Open 2019 weave-services-istio
Lin Sun97 vues
Ato2019 weave-services-istio par Lin Sun
Ato2019 weave-services-istioAto2019 weave-services-istio
Ato2019 weave-services-istio
Lin Sun98 vues
AWS Lambda with Serverless Framework and Java par Manish Pandit
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and Java
Manish Pandit2.4K vues
Cloud-native applications with Java and Kubernetes - Yehor Volkov par Kuberton
 Cloud-native applications with Java and Kubernetes - Yehor Volkov Cloud-native applications with Java and Kubernetes - Yehor Volkov
Cloud-native applications with Java and Kubernetes - Yehor Volkov
Kuberton393 vues
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World par Chris Bailey
Silicon Valley Code Camp 2019 - Reaching the Cloud Native WorldSilicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
Chris Bailey591 vues
Amazon Web Services and Docker: from developing to production par Paolo latella
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to production
Paolo latella1.5K vues
Real World Lessons on the Pain Points of Node.JS Application par Ben Hall
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
Ben Hall688 vues
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax... par DevDay.org
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
DevDay.org469 vues
Burn down the silos! Helping dev and ops gel on high availability websites par Lindsay Holmwood
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
Lindsay Holmwood1.6K vues

Plus de Chris Bailey

NodeJS Interactive 2019: FaaS meets Frameworks par
NodeJS Interactive 2019:  FaaS meets FrameworksNodeJS Interactive 2019:  FaaS meets Frameworks
NodeJS Interactive 2019: FaaS meets FrameworksChris Bailey
346 vues72 diapositives
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS par
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaSVoxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaSChris Bailey
188 vues82 diapositives
FaaS Meets Java EE: Developing Cloud Native Applications at Speed par
FaaS Meets Java EE: Developing Cloud Native Applications at SpeedFaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at SpeedChris Bailey
396 vues105 diapositives
AltConf 2019: Server-Side Swift State of the Union par
AltConf 2019:  Server-Side Swift State of the UnionAltConf 2019:  Server-Side Swift State of the Union
AltConf 2019: Server-Side Swift State of the UnionChris Bailey
673 vues122 diapositives
Server-side Swift with Swagger par
Server-side Swift with SwaggerServer-side Swift with Swagger
Server-side Swift with SwaggerChris Bailey
556 vues32 diapositives
Index - BFFs vs GraphQL par
Index - BFFs vs GraphQLIndex - BFFs vs GraphQL
Index - BFFs vs GraphQLChris Bailey
1.7K vues98 diapositives

Plus de Chris Bailey(20)

NodeJS Interactive 2019: FaaS meets Frameworks par Chris Bailey
NodeJS Interactive 2019:  FaaS meets FrameworksNodeJS Interactive 2019:  FaaS meets Frameworks
NodeJS Interactive 2019: FaaS meets Frameworks
Chris Bailey346 vues
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS par Chris Bailey
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaSVoxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Chris Bailey188 vues
FaaS Meets Java EE: Developing Cloud Native Applications at Speed par Chris Bailey
FaaS Meets Java EE: Developing Cloud Native Applications at SpeedFaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
Chris Bailey396 vues
AltConf 2019: Server-Side Swift State of the Union par Chris Bailey
AltConf 2019:  Server-Side Swift State of the UnionAltConf 2019:  Server-Side Swift State of the Union
AltConf 2019: Server-Side Swift State of the Union
Chris Bailey673 vues
Server-side Swift with Swagger par Chris Bailey
Server-side Swift with SwaggerServer-side Swift with Swagger
Server-side Swift with Swagger
Chris Bailey556 vues
Index - BFFs vs GraphQL par Chris Bailey
Index - BFFs vs GraphQLIndex - BFFs vs GraphQL
Index - BFFs vs GraphQL
Chris Bailey1.7K vues
Swift Cloud Workshop - Codable, the key to Fullstack Swift par Chris Bailey
Swift Cloud Workshop - Codable, the key to Fullstack SwiftSwift Cloud Workshop - Codable, the key to Fullstack Swift
Swift Cloud Workshop - Codable, the key to Fullstack Swift
Chris Bailey647 vues
Try!Swift India 2017: All you need is Swift par Chris Bailey
Try!Swift India 2017: All you need is SwiftTry!Swift India 2017: All you need is Swift
Try!Swift India 2017: All you need is Swift
Chris Bailey839 vues
Swift Summit 2017: Server Swift State of the Union par Chris Bailey
Swift Summit 2017: Server Swift State of the UnionSwift Summit 2017: Server Swift State of the Union
Swift Summit 2017: Server Swift State of the Union
Chris Bailey1.2K vues
IBM Cloud University: Java, Node.js and Swift par Chris Bailey
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and Swift
Chris Bailey222 vues
FrenchKit 2017: Server(less) Swift par Chris Bailey
FrenchKit 2017: Server(less) SwiftFrenchKit 2017: Server(less) Swift
FrenchKit 2017: Server(less) Swift
Chris Bailey618 vues
AltConf 2017: Full Stack Swift in 30 Minutes par Chris Bailey
AltConf 2017: Full Stack Swift in 30 MinutesAltConf 2017: Full Stack Swift in 30 Minutes
AltConf 2017: Full Stack Swift in 30 Minutes
Chris Bailey482 vues
InterConnect: Server Side Swift for Java Developers par Chris Bailey
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
Chris Bailey753 vues
InterConnect: Java, Node.js and Swift - Which, Why and When par Chris Bailey
InterConnect: Java, Node.js and Swift - Which, Why and WhenInterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and When
Chris Bailey884 vues
Playgrounds: Mobile + Swift = BFF par Chris Bailey
Playgrounds: Mobile + Swift = BFFPlaygrounds: Mobile + Swift = BFF
Playgrounds: Mobile + Swift = BFF
Chris Bailey634 vues
Swift Summit: Pushing the boundaries of Swift to the Server par Chris Bailey
Swift Summit: Pushing the boundaries of Swift to the ServerSwift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
Chris Bailey1.8K vues
O'Reilly Software Architecture Conf: Cloud Economics par Chris Bailey
O'Reilly Software Architecture Conf: Cloud EconomicsO'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud Economics
Chris Bailey725 vues
FrenchKit: End to End Application Development with Swift par Chris Bailey
FrenchKit: End to End Application Development with SwiftFrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with Swift
Chris Bailey834 vues
Node Summit 2016: Web App Architectures par Chris Bailey
Node Summit 2016:  Web App ArchitecturesNode Summit 2016:  Web App Architectures
Node Summit 2016: Web App Architectures
Chris Bailey281 vues

Dernier

.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... par
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...Marc Müller
40 vues62 diapositives
AI and Ml presentation .pptx par
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptxFayazAli87
12 vues15 diapositives
FIMA 2023 Neo4j & FS - Entity Resolution.pptx par
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptxNeo4j
8 vues26 diapositives
SAP FOR CONTRACT MANUFACTURING.pdf par
SAP FOR CONTRACT MANUFACTURING.pdfSAP FOR CONTRACT MANUFACTURING.pdf
SAP FOR CONTRACT MANUFACTURING.pdfVirendra Rai, PMP
13 vues2 diapositives
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... par
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Lisi Hocke
35 vues124 diapositives
Advanced API Mocking Techniques par
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking TechniquesDimpy Adhikary
19 vues11 diapositives

Dernier(20)

.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... par Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller40 vues
AI and Ml presentation .pptx par FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8712 vues
FIMA 2023 Neo4j & FS - Entity Resolution.pptx par Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j8 vues
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... par Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 vues
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... par Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri860 vues
predicting-m3-devopsconMunich-2023.pptx par Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app7 vues
Ports-and-Adapters Architecture for Embedded HMI par Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... par Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller41 vues
Software evolution understanding: Automatic extraction of software identifier... par Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
tecnologia18.docx par nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67025 vues
Myths and Facts About Hospice Care: Busting Common Misconceptions par Care Coordinations
Myths and Facts About Hospice Care: Busting Common MisconceptionsMyths and Facts About Hospice Care: Busting Common Misconceptions
Myths and Facts About Hospice Care: Busting Common Misconceptions

Node Interactive: Node.js Performance and Highly Scalable Micro-Services

  • 1. Highly Scalable
 Node.js Microservices 
 
 Chris Bailey (@Chris__Bailey) 
 Node.js and Swift Runtimes Chris Vignola (@ChrisVignola) 
 Cloud Native Node.js
  • 5. : Key Technologies Container Orchestration Package and Deploy
  • 6. : Key Technologies Container Orchestration MonitoringPackage and Deploy
  • 7. : Key Technologies Container Orchestration Monitoring Distributed TracingPackage and Deploy
  • 8. MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 9. 0 300 600 900 200 0 1,150 IO Speed • Performance • Scale MICROSERVICES: Key Performance Characteristics
  • 10. 0 300 600 900 200 0 1,150 IO Speed • Performance • Scale MICROSERVICES: Key Performance Characteristics
  • 11. 0 300 600 900 200 897 1,150 MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 12. 0 300 600 900 200 897 1,150 Startup • Availability • Scaling MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 13. 0 300 600 900 200 897 1,150 00.9 Startup • Availability • Scaling MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 14. 0 300 600 900 200 897 1,150 13.7 0.9 Startup • Availability • Scaling MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 15. 0 300 600 900 200 897 1,150 13.7 0.9 Startup • Availability • Scaling Memory • Efficiency • Cost MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 16. 0 300 600 900 200 897 1,150 13.7 0.9 023.6 Startup • Availability • Scaling Memory • Efficiency • Cost MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 17. 0 300 600 900 200 897 1,150 13.7 0.9 422 23.6 Startup • Availability • Scaling Memory • Efficiency • Cost MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 18. Startup • Availability • Scaling Memory • Efficiency • Cost Benchmarking WG: Performance Gains IO Speed • Performance • Scale
  • 19. Startup • Availability • Scaling Memory • Efficiency • Cost 3,049 2,914 2,076 1,866 4.x master6.x 8.x Benchmarking WG: Performance Gains IO Speed • Performance • Scale
  • 20. Startup • Availability • Scaling Memory • Efficiency • Cost 50,42052,640 42,500 71,000 3,049 2,914 2,076 1,866 4.x master6.x 8.x 4.x master6.x 8.x Benchmarking WG: Performance Gains IO Speed • Performance • Scale
  • 21. Startup • Availability • Scaling Memory • Efficiency • Cost 50,42052,640 42,500 71,000 89,024 92,84091,47688,9603,049 2,914 2,076 1,866 4.x master6.x 8.x 4.x master6.x 8.x 4.x master6.x 8.x Benchmarking WG: Performance Gains IO Speed • Performance • Scale
  • 23. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore
  • 24. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore const appName = require('./../package').name; const express = require('express'); const log4js = require(‘log4js'); const logger = log4js.getLogger(appName); const app = express(); app.get('/', function (req, res) { res.send('Hello World!') }) const port = process.env.PORT || 3000; app.listen(port, function(){ logger.info(`Express listening on: ` + port); });
  • 25. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore
  • 26. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore FROM ibmcom/ibmnode ENV NODE_ENV production ENV PORT 3000 WORKDIR "/app" # Install app dependencies COPY package.json /app/ RUN cd /app; npm install # Bundle app source COPY . /app EXPOSE 3000 CMD ["npm", "start"]
  • 27. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore node_modules/ npm-debug.log
  • 28. $ docker build -t <your username>/node-app .

  • 29. $ docker build -t <your username>/node-app .
 $ docker run -p 49160:3000 -d <your username>/node-app
  • 30. $ docker build -t <your username>/node-app .
 $ docker run -p 49160:3000 -d <your username>/node-app
  • 31. $ docker build -t <your username>/node-app .
 $ docker run -p 49160:3000 -d <your username>/node-app
  • 32. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore chart/node-app/Chart.yaml chart/node-app/templates/deployment.yaml chart/node-app/templates/hpa.yaml chart/node-app/templates/service.yaml chart/node-app/values.yaml HELM CHARTS
  • 33. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore chart/node-app/Chart.yaml chart/node-app/templates/deployment.yaml chart/node-app/templates/hpa.yaml chart/node-app/templates/service.yaml chart/node-app/values.yaml HELM CHARTS apiVersion: v1 description: A Helm chart for Kubernetes name: node-app version: 1.0.0
  • 34. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore chart/node-app/Chart.yaml chart/node-app/templates/deployment.yaml chart/node-app/templates/hpa.yaml chart/node-app/templates/service.yaml chart/node-app/values.yaml HELM CHARTS apiVersion: extensions/v1beta1 kind: Deployment metadata: name: “node-app-deployment" labels: chart: “node-app-1.0.0” spec: replicas: “5” revisionHistoryLimit: “1” template: metadata: labels: app: “node-app-selector" version: “1.0.0” spec: containers: - name: “node-app” image: “repository:1.0.0” imagePullPolicy: Always livenessProbe: httpGet: path: /health port: 3000 initialDelaySeconds: 3000 periodSeconds: 1000 resources: requests: cpu: "200m" memory: "300Mi" env: - name: PORT value : “3000”
  • 35. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore chart/node-app/Chart.yaml chart/node-app/templates/deployment.yaml chart/node-app/templates/hpa.yaml chart/node-app/templates/service.yaml chart/node-app/values.yaml HELM CHARTS apiVersion: autoscaling/v2alpha1 kind: HorizontalPodAutoscaler metadata: name: “node-app-hpa-policy" namespace: default spec: scaleTargetRef: apiVersion: apps/v1beta1 kind: Deployment name: “node-app-deployment" minReplicas: 5 maxReplicas: 10 metrics: - type: Resource resource: name: cpu targetAverageUtilization: 70 - type: Resource resource: name: memory targetAverageUtilization: 70
  • 36. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ”5” let b = 3 public/* test/* server/server.js package.json README.md .gitignore Dockerfile Dockerfile-tools .dockerignore chart/node-app/Chart.yaml chart/node-app/templates/deployment.yaml chart/node-app/templates/hpa.yaml chart/node-app/templates/service.yaml chart/node-app/values.yaml HELM CHARTS apiVersion: v1 kind: Service metadata: name: “node-app“ labels: chart: “node-app-1.0.0” spec: type: NodePort ports: - port: 3000 selector: app: “node-app-selector"
  • 37. $ helm package ./chart/node-app
  • 38. $ helm package ./chart/node-app $ helm install ./node-app-1.0.0.tgz
  • 39. $ helm package ./chart/node-app $ helm install ./node-app-1.0.0.tgz
  • 40. $ helm package ./chart/node-app $ helm install ./node-app-1.0.0.tgz
  • 42. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 43. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 44. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 45. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 46. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 47. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 48. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 53. BROWSER LOAD BALANCER WEB BFF ORDER SERVICE MongoDB TIME
  • 54. BROWSER LOAD BALANCER WEB BFF ORDER SERVICE MongoDB INVENTORY SERVICE TIME
  • 55. MySQL BROWSER LOAD BALANCER WEB BFF ORDER SERVICE MongoDB INVENTORY SERVICE TIME
  • 56. MySQL BROWSER LOAD BALANCER WEB BFF ORDER SERVICE MongoDB INVENTORY SERVICE MongoDB TIME
  • 57. • Collects data from each enabled service
 • Propagates correlation ID using HTTP headers
 • Provides sampling, tracing, and debug capabilities • Collects microsecond timestamps
 • Correlates data in Zipkin server • Presents data in Zipkin dashboard Request Tracking: OpenTracing and Zipkin
  • 58. const zipkin = require(‘appmetrics-zipkin’); const rest = require(‘rest'); const express = require('express'); const app = express(); app.get('/', (req, res) => { rest('http://localhost:9000/api') .then(response => res.send(response.entity)) .catch(err => console.error('Error', err.stack)); }); const port = process.env.PORT || 3000; app.listen(port, function(){ logger.info(`Express listening on: ` + port); });
  • 60. • Collects data from each enabled service
 • Requires /metrics endpoint providing data
 • Provides storage and correlation capabilities • Provide customisable dashboard
 • Integrates with Graphana, Graphite, etc Microservice Metrics: Prometheus
  • 61. const zipkin = require(‘appmetrics-zipkin’); const prometheus = require(‘appmetrics-prometheus’).attach(); const rest = require(‘rest'); const express = require('express'); const app = express(); app.get('/', (req, res) => { rest('http://localhost:9000/api') .then(response => res.send(response.entity)) .catch(err => console.error('Error', err.stack)); }); const port = process.env.PORT || 3000; app.listen(port, function(){ logger.info(`Express listening on: ` + port); });
  • 64. • ‘appmetrics-dash’ provides self-hosted monitoring
 • Inbound and Outbound request performance • Resource and event loop monitoring • Request a node-report
 • Enable profiling and flame graphs Deep Analysis: ‘appmetrics-dash’ and Flame Graphs
  • 65. const zipkin = require(‘appmetrics-zipkin’); const prometheus = require(‘appmetrics-prometheus’).attach(); const dash = require(‘appmetrics-dash’).attach(); const rest = require(‘rest'); const express = require('express'); const app = express(); app.get('/', (req, res) => { rest('http://localhost:9000/api') .then(response => res.send(response.entity)) .catch(err => console.error('Error', err.stack)); }); const port = process.env.PORT || 3000; app.listen(port, function(){ logger.info(`Express listening on: ` + port); }); ‘appmetrics-dash’
  • 68. $ yo nodeserver$ yo nodeserver
  • 70. const rest = require(‘rest'); const express = require('express'); const CLSContext = require('zipkin-context-cls'); const {Tracer} = require('zipkin'); const {recorder} = require('./recorder'); const ctxImpl = new CLSContext('zipkin'); const tracer = new Tracer({ctxImpl, recorder}); const app = express(); const zipkinMiddleware = require('zipkin-instrumentation-express').expressMiddleware; app.use(zipkinMiddleware({tracer, serviceName: 'frontend'})); const {restInterceptor} = require('zipkin-instrumentation-cujojs-rest'); const zipkinRest = rest.wrap(restInterceptor, {tracer, remoteServiceName: ‘backend'});
 app.get('/', (req, res) => { zipkinRest('http://localhost:9000/api') .then(response => res.send(response.entity)) .catch(err => console.error('Error', err.stack)); });