SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
SCALLING YOUR
WEBAPP ON
GOOGLE CLOUD
BESAFEBEHOME
PresentedbyJimishParekh
COVERED
TODAY
A BRIEF OUTLINE
About me
What is Rest Framework
Express JS & Node JS
Basic API in Node & ExpressJS
MongoDB - connection
MongoDB - Secure
Run Locally
GCP
Deploying to GCP
Running Application
Best Methods
Intro to Load Balancing
ABOUT ME
Jimish Parekh, A guy who has
founded small firm called
Pedals Up where enthusiastic
developers like myself work
and have fun together.
Developing amazing web and
mobile application is our
passion at Pedals Up whether
it is our product or our
clients'.
GotoLinkedin
RESTFRAMEWORK
acronym for Representational State Transfer,
REST is a very well known phenomenon in
software development world.
HOW API HELPS IN WEBAPP?
Where API lives in the webapp architecture.
API
DEVELOPMENT
LET'S JUMP, SHALL WE?
PLANNING IDEATION IMPLEMENTATION
Starting the Development
Starting with Node.JS
Let's talk about Node.js as framework and why
one should use it.
IT'S
ENVIRONMENT
It's an
environment,
back-end
framework runs
within it. it's
not framework in
itself.
CROSS
PLATFORM
Node.js
includes libuv
which is Google
V8 engine.
SERVER
SIDE JS
Server side
Javascript Run
time
environment and
it's open
source.
NO WINDOW
Being JS env,
Node.js does
not expose
global "window"
object, as it
does not run on
browser.
2010 2012 2014 2016 2018 2020
40
30
20
10
0
WHY SO POPULAR
Huge & active JS ecosystem
open sources
large community
doesn't break compatibility
in majorways
From 2009, since when Node.js
came in market, it has been
popular for following reasons:
SINGLE
THREADED
WHY NODE JS
IS BAD?
NODE.JS TECHNOLOGY ITSELF ISN'T BAD,
IT'S QUITE MATURE AND WIDELY USED
FOR MANY DIFFERENT TYPE OF SERVERS
MAY BE BAD CHOICE FOR WEB SERVERS DOUBLING AS
COMPUTATIONAL SERVERS.
LET'S START EXPRESS.JS
Single Page
Multi Page
Hybrid
Web application server
framework designed for
building :
Web applications
WHY
EXPRESS.JS?
EXPRESS FOR NODE.JS
ExpressJS did for NodeJS what Bootstrap did
for HTML/CSS and responsive web design.
EASY IMPLEMENTATIONS
ExpressJS has made backend development piece
of cake literally. I don't know why someone
should use anything else?
FASTER AND SMARTER
Simplicity, minimalism, flexibility,
scalability are some of its characteristics
and since it is made in NodeJS itself, it
inherited its performance as well.
CODING STARTS HERE
LET'S WORRY
ABOUT DATABASE
MONGODB, HERE WE COME.
NOSQL
STRUCTURE OF SINGLE
OBJECT IS CLEAR. NO
COMPLEX JOINS.
SCALE
SCALING WITH MONGODB IS
EASY.
JAVASCRIPT
it uses javascript as it's
language.
BETTER PERFORMACE
Due to atomic transactions,
mongodb gives better
performance than relational
databases.
NOT ONLY SQL DATABASE
Mongodb is document database.
where document is having
dynamic structures.
SECURING MONGODB
using mongodb npm
CONNECTING TO
EXPRESS
OPERATIONS AS PER
ROUTES
Rest operationsenabling authentication
01
02 01 RUNNING LOCAL
Deploying this
locally will give
testing experience
02 CLOUD DEPLOY
Every applications
are going to be
deployed on cloud.
Why GCP?
Google Cloud platform is preferred more than AWS
and Azure as per survey done in 2020.
BETTER
PRICING
Google bills in
minute-level
increments
(with a 10-
minute minimum
charge), so you
only pay for
the compute
time you use.
BIGGEST
NETWORK
private global
fiber and
tiered network
enables GCP to
provide fastest
and smoothest
servers.
DISCOUNTS
GCP gives
disocunts on
long running
workloads with
no up-front
commitment.
LIVE
MIGRATIONS
OF VM
without any
down time GCP
offers live
migrations
which any other
firm does not
offer.
IMPROVED
PERFORMANCE
Manages hundreds
of thousands
users at same
time
concurrently
without any
hicups.
CONTINUOUS
EXPANSION
since the
launch of GCP,
they grew
rapidly and
trying to open
more and more
physical
centers all
over the world.
STATE OF ART
SECURITY
Encryption,
authentication,
authorization,
transitions etc.
all are covered by
Google itself.
what more is
needed?
REDUNDUNT
BACKUPS
It stores data
redundantly,
with automatic
checksums to
ensure data
integrity.
LET'S DEPLOY ------->
SCALING
HORIZONTAL SCALING
duplicate your application instances, to cop
with large number of requests
Load balancing
VERTICAL SCALING
injecting more power
adding more memory
BEST THING ABOUT NODE.JS
Scalability is built in the very core of the
runtime.
HORIZONTAL
DIFFERENT MACHINES
load balancing needs to be applied in this
case.
RISKS
troubleshooting more challenging, maintain a
load balancer and deployment rules.
SINGLE MULTICORE MACHINE
Have native cluster nodes deploy on different
cores of your machines
VERTICAL
ADDING MORE MEMORY
by default, Node won’t use more than 1.76GB
of 64-bit machines’ memory
in case of a 32GB of RAM machine, for
instance, the Node process will limit itself
to only a fraction of its memory
INJECTING MORE POWER
MULTIPLE PROCESS ON
SAME MACHINE
There are different strategies
for scaling on a single
machine, but the common
concept is to have multiple
processes running on the same
port, with some sort of
internal load balancing used
to distribute the incoming
connections across all the
processes/cores.
DON'T
It is probably not clever to spawn a number of processes bigger than the
number of cores, because at the lower level the OS will likely balance the
CPU time between those processes.
NATIVE CLUSTER
The native Node.js cluster module
is the basic way to scale a Node
app on a single machine
PM2
If you are using PM2 as your
process manager , there is a
magic cluster feature that let
you scale your processes.
MULTIPLE MACHINES WITH
NETWORK LOAD BALANCING
The main concept in scaling
across multiple machines is
similar to scaling on multiple
cores, there are multiple
machines, each one running one
or more processes, and a
balancer to redirect traffic
to each machine.
MATERIALS SECURE & INSTALL MONGODB
SECURE MONGODB DATABASE
NODE.JS EXPRESS BOILER REPO
Have any questions?
Ask away
BE HOME BE SAFE
JIMISH PAREKH
GET IN TOUCH
EMAIL
jim@pedalsup.com
PHONE
+91 90332 78750
GITHUB, LINKEDIN
@jimishio
INSTAGRAM & TWITTER
@touringminded

