SlideShare a Scribd company logo
node-js.slack.com
#cloudnative
github.com/CloudNativeJSCloudNativeJS.io
Chris Bailey
Chief Architect,
Cloud Native Runtimes @IBM
baileyc@uk.ibm.com
@Chris__Bailey
Beth Griggs
Node.js Core Collaborator,
Node.js Runtimes @IBM
Bethany.Griggs@uk.ibm.com
@BethGriggs_
Cloud Native Node.js
Create and Deploy Cloud Native Node.js Applications
Node Summit, July 27th 2018
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
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150
MICROSERVICES: Key Performance Characteristics
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150
MICROSERVICES: Key Performance Characteristics
Startup
• Availability
• Scaling
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150
00.9
MICROSERVICES: Key Performance Characteristics
Startup
• Availability
• Scaling
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150 13.7
0.9
MICROSERVICES: Key Performance Characteristics
Startup
• Availability
• Scaling
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150 13.7
0.9
MICROSERVICES: Key Performance Characteristics
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
IO Speed
• Performance
• Scale
0
300
600
900
200
897
1,150 13.7
0.9 023.6
MICROSERVICES: Key Performance Characteristics
Startup
• Availability
• Scaling
Memory
• Efficiency
• Cost
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
IO Speed
• Performance
• Scale
MICROSERVICES: Key Performance Characteristics
12%
38%
100%
0% 20% 40% 60% 80% 100%
Cloud Native
Cloud Services
Cloud Hosted
Cloud Hosting vs Cloud Native
Evans Cloud Development Survey
2017
12%
38%
100%
0% 20% 40% 60% 80% 100%
Cloud Native
Cloud Services
Cloud Hosted
Cloud Hosting vs Cloud Native
Evans Cloud Development Survey
2017
Cloud Hosting vs Cloud Native
12%
38%
100%
0% 20% 40% 60% 80% 100%
Cloud Native
Cloud Services
Cloud Hosted
Evans Cloud Development Survey
2017
12%
48%
79%
0% 20% 40% 60% 80% 100%
Kubernetes
Docker
Cloud Hosted
Cloud Hosting vs Cloud Native
Node.js Foundation Survey
2018
12%
38%
100%
0% 20% 40% 60% 80% 100%
Cloud Native
Cloud Services
Cloud Hosted
Evans Cloud Development Survey
2017
12%
48%
79%
0% 20% 40% 60% 80% 100%
Kubernetes
Docker
Cloud Hosted
Cloud Hosting vs Cloud Native
Node.js Foundation Survey
2018
12%
38%
100%
0% 20% 40% 60% 80% 100%
Cloud Native
Cloud Services
Cloud Hosted
Evans Cloud Development Survey
2017
Cloud Hosting vs Cloud Native
12%
48%
79%
0% 20% 40% 60% 80% 100%
Kubernetes
Docker
Cloud Hosted
Node.js Foundation Survey
2018
12%
38%
100%
0% 20% 40% 60% 80% 100%
Cloud Native
Cloud Services
Cloud Hosted
Evans Cloud Development Survey
2017
: Key Technologies
Container
Orchestration Monitoring
Distributed TracingPackage and Deploy
Platform
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
Module Insights: http://modules.cloudnativejs.io/
Module LTS: https://github.com/CloudNativeJS/ModuleLTS
Module LTS: https://github.com/CloudNativeJS/ModuleLTS
Module LTS: https://github.com/strongloop/loopback
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"] Node.js 8 Docker Image
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"] Node.js 8 Docker Image
Operating System Updates
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"] Node.js 8 Docker Image
Operating System Updates
package.json
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"] Node.js 8 Docker Image
Operating System Updates
package.json
node_modules
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"] Node.js 8 Docker Image
Operating System Updates
package.json
node_modules
Application
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"] Node.js 8 Docker Image
Operating System Updates
package.json
node_modules
Application
716 MB
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
Node.js 8 Docker Image
Operating System Updates
package.json
node_modules
716 MB
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
Node.js 8 Docker Image
Operating System Updates
package.json
node_modules
716 MB
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
node_modules
716 MB
package.json
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
node_modules
716 MB
Node.js 8 SLIM Docker Image
package.json
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
node_modules
716 MB
Node.js 8 SLIM Docker Image
Operating System Updates
package.json
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
node_modules
716 MB
Node.js 8 SLIM Docker Image
Operating System Updates
package.json
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
node_modules
716 MB
Node.js 8 SLIM Docker Image
Operating System Updates
Application
package.json
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
node_modules
Node.js 8 SLIM Docker Image
Operating System Updates
Application
package.json
716 MB
229 MB
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
FROM node:8
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY package.json /app/
RUN npm install —production
# Copy the dependencies into a Slim Node docker image
FROM node:8-slim
WORKDIR "/app"
# Install OS updates
RUN apt-get update && apt-get dist-upgrade -y && apt-get clean 
&& echo 'Finished installing dependencies'
# Install app dependencies
COPY --from=0 /app/node_modules /app/node_modules
COPY . /app
ENV NODE_ENV production
ENV PORT 3000
USER node
EXPOSE 3000
CMD ["npm", "start"]
node_modules
Node.js 8 SLIM Docker Image
Operating System Updates
Application
package.json
$ docker build -t node-app -f Dockerfile-run .