Mais conteúdo relacionado

Mais procurados

Serverless framework와 CircleCI를 통한 NoOps 맛보기
Serverless framework와 CircleCI를 통한 NoOps 맛보기Serverless framework와 CircleCI를 통한 NoOps 맛보기
Serverless framework와 CircleCI를 통한 NoOps 맛보기Kyuhyun Byun
 
WebGL의 무궁무진한 가능성
WebGL의 무궁무진한 가능성 WebGL의 무궁무진한 가능성
WebGL의 무궁무진한 가능성 Jun Ho Lee
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsEdy Segura
 
Fine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppFine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppAllan Tan
 
Yakiniku on the Cloud
Yakiniku on the CloudYakiniku on the Cloud
Yakiniku on the CloudTakao Funami
 
Understand How Node.js and Core Features Works
Understand How Node.js and Core Features WorksUnderstand How Node.js and Core Features Works
Understand How Node.js and Core Features WorksHengki Sihombing
 
Critical thinking in Node.js
Critical thinking in Node.jsCritical thinking in Node.js
Critical thinking in Node.jsMorgan Cheng
 
Improve Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With GruntImprove Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With GruntDen Odell
 
[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginxNicolas Embleton
 
Front-end development automation with Grunt
Front-end development automation with GruntFront-end development automation with Grunt
Front-end development automation with Gruntbenko
 
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기Jay Park
 
從技術角度看 RWD - Technical Approaches to RWD
從技術角度看 RWD - Technical Approaches to RWD從技術角度看 RWD - Technical Approaches to RWD
從技術角度看 RWD - Technical Approaches to RWDChris Wu
 
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)Ricardo Castelhano
 
Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介gree_tech
 

Mais procurados (20)

Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
SWTT 140407 session02
SWTT 140407 session02SWTT 140407 session02
SWTT 140407 session02
 
Serverless framework와 CircleCI를 통한 NoOps 맛보기
Serverless framework와 CircleCI를 통한 NoOps 맛보기Serverless framework와 CircleCI를 통한 NoOps 맛보기
Serverless framework와 CircleCI를 통한 NoOps 맛보기
 
WebGL의 무궁무진한 가능성
WebGL의 무궁무진한 가능성 WebGL의 무궁무진한 가능성
WebGL의 무궁무진한 가능성
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
 
Node.js with Express
Node.js with ExpressNode.js with Express
Node.js with Express
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Fine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppFine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile App
 
Yakiniku on the Cloud
Yakiniku on the CloudYakiniku on the Cloud
Yakiniku on the Cloud
 
Running AWS Locally
Running AWS LocallyRunning AWS Locally
Running AWS Locally
 
Javascript - Today's trending script
Javascript - Today's trending scriptJavascript - Today's trending script
Javascript - Today's trending script
 