$ docker build -t node-app -f Dockerfile-run .

$ docker run -d —p 3000:3000 -t node-app
$ docker build -t node-app -f Dockerfile-run .

$ docker run -d —p 3000:3000 -t node-app
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
/chart/nodeserver/templates/basedeployment.yaml
/chart/nodeserver/templates/deployment.yaml
/chart/nodeserver/templates/service.yaml
/chart/nodeserver/templates/hpa.yaml
/chart/nodeserver/templates/istio.yaml
/chart/nodeserver/Chart.yaml
/chart/nodeserver/values.yaml
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
/chart/nodeserver/templates/basedeployment.yaml
/chart/nodeserver/templates/deployment.yaml
/chart/nodeserver/templates/service.yaml
/chart/nodeserver/templates/hpa.yaml
/chart/nodeserver/templates/istio.yaml
/chart/nodeserver/Chart.yaml
/chart/nodeserver/values.yaml
apiVersion: v1
description: A Helm chart for Kubernetes
name: nodeserver
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
/chart/nodeserver/templates/basedeployment.yaml
/chart/nodeserver/templates/deployment.yaml
/chart/nodeserver/templates/service.yaml
/chart/nodeserver/templates/hpa.yaml
/chart/nodeserver/templates/istio.yaml
/chart/nodeserver/Chart.yaml
/chart/nodeserver/values.yaml
replicaCount: 1
revisionHistoryLimit: 1
image:
repository: cnbailey/nodeserver
tag: 1.0.0
pullPolicy: Always
resources:
requests:
cpu: 200m
memory: 300Mi
livenessProbe:
initialDelaySeconds: 3000
periodSeconds: 1000
service:
name: Node
type: NodePort
servicePort: 3000
hpa:
enabled: false
minReplicas: 1
maxReplicas: 2
metrics:
cpu:
targetAverageUtilization: 70
memory:
targetAverageUtilization: 70
services:
base:
enabled: false
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
/chart/nodeserver/templates/basedeployment.yaml
/chart/nodeserver/templates/deployment.yaml
/chart/nodeserver/templates/service.yaml
/chart/nodeserver/templates/hpa.yaml
/chart/nodeserver/templates/istio.yaml
/chart/nodeserver/Chart.yaml
/chart/nodeserver/values.yaml
replicaCount: 1
revisionHistoryLimit: 1
image:
repository: cnbailey/nodeserver
tag: 1.0.0
pullPolicy: Always
resources:
requests:
cpu: 200m
memory: 300Mi
livenessProbe:
initialDelaySeconds: 3000
periodSeconds: 1000
service:
name: Node
type: NodePort
servicePort: 3000
hpa:
enabled: false
minReplicas: 1
maxReplicas: 2
metrics:
cpu:
targetAverageUtilization: 70
memory:
targetAverageUtilization: 70
services:
base:
enabled: false
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
/chart/nodeserver/templates/basedeployment.yaml
/chart/nodeserver/templates/deployment.yaml
/chart/nodeserver/templates/service.yaml
/chart/nodeserver/templates/hpa.yaml
/chart/nodeserver/templates/istio.yaml
/chart/nodeserver/Chart.yaml
/chart/nodeserver/values.yaml
replicaCount: 1
revisionHistoryLimit: 1
image:
repository: cnbailey/nodeserver
tag: 1.0.0
pullPolicy: Always
resources:
requests:
cpu: 200m
memory: 300Mi
livenessProbe:
initialDelaySeconds: 3000
periodSeconds: 1000
service:
name: Node
type: NodePort
servicePort: 3000
hpa:
enabled: false
minReplicas: 1
maxReplicas: 2
metrics:
cpu:
targetAverageUtilization: 70
memory:
targetAverageUtilization: 70
services:
base:
enabled: false
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
/chart/nodeserver/templates/basedeployment.yaml
/chart/nodeserver/templates/deployment.yaml
/chart/nodeserver/templates/service.yaml
/chart/nodeserver/templates/hpa.yaml
/chart/nodeserver/templates/istio.yaml
/chart/nodeserver/Chart.yaml
/chart/nodeserver/values.yaml
replicaCount: 1
revisionHistoryLimit: 1
image:
repository: cnbailey/nodeserver
tag: 1.0.0
pullPolicy: Always
resources:
requests:
cpu: 200m
memory: 300Mi
livenessProbe:
initialDelaySeconds: 3000
periodSeconds: 1000
service:
name: Node
type: NodePort
servicePort: 3000
hpa:
enabled: false
minReplicas: 1
maxReplicas: 2
metrics:
cpu:
targetAverageUtilization: 70
memory:
targetAverageUtilization: 70
services:
base:
enabled: false
HELM CHARTS
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
/chart/nodeserver/templates/basedeployment.yaml
/chart/nodeserver/templates/deployment.yaml
/chart/nodeserver/templates/service.yaml
/chart/nodeserver/templates/hpa.yaml
/chart/nodeserver/templates/istio.yaml
/chart/nodeserver/Chart.yaml
/chart/nodeserver/values.yaml
replicaCount: 1
revisionHistoryLimit: 1
image:
repository: cnbailey/nodeserver
tag: 1.0.0
pullPolicy: Always
resources:
requests:
cpu: 200m
memory: 300Mi
livenessProbe:
initialDelaySeconds: 3000
periodSeconds: 1000
service:
name: Node
type: NodePort
servicePort: 3000
hpa:
enabled: false
minReplicas: 5
maxReplicas: 9
metrics:
cpu:
targetAverageUtilization: 70
memory:
targetAverageUtilization: 70
services:
base:
enabled: false
$ cd ./chart/nodeserver/
$ helm install —name nodeserver .
$ cd ./chart/nodeserver/
$ helm install —name nodeserver .
$ cd ./chart/nodeserver/
$ helm install —name nodeserver .
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
Health Checks
HTTP Requests
Health Checks
HTTP Requests
GET: /ready
GET: /ready
Health Checks
HTTP Requests
GET: /ready 200
GET: /ready 200
Health Checks
HTTP Requests
GET: /ready 200
GET: /health 200
GET: /ready 200
GET: /health 200
Health Checks
HTTP Requests
GET: /ready 503
GET: /health 503
GET: /ready 200
GET: /health 200
Health Checks
HTTP Requests
GET: /ready 503
GET: /health 503
GET: /ready 200
GET: /health 200
SIGTERM
Health Checks
HTTP Requests
GET: /ready 503
GET: /health 503
GET: /ready 200
GET: /health 200
SIGTERM
SIGKILL
Health Checks
HTTP Requests
GET: /ready 503
GET: /health 503
GET: /ready 200
GET: /health 200
SIGTERM
SIGKILL
Health Checks
HTTP Requests
GET: /ready 503
GET: /health 503
GET: /ready 200
GET: /health 200
Health Checks
HTTP Requests
GET: /ready 503
GET: /health 200
GET: /ready 200
GET: /health 200
GET: /ready 200
GET: /health 200
GET: /ready 200
GET: /health 200
Health Checks
HTTP Requests
GET: /ready 200
GET: /health 200
GET: /ready 200
GET: /health 200
Health Checks
HTTP Requests
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const health = require(ā€˜@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();-
Health Checks
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const health = require(ā€˜@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();
app.use('/ready', health.ReadinessEndpoint(healthcheck))
app.use('/health', health.LivenessEndpoint(healthcheck))-
Health Checks
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const health = require(ā€˜@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();
const livePromise = new Promise(function (resolve, _reject) {
resolve();
});
app.use('/ready', health.ReadinessEndpoint(healthcheck))
app.use('/health', health.LivenessEndpoint(healthcheck))
-
Health Checks
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const health = require(ā€˜@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();
const livePromise = new Promise(function (resolve, _reject) {
resolve();
});
let liveCheck = new health.LivenessCheck("live", livePromise);
app.use('/ready', health.ReadinessEndpoint(healthcheck))
app.use('/health', health.LivenessEndpoint(healthcheck))
-
Health Checks
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const health = require(ā€˜@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();
const livePromise = new Promise(function (resolve, _reject) {
resolve();
});
let liveCheck = new health.LivenessCheck("live", livePromise);
healthcheck.registerlivenessCheck(liveCheck);
app.use('/ready', health.ReadinessEndpoint(healthcheck))
app.use('/health', health.LivenessEndpoint(healthcheck))
-
Health Checks
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const health = require(ā€˜@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();
const livePromise = new Promise(function (resolve, _reject) {
resolve();
});
let liveCheck = new health.LivenessCheck("live", livePromise);
const readyPromise = new Promise(function (resolve, _reject) {
resolve();
});
let readyCheck = new health.ReadinessCheck("ready", readyPromise);
healthcheck.registerlivenessCheck(liveCheck);
healthcheck.registerReadinessCheck(readyCheck);
app.use('/ready', health.ReadinessEndpoint(healthcheck))
app.use('/health', health.LivenessEndpoint(healthcheck))
-
Health Checks
-
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const health = require(ā€˜@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();
const livePromise = new Promise(function (resolve, _reject) {
resolve();
});
let liveCheck = new health.LivenessCheck("live", livePromise);
const readyPromise = new Promise(function (resolve, _reject) {
resolve();
});
let readyCheck = new health.ReadinessCheck("ready", readyPromise);
const shutdownPromise = new Promise(function (resolve, _reject) {
resolve();
});
let shutdownCheck = new health.ShutdownCheck(ā€œshutā€, shutdownProm);
healthcheck.registerlivenessCheck(liveCheck);
healthcheck.registerReadinessCheck(readyCheck);
healthcheck.registerShutdownCheck(shutdownCheck);
app.use('/ready', health.ReadinessEndpoint(healthcheck))
app.use('/health', health.LivenessEndpoint(healthcheck))
-
Health Checks
-
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
GET: /ready 200
GET: /health 200
GET: /ready 200
GET: /health 200
HTTP Requests
GET: /ready 200
GET: /health 200
GET: /metrics
GET: /ready 200
GET: /health 200
GET: /metrics
HTTP Requests
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const prometheus = require(ā€˜appmetrics-prometheus’).attach();
-
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const prometheus = require(ā€˜appmetrics-prometheus’).attach();
-
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
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
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const zipkin = require(ā€˜appmetrics-zipkin’);-
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const zipkin = require(ā€˜appmetrics-zipkin’);-
func add(_ a: Int,
to b: Int) -> Void
{
print(a + b)
}
let a = ā€5ā€
let b = 3
const zipkin = require(ā€˜appmetrics-zipkin’);-
node-js.slack.com
#cloudnative
github.com/CloudNativeJSCloudNativeJS.io

More Related Content

PPTX
London Node.js User Group - Cloud-native Node.js
PDF
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
PDF
FullStack London - Cloud Native Node.js
PDF
ä»Šć™ćå§‹ć‚ć‚‹Cloud Foundry #hackt #hackt_k
PDF
BOSH / CF Deployment in modern ways #cf_tokyo
PDF
Spring Boot 1.3 News #ęø‹č°·Java
PDF
Play on Docker
PDF
Ansible best practices
London Node.js User Group - Cloud-native Node.js
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
FullStack London - Cloud Native Node.js
ä»Šć™ćå§‹ć‚ć‚‹Cloud Foundry #hackt #hackt_k
BOSH / CF Deployment in modern ways #cf_tokyo
Spring Boot 1.3 News #ęø‹č°·Java
Play on Docker
Ansible best practices

What's hot (20)

PDF
Introduction to Concourse CI #ęø‹č°·Java
PDF
Concourse CI Meetup Demo
ODP
Pyramid deployment
PPTX
How to Dockerize your Sitecore module
PDF
Automate Your Automation | DrupalCon Vienna
PDF
DockerCon EU 2018 - Dockerfile Best Practices
PDF
Why PCF is the best platform for Spring Boot
PPTX
Cross platform mobile apps using .NET
PDF
Beyond AEM Curl Commands
PPTX
Web deploy command line
PPTX
Optimizing Spring Boot apps for Docker
PPTX
Vagrant introduction for Developers
PDF
Scale your Magento app with Elastic Beanstalk
PDF
Ansible 2.2
PDF
Cloud focker ć‚’č©¦ć—ć¦ćæćŸ public
PPTX
Breaking Up With Your Data Center Presentation
PDF
Spring Boot & Actuators
PDF
Introduction to Spring WebFlux #jsug #sf_a1
PDF
Continuous Integration & Continuous Delivery with GCP
PDF
Dockerize node.js application
Introduction to Concourse CI #ęø‹č°·Java
Concourse CI Meetup Demo
Pyramid deployment
How to Dockerize your Sitecore module
Automate Your Automation | DrupalCon Vienna
DockerCon EU 2018 - Dockerfile Best Practices
Why PCF is the best platform for Spring Boot
Cross platform mobile apps using .NET
Beyond AEM Curl Commands
Web deploy command line
Optimizing Spring Boot apps for Docker
Vagrant introduction for Developers
Scale your Magento app with Elastic Beanstalk
Ansible 2.2
Cloud focker ć‚’č©¦ć—ć¦ćæćŸ public
Breaking Up With Your Data Center Presentation
Spring Boot & Actuators
Introduction to Spring WebFlux #jsug #sf_a1
Continuous Integration & Continuous Delivery with GCP
Dockerize node.js application
Ad

Similar to Node Summit 2018: Cloud Native Node.js (20)

PDF
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
PDF
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
PPTX
#dddsw - Modernizing .NET Apps with Docker
PDF
MeaNstack on Docker
PPTX
#SDD2017 - Modernizing .NET Apps with Docker
PPTX
Pluralsight Webinar: Simplify Your Project Builds with Docker
PDF
DevOps Workflow: A Tutorial on Linux Containers
PPTX
Openshift Presentation ppt compare with VM
PDF
OSDC.no 2015 introduction to node.js workshop
Ā 
PDF
Fastlane - Automation and Continuous Delivery for iOS Apps
PDF
Modernizing .NET Apps
PDF
Was is Docker? Or: Docker for Software Developers
PDF
Deploying Symfony | symfony.cat
PPTX
DockerCon 17 EU: Modernizing .NET Apps with Docker
PDF
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
PDF
How to create your own hack environment
PDF
DCSF19 Dockerfile Best Practices
PDF
Infrastructure = code - 1 year later
PPTX
Taking Docker to Dance: Continuous Delivery on AWS
PDF
Getting Started with DevOps on AWS [Mar 2020]
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
#dddsw - Modernizing .NET Apps with Docker
MeaNstack on Docker
#SDD2017 - Modernizing .NET Apps with Docker
Pluralsight Webinar: Simplify Your Project Builds with Docker
DevOps Workflow: A Tutorial on Linux Containers
Openshift Presentation ppt compare with VM
OSDC.no 2015 introduction to node.js workshop
Ā 
Fastlane - Automation and Continuous Delivery for iOS Apps
Modernizing .NET Apps
Was is Docker? Or: Docker for Software Developers
Deploying Symfony | symfony.cat
DockerCon 17 EU: Modernizing .NET Apps with Docker
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
How to create your own hack environment
DCSF19 Dockerfile Best Practices
Infrastructure = code - 1 year later
Taking Docker to Dance: Continuous Delivery on AWS
Getting Started with DevOps on AWS [Mar 2020]
Ad

More from Chris Bailey (20)

PDF
NodeJS Interactive 2019: FaaS meets Frameworks
PDF
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
PDF
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
PDF
AltConf 2019: Server-Side Swift State of the Union
PDF
Server-side Swift with Swagger
PDF
Index - BFFs vs GraphQL
PDF
Swift Cloud Workshop - Swift Microservices
PDF
Swift Cloud Workshop - Codable, the key to Fullstack Swift
PDF
Try!Swift India 2017: All you need is Swift
PDF
Swift Summit 2017: Server Swift State of the Union
PDF
IBM Cloud University: Java, Node.js and Swift
PDF
FrenchKit 2017: Server(less) Swift
PDF
AltConf 2017: Full Stack Swift in 30 Minutes
PDF
InterConnect: Server Side Swift for Java Developers
PDF
InterConnect: Java, Node.js and Swift - Which, Why and When
PDF
Playgrounds: Mobile + Swift = BFF
PDF
Swift Summit: Pushing the boundaries of Swift to the Server
PDF
O'Reilly Software Architecture Conf: Cloud Economics
PDF
FrenchKit: End to End Application Development with Swift
PPTX
Node Summit 2016: Web App Architectures
NodeJS Interactive 2019: FaaS meets Frameworks
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
AltConf 2019: Server-Side Swift State of the Union
Server-side Swift with Swagger
Index - BFFs vs GraphQL
Swift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Codable, the key to Fullstack Swift
Try!Swift India 2017: All you need is Swift
Swift Summit 2017: Server Swift State of the Union
IBM Cloud University: Java, Node.js and Swift
FrenchKit 2017: Server(less) Swift
AltConf 2017: Full Stack Swift in 30 Minutes
InterConnect: Server Side Swift for Java Developers
InterConnect: Java, Node.js and Swift - Which, Why and When
Playgrounds: Mobile + Swift = BFF
Swift Summit: Pushing the boundaries of Swift to the Server
O'Reilly Software Architecture Conf: Cloud Economics
FrenchKit: End to End Application Development with Swift
Node Summit 2016: Web App Architectures

Recently uploaded (20)

PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by AndrƩ Kraus
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
assetexplorer- product-overview - presentation
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Nekopoi APK 2025 free lastest update
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Autodesk AutoCAD Crack Free Download 2025
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
CHAPTER 2 - PM Management and IT Context
Designing Intelligence for the Shop Floor.pdf
Operating system designcfffgfgggggggvggggggggg
Internet Downloader Manager (IDM) Crack 6.42 Build 41
17 Powerful Integrations Your Next-Gen MLM Software Needs
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
T3DD25 TYPO3 Content Blocks - Deep Dive by AndrƩ Kraus
Salesforce Agentforce AI Implementation.pdf
assetexplorer- product-overview - presentation
Reimagine Home Health with the Power of Agentic AI​
Digital Systems & Binary Numbers (comprehensive )
Nekopoi APK 2025 free lastest update
Monitoring Stack: Grafana, Loki & Promtail
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Complete Guide to Website Development in Malaysia for SMEs
Autodesk AutoCAD Crack Free Download 2025

Node Summit 2018: Cloud Native Node.js

  • 1. node-js.slack.com #cloudnative github.com/CloudNativeJSCloudNativeJS.io Chris Bailey Chief Architect, Cloud Native Runtimes @IBM [email protected] @Chris__Bailey Beth Griggs Node.js Core Collaborator, Node.js Runtimes @IBM [email protected] @BethGriggs_ Cloud Native Node.js Create and Deploy Cloud Native Node.js Applications Node Summit, July 27th 2018
  • 2. MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 3. 0 300 600 900 200 0 1,150 IO Speed • Performance • Scale MICROSERVICES: Key Performance Characteristics
  • 4. 0 300 600 900 200 0 1,150 MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 5. 0 300 600 900 200 897 1,150 MICROSERVICES: Key Performance Characteristics IO Speed • Performance • Scale
  • 6. 0 300 600 900 200 897 1,150 MICROSERVICES: Key Performance Characteristics Startup • Availability • Scaling IO Speed • Performance • Scale
  • 7. 0 300 600 900 200 897 1,150 00.9 MICROSERVICES: Key Performance Characteristics Startup • Availability • Scaling IO Speed • Performance • Scale
  • 8. 0 300 600 900 200 897 1,150 13.7 0.9 MICROSERVICES: Key Performance Characteristics Startup • Availability • Scaling IO Speed • Performance • Scale
  • 9. 0 300 600 900 200 897 1,150 13.7 0.9 MICROSERVICES: Key Performance Characteristics Startup • Availability • Scaling Memory • Efficiency • Cost IO Speed • Performance • Scale
  • 10. 0 300 600 900 200 897 1,150 13.7 0.9 023.6 MICROSERVICES: Key Performance Characteristics Startup • Availability • Scaling Memory • Efficiency • Cost IO Speed • Performance • Scale
  • 11. 0 300 600 900 200 897 1,150 13.7 0.9 422 23.6 Startup • Availability • Scaling Memory • Efficiency • Cost IO Speed • Performance • Scale MICROSERVICES: Key Performance Characteristics
  • 12. 12% 38% 100% 0% 20% 40% 60% 80% 100% Cloud Native Cloud Services Cloud Hosted Cloud Hosting vs Cloud Native Evans Cloud Development Survey 2017
  • 13. 12% 38% 100% 0% 20% 40% 60% 80% 100% Cloud Native Cloud Services Cloud Hosted Cloud Hosting vs Cloud Native Evans Cloud Development Survey 2017
  • 14. Cloud Hosting vs Cloud Native 12% 38% 100% 0% 20% 40% 60% 80% 100% Cloud Native Cloud Services Cloud Hosted Evans Cloud Development Survey 2017
  • 15. 12% 48% 79% 0% 20% 40% 60% 80% 100% Kubernetes Docker Cloud Hosted Cloud Hosting vs Cloud Native Node.js Foundation Survey 2018 12% 38% 100% 0% 20% 40% 60% 80% 100% Cloud Native Cloud Services Cloud Hosted Evans Cloud Development Survey 2017
  • 16. 12% 48% 79% 0% 20% 40% 60% 80% 100% Kubernetes Docker Cloud Hosted Cloud Hosting vs Cloud Native Node.js Foundation Survey 2018 12% 38% 100% 0% 20% 40% 60% 80% 100% Cloud Native Cloud Services Cloud Hosted Evans Cloud Development Survey 2017
  • 17. Cloud Hosting vs Cloud Native 12% 48% 79% 0% 20% 40% 60% 80% 100% Kubernetes Docker Cloud Hosted Node.js Foundation Survey 2018 12% 38% 100% 0% 20% 40% 60% 80% 100% Cloud Native Cloud Services Cloud Hosted Evans Cloud Development Survey 2017
  • 18. : Key Technologies Container Orchestration Monitoring Distributed TracingPackage and Deploy Platform
  • 28. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"]
  • 29. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] Node.js 8 Docker Image
  • 30. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] Node.js 8 Docker Image Operating System Updates
  • 31. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] Node.js 8 Docker Image Operating System Updates package.json
  • 32. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] Node.js 8 Docker Image Operating System Updates package.json node_modules
  • 33. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] Node.js 8 Docker Image Operating System Updates package.json node_modules Application
  • 34. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] Node.js 8 Docker Image Operating System Updates package.json node_modules Application 716 MB
  • 35. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production Node.js 8 Docker Image Operating System Updates package.json node_modules 716 MB
  • 36. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] Node.js 8 Docker Image Operating System Updates package.json node_modules 716 MB
  • 37. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] node_modules 716 MB package.json
  • 38. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] node_modules 716 MB Node.js 8 SLIM Docker Image package.json
  • 39. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] node_modules 716 MB Node.js 8 SLIM Docker Image Operating System Updates package.json
  • 40. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] node_modules 716 MB Node.js 8 SLIM Docker Image Operating System Updates package.json
  • 41. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] node_modules 716 MB Node.js 8 SLIM Docker Image Operating System Updates Application package.json
  • 42. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] node_modules Node.js 8 SLIM Docker Image Operating System Updates Application package.json 716 MB
  • 43. 229 MB func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 FROM node:8 WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY package.json /app/ RUN npm install —production # Copy the dependencies into a Slim Node docker image FROM node:8-slim WORKDIR "/app" # Install OS updates RUN apt-get update && apt-get dist-upgrade -y && apt-get clean && echo 'Finished installing dependencies' # Install app dependencies COPY --from=0 /app/node_modules /app/node_modules COPY . /app ENV NODE_ENV production ENV PORT 3000 USER node EXPOSE 3000 CMD ["npm", "start"] node_modules Node.js 8 SLIM Docker Image Operating System Updates Application package.json
  • 44. $ docker build -t node-app -f Dockerfile-run .

  • 45. $ docker build -t node-app -f Dockerfile-run .
 $ docker run -d —p 3000:3000 -t node-app
  • 46. $ docker build -t node-app -f Dockerfile-run .
 $ docker run -d —p 3000:3000 -t node-app
  • 49. HELM CHARTS func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 /chart/nodeserver/templates/basedeployment.yaml /chart/nodeserver/templates/deployment.yaml /chart/nodeserver/templates/service.yaml /chart/nodeserver/templates/hpa.yaml /chart/nodeserver/templates/istio.yaml /chart/nodeserver/Chart.yaml /chart/nodeserver/values.yaml
  • 50. HELM CHARTS func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 /chart/nodeserver/templates/basedeployment.yaml /chart/nodeserver/templates/deployment.yaml /chart/nodeserver/templates/service.yaml /chart/nodeserver/templates/hpa.yaml /chart/nodeserver/templates/istio.yaml /chart/nodeserver/Chart.yaml /chart/nodeserver/values.yaml apiVersion: v1 description: A Helm chart for Kubernetes name: nodeserver
  • 51. HELM CHARTS func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 /chart/nodeserver/templates/basedeployment.yaml /chart/nodeserver/templates/deployment.yaml /chart/nodeserver/templates/service.yaml /chart/nodeserver/templates/hpa.yaml /chart/nodeserver/templates/istio.yaml /chart/nodeserver/Chart.yaml /chart/nodeserver/values.yaml replicaCount: 1 revisionHistoryLimit: 1 image: repository: cnbailey/nodeserver tag: 1.0.0 pullPolicy: Always resources: requests: cpu: 200m memory: 300Mi livenessProbe: initialDelaySeconds: 3000 periodSeconds: 1000 service: name: Node type: NodePort servicePort: 3000 hpa: enabled: false minReplicas: 1 maxReplicas: 2 metrics: cpu: targetAverageUtilization: 70 memory: targetAverageUtilization: 70 services: base: enabled: false
  • 52. HELM CHARTS func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 /chart/nodeserver/templates/basedeployment.yaml /chart/nodeserver/templates/deployment.yaml /chart/nodeserver/templates/service.yaml /chart/nodeserver/templates/hpa.yaml /chart/nodeserver/templates/istio.yaml /chart/nodeserver/Chart.yaml /chart/nodeserver/values.yaml replicaCount: 1 revisionHistoryLimit: 1 image: repository: cnbailey/nodeserver tag: 1.0.0 pullPolicy: Always resources: requests: cpu: 200m memory: 300Mi livenessProbe: initialDelaySeconds: 3000 periodSeconds: 1000 service: name: Node type: NodePort servicePort: 3000 hpa: enabled: false minReplicas: 1 maxReplicas: 2 metrics: cpu: targetAverageUtilization: 70 memory: targetAverageUtilization: 70 services: base: enabled: false
  • 53. HELM CHARTS func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 /chart/nodeserver/templates/basedeployment.yaml /chart/nodeserver/templates/deployment.yaml /chart/nodeserver/templates/service.yaml /chart/nodeserver/templates/hpa.yaml /chart/nodeserver/templates/istio.yaml /chart/nodeserver/Chart.yaml /chart/nodeserver/values.yaml replicaCount: 1 revisionHistoryLimit: 1 image: repository: cnbailey/nodeserver tag: 1.0.0 pullPolicy: Always resources: requests: cpu: 200m memory: 300Mi livenessProbe: initialDelaySeconds: 3000 periodSeconds: 1000 service: name: Node type: NodePort servicePort: 3000 hpa: enabled: false minReplicas: 1 maxReplicas: 2 metrics: cpu: targetAverageUtilization: 70 memory: targetAverageUtilization: 70 services: base: enabled: false
  • 54. HELM CHARTS func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 /chart/nodeserver/templates/basedeployment.yaml /chart/nodeserver/templates/deployment.yaml /chart/nodeserver/templates/service.yaml /chart/nodeserver/templates/hpa.yaml /chart/nodeserver/templates/istio.yaml /chart/nodeserver/Chart.yaml /chart/nodeserver/values.yaml replicaCount: 1 revisionHistoryLimit: 1 image: repository: cnbailey/nodeserver tag: 1.0.0 pullPolicy: Always resources: requests: cpu: 200m memory: 300Mi livenessProbe: initialDelaySeconds: 3000 periodSeconds: 1000 service: name: Node type: NodePort servicePort: 3000 hpa: enabled: false minReplicas: 1 maxReplicas: 2 metrics: cpu: targetAverageUtilization: 70 memory: targetAverageUtilization: 70 services: base: enabled: false
  • 55. HELM CHARTS func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 /chart/nodeserver/templates/basedeployment.yaml /chart/nodeserver/templates/deployment.yaml /chart/nodeserver/templates/service.yaml /chart/nodeserver/templates/hpa.yaml /chart/nodeserver/templates/istio.yaml /chart/nodeserver/Chart.yaml /chart/nodeserver/values.yaml replicaCount: 1 revisionHistoryLimit: 1 image: repository: cnbailey/nodeserver tag: 1.0.0 pullPolicy: Always resources: requests: cpu: 200m memory: 300Mi livenessProbe: initialDelaySeconds: 3000 periodSeconds: 1000 service: name: Node type: NodePort servicePort: 3000 hpa: enabled: false minReplicas: 5 maxReplicas: 9 metrics: cpu: targetAverageUtilization: 70 memory: targetAverageUtilization: 70 services: base: enabled: false
  • 56. $ cd ./chart/nodeserver/ $ helm install —name nodeserver .
  • 57. $ cd ./chart/nodeserver/ $ helm install —name nodeserver .
  • 58. $ cd ./chart/nodeserver/ $ helm install —name nodeserver .
  • 62. Health Checks HTTP Requests GET: /ready GET: /ready
  • 63. Health Checks HTTP Requests GET: /ready 200 GET: /ready 200
  • 64. Health Checks HTTP Requests GET: /ready 200 GET: /health 200 GET: /ready 200 GET: /health 200
  • 65. Health Checks HTTP Requests GET: /ready 503 GET: /health 503 GET: /ready 200 GET: /health 200
  • 66. Health Checks HTTP Requests GET: /ready 503 GET: /health 503 GET: /ready 200 GET: /health 200 SIGTERM
  • 67. Health Checks HTTP Requests GET: /ready 503 GET: /health 503 GET: /ready 200 GET: /health 200 SIGTERM SIGKILL
  • 68. Health Checks HTTP Requests GET: /ready 503 GET: /health 503 GET: /ready 200 GET: /health 200 SIGTERM SIGKILL
  • 69. Health Checks HTTP Requests GET: /ready 503 GET: /health 503 GET: /ready 200 GET: /health 200
  • 70. Health Checks HTTP Requests GET: /ready 503 GET: /health 200 GET: /ready 200 GET: /health 200
  • 71. GET: /ready 200 GET: /health 200 GET: /ready 200 GET: /health 200 Health Checks HTTP Requests
  • 72. GET: /ready 200 GET: /health 200 GET: /ready 200 GET: /health 200 Health Checks HTTP Requests
  • 73. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const health = require(ā€˜@cloudnative/health-connect'); let healthcheck = new health.HealthChecker();- Health Checks
  • 74. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const health = require(ā€˜@cloudnative/health-connect'); let healthcheck = new health.HealthChecker(); app.use('/ready', health.ReadinessEndpoint(healthcheck)) app.use('/health', health.LivenessEndpoint(healthcheck))- Health Checks
  • 75. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const health = require(ā€˜@cloudnative/health-connect'); let healthcheck = new health.HealthChecker(); const livePromise = new Promise(function (resolve, _reject) { resolve(); }); app.use('/ready', health.ReadinessEndpoint(healthcheck)) app.use('/health', health.LivenessEndpoint(healthcheck)) - Health Checks
  • 76. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const health = require(ā€˜@cloudnative/health-connect'); let healthcheck = new health.HealthChecker(); const livePromise = new Promise(function (resolve, _reject) { resolve(); }); let liveCheck = new health.LivenessCheck("live", livePromise); app.use('/ready', health.ReadinessEndpoint(healthcheck)) app.use('/health', health.LivenessEndpoint(healthcheck)) - Health Checks
  • 77. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const health = require(ā€˜@cloudnative/health-connect'); let healthcheck = new health.HealthChecker(); const livePromise = new Promise(function (resolve, _reject) { resolve(); }); let liveCheck = new health.LivenessCheck("live", livePromise); healthcheck.registerlivenessCheck(liveCheck); app.use('/ready', health.ReadinessEndpoint(healthcheck)) app.use('/health', health.LivenessEndpoint(healthcheck)) - Health Checks
  • 78. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const health = require(ā€˜@cloudnative/health-connect'); let healthcheck = new health.HealthChecker(); const livePromise = new Promise(function (resolve, _reject) { resolve(); }); let liveCheck = new health.LivenessCheck("live", livePromise); const readyPromise = new Promise(function (resolve, _reject) { resolve(); }); let readyCheck = new health.ReadinessCheck("ready", readyPromise); healthcheck.registerlivenessCheck(liveCheck); healthcheck.registerReadinessCheck(readyCheck); app.use('/ready', health.ReadinessEndpoint(healthcheck)) app.use('/health', health.LivenessEndpoint(healthcheck)) - Health Checks -
  • 79. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const health = require(ā€˜@cloudnative/health-connect'); let healthcheck = new health.HealthChecker(); const livePromise = new Promise(function (resolve, _reject) { resolve(); }); let liveCheck = new health.LivenessCheck("live", livePromise); const readyPromise = new Promise(function (resolve, _reject) { resolve(); }); let readyCheck = new health.ReadinessCheck("ready", readyPromise); const shutdownPromise = new Promise(function (resolve, _reject) { resolve(); }); let shutdownCheck = new health.ShutdownCheck(ā€œshutā€, shutdownProm); healthcheck.registerlivenessCheck(liveCheck); healthcheck.registerReadinessCheck(readyCheck); healthcheck.registerShutdownCheck(shutdownCheck); app.use('/ready', health.ReadinessEndpoint(healthcheck)) app.use('/health', health.LivenessEndpoint(healthcheck)) - Health Checks -
  • 82. GET: /ready 200 GET: /health 200 GET: /ready 200 GET: /health 200 HTTP Requests
  • 83. GET: /ready 200 GET: /health 200 GET: /metrics GET: /ready 200 GET: /health 200 GET: /metrics HTTP Requests
  • 84. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const prometheus = require(ā€˜appmetrics-prometheus’).attach(); -
  • 85. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const prometheus = require(ā€˜appmetrics-prometheus’).attach(); -
  • 89. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 90. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 91. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 92. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 93. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 94. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 95. PUBLIC NETWORK CLOUD NETWORK CATALOG ORDER INVENTORY USER MySQL MongoDB SPARK ELASTICSEARCH BACKEND FOR
 FRONTEND MICROSERVICES SERVICES LOAD
 BALANCER
  • 96. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const zipkin = require(ā€˜appmetrics-zipkin’);-
  • 97. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const zipkin = require(ā€˜appmetrics-zipkin’);-
  • 98. func add(_ a: Int, to b: Int) -> Void { print(a + b) } let a = ā€5ā€ let b = 3 const zipkin = require(ā€˜appmetrics-zipkin’);-