Understand How Node.js and Core Features Works
Understand How Node.js and Core Features WorksUnderstand How Node.js and Core Features Works
Understand How Node.js and Core Features Works
 
Critical thinking in Node.js
Critical thinking in Node.jsCritical thinking in Node.js
Critical thinking in Node.js
 
Improve Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With GruntImprove Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With Grunt
 
[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx
 
Front-end development automation with Grunt
Front-end development automation with GruntFront-end development automation with Grunt
Front-end development automation with Grunt
 
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
 
從技術角度看 RWD - Technical Approaches to RWD
從技術角度看 RWD - Technical Approaches to RWD從技術角度看 RWD - Technical Approaches to RWD
從技術角度看 RWD - Technical Approaches to RWD
 
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
 
Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介
 

Semelhante a Node.JS Expreee.JS scale webapp on Google cloud

Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdflubnayasminsebl
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfiDataScientists
 
Node.js and GraphQL: From Setup to Server, Your Complete Tutorial
Node.js and GraphQL: From Setup to Server, Your Complete TutorialNode.js and GraphQL: From Setup to Server, Your Complete Tutorial
Node.js and GraphQL: From Setup to Server, Your Complete TutorialLakshman S
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed AssafAhmed Assaf
 
What is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdfWhat is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdfSmith Daniel
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBhargav Anadkat
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsNicholas Jansma
 
S&T What I know about Node 110817
S&T What I know about Node 110817S&T What I know about Node 110817
S&T What I know about Node 110817Dan Dineen
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows AzureMongoDB
 
What are some misconceptions about node js
What are some misconceptions about node jsWhat are some misconceptions about node js
What are some misconceptions about node jsNarola Infotech
 
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQNode.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQJoshua Miller
 
Mongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBMongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBJustin Smestad
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itFibonalabs
 
Node.js vs. java which one should you choose for backend development
Node.js vs. java  which one should you choose for backend development Node.js vs. java  which one should you choose for backend development
Node.js vs. java which one should you choose for backend development Moon Technolabs Pvt. Ltd.
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACInexture Solutions
 

Semelhante a Node.JS Expreee.JS scale webapp on Google cloud (20)

Java script framework
Java script frameworkJava script framework
Java script framework
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
 
Node.js and GraphQL: From Setup to Server, Your Complete Tutorial
Node.js and GraphQL: From Setup to Server, Your Complete TutorialNode.js and GraphQL: From Setup to Server, Your Complete Tutorial
Node.js and GraphQL: From Setup to Server, Your Complete Tutorial
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
What is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdfWhat is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdf
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.js
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
S&T What I know about Node 110817
S&T What I know about Node 110817S&T What I know about Node 110817
S&T What I know about Node 110817
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
 
What are some misconceptions about node js
What are some misconceptions about node jsWhat are some misconceptions about node js
What are some misconceptions about node js
 
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQNode.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
 
Node js
Node jsNode js
Node js
 
Mongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBMongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDB
 
Mean stack
Mean stackMean stack
Mean stack
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About it
 
Node.js vs. java which one should you choose for backend development
Node.js vs. java  which one should you choose for backend development Node.js vs. java  which one should you choose for backend development
Node.js vs. java which one should you choose for backend development
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
 

Último

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Node.JS Expreee.JS scale webapp on Google cloud

  • 1. SCALLING YOUR WEBAPP ON GOOGLE CLOUD BESAFEBEHOME PresentedbyJimishParekh
  • 2. COVERED TODAY A BRIEF OUTLINE About me What is Rest Framework Express JS & Node JS Basic API in Node & ExpressJS MongoDB - connection MongoDB - Secure Run Locally GCP Deploying to GCP Running Application Best Methods Intro to Load Balancing
  • 3. ABOUT ME Jimish Parekh, A guy who has founded small firm called Pedals Up where enthusiastic developers like myself work and have fun together. Developing amazing web and mobile application is our passion at Pedals Up whether it is our product or our clients'. GotoLinkedin
  • 4. RESTFRAMEWORK acronym for Representational State Transfer, REST is a very well known phenomenon in software development world.
  • 5. HOW API HELPS IN WEBAPP? Where API lives in the webapp architecture.
  • 8. Starting with Node.JS Let's talk about Node.js as framework and why one should use it.
  • 9. IT'S ENVIRONMENT It's an environment, back-end framework runs within it. it's not framework in itself. CROSS PLATFORM Node.js includes libuv which is Google V8 engine. SERVER SIDE JS Server side Javascript Run time environment and it's open source. NO WINDOW Being JS env, Node.js does not expose global "window" object, as it does not run on browser.
  • 10. 2010 2012 2014 2016 2018 2020 40 30 20 10 0 WHY SO POPULAR Huge & active JS ecosystem open sources large community doesn't break compatibility in majorways From 2009, since when Node.js came in market, it has been popular for following reasons:
  • 11. SINGLE THREADED WHY NODE JS IS BAD? NODE.JS TECHNOLOGY ITSELF ISN'T BAD, IT'S QUITE MATURE AND WIDELY USED FOR MANY DIFFERENT TYPE OF SERVERS MAY BE BAD CHOICE FOR WEB SERVERS DOUBLING AS COMPUTATIONAL SERVERS.
  • 12. LET'S START EXPRESS.JS Single Page Multi Page Hybrid Web application server framework designed for building : Web applications
  • 13. WHY EXPRESS.JS? EXPRESS FOR NODE.JS ExpressJS did for NodeJS what Bootstrap did for HTML/CSS and responsive web design. EASY IMPLEMENTATIONS ExpressJS has made backend development piece of cake literally. I don't know why someone should use anything else? FASTER AND SMARTER Simplicity, minimalism, flexibility, scalability are some of its characteristics and since it is made in NodeJS itself, it inherited its performance as well.
  • 16. NOSQL STRUCTURE OF SINGLE OBJECT IS CLEAR. NO COMPLEX JOINS. SCALE SCALING WITH MONGODB IS EASY.
  • 17. JAVASCRIPT it uses javascript as it's language. BETTER PERFORMACE Due to atomic transactions, mongodb gives better performance than relational databases. NOT ONLY SQL DATABASE Mongodb is document database. where document is having dynamic structures.
  • 18. SECURING MONGODB using mongodb npm CONNECTING TO EXPRESS OPERATIONS AS PER ROUTES Rest operationsenabling authentication
  • 19. 01 02 01 RUNNING LOCAL Deploying this locally will give testing experience 02 CLOUD DEPLOY Every applications are going to be deployed on cloud.
  • 20. Why GCP? Google Cloud platform is preferred more than AWS and Azure as per survey done in 2020.
  • 21. BETTER PRICING Google bills in minute-level increments (with a 10- minute minimum charge), so you only pay for the compute time you use. BIGGEST NETWORK private global fiber and tiered network enables GCP to provide fastest and smoothest servers. DISCOUNTS GCP gives disocunts on long running workloads with no up-front commitment. LIVE MIGRATIONS OF VM without any down time GCP offers live migrations which any other firm does not offer.
  • 22. IMPROVED PERFORMANCE Manages hundreds of thousands users at same time concurrently without any hicups. CONTINUOUS EXPANSION since the launch of GCP, they grew rapidly and trying to open more and more physical centers all over the world. STATE OF ART SECURITY Encryption, authentication, authorization, transitions etc. all are covered by Google itself. what more is needed? REDUNDUNT BACKUPS It stores data redundantly, with automatic checksums to ensure data integrity.
  • 24. SCALING HORIZONTAL SCALING duplicate your application instances, to cop with large number of requests Load balancing VERTICAL SCALING injecting more power adding more memory BEST THING ABOUT NODE.JS Scalability is built in the very core of the runtime.
  • 25. HORIZONTAL DIFFERENT MACHINES load balancing needs to be applied in this case. RISKS troubleshooting more challenging, maintain a load balancer and deployment rules. SINGLE MULTICORE MACHINE Have native cluster nodes deploy on different cores of your machines
  • 26. VERTICAL ADDING MORE MEMORY by default, Node won’t use more than 1.76GB of 64-bit machines’ memory in case of a 32GB of RAM machine, for instance, the Node process will limit itself to only a fraction of its memory INJECTING MORE POWER
  • 27. MULTIPLE PROCESS ON SAME MACHINE There are different strategies for scaling on a single machine, but the common concept is to have multiple processes running on the same port, with some sort of internal load balancing used to distribute the incoming connections across all the processes/cores.
  • 28. DON'T It is probably not clever to spawn a number of processes bigger than the number of cores, because at the lower level the OS will likely balance the CPU time between those processes.
  • 29. NATIVE CLUSTER The native Node.js cluster module is the basic way to scale a Node app on a single machine PM2 If you are using PM2 as your process manager , there is a magic cluster feature that let you scale your processes.
  • 30. MULTIPLE MACHINES WITH NETWORK LOAD BALANCING The main concept in scaling across multiple machines is similar to scaling on multiple cores, there are multiple machines, each one running one or more processes, and a balancer to redirect traffic to each machine.
  • 31. MATERIALS SECURE & INSTALL MONGODB SECURE MONGODB DATABASE NODE.JS EXPRESS BOILER REPO
  • 32. Have any questions? Ask away BE HOME BE SAFE JIMISH PAREKH
  • 33. GET IN TOUCH EMAIL jim@pedalsup.com PHONE +91 90332 78750 GITHUB, LINKEDIN @jimishio INSTAGRAM & TWITTER @touringminded