SlideShare a Scribd company logo
Enhancing scalability
using Node.js
Team 15 - Enlighten
Ratan Kadam - ratan.kadam@gmail.com
Monil Shah - monil.shaah@gmail.com
Akshay Jarandikar - akshayjaradikar@gmail.com
Swapnil Joshi - swapnil.joshi1590@gmail.com
Scalability
 WhyWhat is scalability?
 do we need scalability?
 Current industry solutions -
• Horizontal Scaling
• Vertical Scaling
• Multi-threading
• Cloud Computing
Horizontal vs Vertical Scaling
Horizontal Scaling
Adds extra identical boxes to
server.
Issues:
• Requires Load balancer for
managing connection.
• Distribution of work within the
units becomes overhead.
• Additional investment.
Vertical Scaling
Increases the power of existing
system by adding more powerful
hardware.
Issues:
• Additional Investment
• Single point of failure
(SPOF)
Multi-threading & Cloud Computing
Multi-threading
Issues:
-High chances of deadlock if
application is not designed
properly.
-Web-servers need to handle
thousands of HTTP requests. This
may cause many threads to wait
for network operations.
-For thousands of simultaneous
requests, spawning threads for all
processes would not achieve the
desired scalability.
Cloud Computing
Issues:
-Application architecture may or
may not be suited for Cloud
Computing
-Application and Data Security in
the Cloud
-Lack of skilled resources;
external training is required
-If application is not designed
properly for cloud platform;
difficult to yield benefits
-Again, substantial additional
investment
So the challenge…
 The challenge is to scale the web
application without major re-engineering
and buying new hardware while keeping
its architecture simple and easy to
manage.
Solution
Important Features:
Asynchronous in nature
Event driven
Non-blocking I/O
Proposed Architecture
Proxy Middleware, Entry point for real
world access, Security, Caching
Nginx Server Serves static content, Caching
Load Balancer  connects multithreaded
node.js instances and handles load distribution
V8 JavaScript engine  handles compilation and
execution of JavaScript
Event loop  Handles events in program
during execution of asynchronous operations.
Proxy Server
Server Pool
Routing request based on content type
Nginx server
Nginx server stores static data in hierarchical cache. Thus reduces the latency.
Also supports compression format to reduce response size.
Node.js Workflow
3 core execution models:
1.Asynchronous request processing
2.Event driven programming
3.Non-blocking I/O
 When request is made to server, instead of waiting for the request to complete,
server continues to process other requests.
 When request processing completes, the response is sent to caller using
callback mechanism.
 Event listener listens to the events and determines the flow of program.
 There is an event loop that listens to events and then triggers callback functions.
Non-blocking I/O
 Non-blocking I/O supports the execution of system to be continued
without waiting for I/O operations to complete.
 This enables the architecture to have asynchronous request
processing.
Event loop
Event loop is a programming construct that waits for and dispatches events in a
program once their asynchronous operation completes.
Node Load Balancer Working
 Load balancer
distributes the
workload among
available servers.
 Load Balancer sends
periodic heartbeat to
check server status.
 If one of the servers is
down then the load
balancer distributes
the request queue
among the available
servers.
V8 JavaScript Engine
 When V8 receives script source code, it parses it to create abstract
syntax tree.
 Then this AST is fed into the byte code generator to produce byte
code of the source.
 V8 execution environment then interprets this byte code and with the
help of JIT compiler it produces the native machine code that gets
executed.
 It uses techniques such as in-lining, elision of expensive runtime
properties, and inline caching are used for optimization
CASE STUDY
PayPal & eBay with Node.Js
Changes from development
perspective -
The development time was almost
half that with fewer people.
Number of files that were
constructed reduced to 40%.
The number of lines of code was
reduced by 33%.
Changes from performance
perspective
The number of requests per
second is doubled compared to Java
application.
 The response time is decreased
by 35% compared to Java
application.
Node.js Vs Traditional Java
Advantages
1. Asynchronous
2. Event driven programming
3. Multithreading
4. Scalability
5. High throughput
6. High Performance
7. Cost effective
8.Minimum Latency
9. Efficient Resource Consumption
10. Set of Standard Libraries
Conclusion
Scalability is next decade challenge for enterprise community
as more than 7.1 billion people are using internet.
Most of the vendors use solutions like Horizontal, vertical &
single threaded node.js. However, these single threaded
architectures may not be able to fix the next generation scalable
issues.
Solution to the problem is defined in our proposed architecture –
multithreaded node.js where multiple node.js instances are bind
to the fixed number of threads to boost the power of existing
Node JS.
So multithreaded node.js can be a cost effective, software based
scalable solution for next decade challenges for Enterprise
industries.
References
 Web application performance and scalability
http://www.webforefront.com/performance/scaling101.html
 Node.js at PayPal
https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/
 Nginx
http://www.aosabook.org/en/nginx.html
 Ebay’s first node.js application
http://www.ebaytechblog.com/2013/05/17/how-we-built-ebays-first-node-
js-application/#.VHLrNIvF9hw
 Node.js architecture diagram
http://blog.cloudfoundry.org/2012/06/27/future-proofing-your-apps-cloud-
foundry-and-node-js/
Questions…
Thank You..

More Related Content

What's hot (20)

New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
Jamshid Hashimi
 
Footprinting
FootprintingFootprinting
Footprinting
Duah John
 
Dns ppt
Dns pptDns ppt
Dns ppt
Mauood Hamidi
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
EPAM Systems
 
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEODangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Altinity Ltd
 
Introduction to Web Programming - first course
Introduction to Web Programming - first courseIntroduction to Web Programming - first course
Introduction to Web Programming - first course
Vlad Posea
 
Dom
Dom Dom
Dom
Surinder Kaur
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap
1amitgupta
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
n|u - The Open Security Community
 
hosting.ppt
hosting.ppthosting.ppt
hosting.ppt
webhostingguy
 
Dns
DnsDns
Dns
Sanoj Kumar
 
Building Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and HydraBuilding Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and Hydra
Markus Lanthaler
 
NMAP
NMAPNMAP
NMAP
PrateekAryan1
 
Domain name system
Domain name systemDomain name system
Domain name system
Siddharth Chandel
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
TO THE NEW | Technology
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
Visual Engineering
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
Sahil Agarwal
 
MongoDB - Aggregation Pipeline
MongoDB - Aggregation PipelineMongoDB - Aggregation Pipeline
MongoDB - Aggregation Pipeline
Jason Terpko
 
DNS
DNSDNS
DNS
FTC
 
AD & LDAP
AD & LDAPAD & LDAP
AD & LDAP
Cynoteck Technology Solutions Private Limited
 

Viewers also liked (20)

Interactive publication platform
Interactive publication platformInteractive publication platform
Interactive publication platform
ratankadam
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
Node.js - Best practices
Node.js  - Best practicesNode.js  - Best practices
Node.js - Best practices
Felix Geisendörfer
 
Architecting large Node.js applications
Architecting large Node.js applicationsArchitecting large Node.js applications
Architecting large Node.js applications
Sergi Mansilla
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
Horizontally Scaling Node.js and WebSockets
Horizontally Scaling Node.js and WebSocketsHorizontally Scaling Node.js and WebSockets
Horizontally Scaling Node.js and WebSockets
James Simpson
 
Node.js architecture (EN)
Node.js architecture (EN)Node.js architecture (EN)
Node.js architecture (EN)
Timur Shemsedinov
 
Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907
NodejsFoundation
 
Introduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascriptIntroduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascript
ChenKuo Chen
 
Xitrum internals
Xitrum internalsXitrum internals
Xitrum internals
Ngoc Dao
 
JavaScript Architecture: The Front and the Back of It
JavaScript Architecture: The Front and the Back of ItJavaScript Architecture: The Front and the Back of It
JavaScript Architecture: The Front and the Back of It
Kyle Simpson
 
Keymetrics pm2
Keymetrics pm2Keymetrics pm2
Keymetrics pm2
Alexandre Strzelewicz
 
What is Browser Sandbox Protection?
What is Browser Sandbox Protection?What is Browser Sandbox Protection?
What is Browser Sandbox Protection?
Quick Heal Technologies Ltd.
 
Building and Scaling Node.js Applications
Building and Scaling Node.js ApplicationsBuilding and Scaling Node.js Applications
Building and Scaling Node.js Applications
Ohad Kravchick
 
Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...
Jaap ter Woerds
 
Realtime webapp with node.js
Realtime webapp with node.jsRealtime webapp with node.js
Realtime webapp with node.js
robin_sy
 
Planning for the Horizontal: Scaling Node.js Applications
Planning for the Horizontal: Scaling Node.js ApplicationsPlanning for the Horizontal: Scaling Node.js Applications
Planning for the Horizontal: Scaling Node.js Applications
Modulus
 
Getting Started with the Node.js LoopBack APi Framework
Getting Started with the Node.js LoopBack APi FrameworkGetting Started with the Node.js LoopBack APi Framework
Getting Started with the Node.js LoopBack APi Framework
Jimmy Guerrero
 
NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015
NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015
NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015
Stéphane ESCANDELL
 
Interactive publication platform
Interactive publication platformInteractive publication platform
Interactive publication platform
ratankadam
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
Architecting large Node.js applications
Architecting large Node.js applicationsArchitecting large Node.js applications
Architecting large Node.js applications
Sergi Mansilla
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
Horizontally Scaling Node.js and WebSockets
Horizontally Scaling Node.js and WebSocketsHorizontally Scaling Node.js and WebSockets
Horizontally Scaling Node.js and WebSockets
James Simpson
 
Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907
NodejsFoundation
 
Introduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascriptIntroduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascript
ChenKuo Chen
 
Xitrum internals
Xitrum internalsXitrum internals
Xitrum internals
Ngoc Dao
 
JavaScript Architecture: The Front and the Back of It
JavaScript Architecture: The Front and the Back of ItJavaScript Architecture: The Front and the Back of It
JavaScript Architecture: The Front and the Back of It
Kyle Simpson
 
Building and Scaling Node.js Applications
Building and Scaling Node.js ApplicationsBuilding and Scaling Node.js Applications
Building and Scaling Node.js Applications
Ohad Kravchick
 
Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...
Jaap ter Woerds
 
Realtime webapp with node.js
Realtime webapp with node.jsRealtime webapp with node.js
Realtime webapp with node.js
robin_sy
 
Planning for the Horizontal: Scaling Node.js Applications
Planning for the Horizontal: Scaling Node.js ApplicationsPlanning for the Horizontal: Scaling Node.js Applications
Planning for the Horizontal: Scaling Node.js Applications
Modulus
 
Getting Started with the Node.js LoopBack APi Framework
Getting Started with the Node.js LoopBack APi FrameworkGetting Started with the Node.js LoopBack APi Framework
Getting Started with the Node.js LoopBack APi Framework
Jimmy Guerrero
 
NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015
NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015
NodeJS et SocketIO en mode scalable dans le Cloud - GAB 2015
Stéphane ESCANDELL
 
Ad

Similar to Scalability using Node.js (20)

Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
Behrad Zari
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
Yukti Kaura
 
8 Best Ways To Boost Node.js Performance Of Your Application!.pdf
8 Best Ways To Boost Node.js Performance Of Your Application!.pdf8 Best Ways To Boost Node.js Performance Of Your Application!.pdf
8 Best Ways To Boost Node.js Performance Of Your Application!.pdf
Sufalam Technologies
 
Node.js scaling in highload
Node.js scaling in highloadNode.js scaling in highload
Node.js scaling in highload
Timur Shemsedinov
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
Khaled Mosharraf
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
Bhavin Shah
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
KhalilSalhi7
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
MaulikShah516542
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
David Padbury
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
Edureka!
 
Nodejs
NodejsNodejs
Nodejs
Vinod Kumar Marupu
 
Real time web
Real time webReal time web
Real time web
Medhat Dawoud
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Aaron Rosenberg
 
Mastering the Art of Node.js: Development Services for Success
Mastering the Art of Node.js: Development Services for SuccessMastering the Art of Node.js: Development Services for Success
Mastering the Art of Node.js: Development Services for Success
NareshPatel726207
 
Node js
Node jsNode js
Node js
Fatih Şimşek
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
Ron Perlmuter
 
Node.js #digpen presentation
Node.js #digpen presentationNode.js #digpen presentation
Node.js #digpen presentation
GOSS Interactive
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
JITENDRA KUMAR PATEL
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
Ganesh Kondal
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
Behrad Zari
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
Yukti Kaura
 
8 Best Ways To Boost Node.js Performance Of Your Application!.pdf
8 Best Ways To Boost Node.js Performance Of Your Application!.pdf8 Best Ways To Boost Node.js Performance Of Your Application!.pdf
8 Best Ways To Boost Node.js Performance Of Your Application!.pdf
Sufalam Technologies
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
Bhavin Shah
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
David Padbury
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
Edureka!
 
Mastering the Art of Node.js: Development Services for Success
Mastering the Art of Node.js: Development Services for SuccessMastering the Art of Node.js: Development Services for Success
Mastering the Art of Node.js: Development Services for Success
NareshPatel726207
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
Ron Perlmuter
 
Node.js #digpen presentation
Node.js #digpen presentationNode.js #digpen presentation
Node.js #digpen presentation
GOSS Interactive
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
JITENDRA KUMAR PATEL
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
Ganesh Kondal
 
Ad

Recently uploaded (20)

Critical Thinking and Bias with Jibi Moses
Critical Thinking and Bias with Jibi MosesCritical Thinking and Bias with Jibi Moses
Critical Thinking and Bias with Jibi Moses
Excellence Foundation for South Sudan
 
Types of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo SlidesTypes of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo Slides
Celine George
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
Dashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo SlidesDashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo Slides
Celine George
 
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly WorkshopsLDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDM & Mia eStudios
 
Multicultural approach in education - B.Ed
Multicultural approach in education - B.EdMulticultural approach in education - B.Ed
Multicultural approach in education - B.Ed
prathimagowda443
 
Introduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdfIntroduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdf
CME4Life
 
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar SirPHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
Diwakar Kashyap
 
How to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo SlidesHow to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo Slides
Celine George
 
Uterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managmentUterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managment
Ritu480198
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptxQUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
Sourav Kr Podder
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 WebsiteHow to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 Website
Celine George
 
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdfTechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup
 
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo SlidesHow to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
Celine George
 
Types of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo SlidesTypes of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo Slides
Celine George
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
Dashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo SlidesDashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo Slides
Celine George
 
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly WorkshopsLDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDM & Mia eStudios
 
Multicultural approach in education - B.Ed
Multicultural approach in education - B.EdMulticultural approach in education - B.Ed
Multicultural approach in education - B.Ed
prathimagowda443
 
Introduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdfIntroduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdf
CME4Life
 
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar SirPHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
Diwakar Kashyap
 
How to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo SlidesHow to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo Slides
Celine George
 
Uterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managmentUterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managment
Ritu480198
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptxQUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
Sourav Kr Podder
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 WebsiteHow to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 Website
Celine George
 
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdfTechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup
 
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo SlidesHow to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
Celine George
 

Scalability using Node.js

  • 1. Enhancing scalability using Node.js Team 15 - Enlighten Ratan Kadam - [email protected] Monil Shah - [email protected] Akshay Jarandikar - [email protected] Swapnil Joshi - [email protected]
  • 2. Scalability  WhyWhat is scalability?  do we need scalability?  Current industry solutions - • Horizontal Scaling • Vertical Scaling • Multi-threading • Cloud Computing
  • 3. Horizontal vs Vertical Scaling Horizontal Scaling Adds extra identical boxes to server. Issues: • Requires Load balancer for managing connection. • Distribution of work within the units becomes overhead. • Additional investment. Vertical Scaling Increases the power of existing system by adding more powerful hardware. Issues: • Additional Investment • Single point of failure (SPOF)
  • 4. Multi-threading & Cloud Computing Multi-threading Issues: -High chances of deadlock if application is not designed properly. -Web-servers need to handle thousands of HTTP requests. This may cause many threads to wait for network operations. -For thousands of simultaneous requests, spawning threads for all processes would not achieve the desired scalability. Cloud Computing Issues: -Application architecture may or may not be suited for Cloud Computing -Application and Data Security in the Cloud -Lack of skilled resources; external training is required -If application is not designed properly for cloud platform; difficult to yield benefits -Again, substantial additional investment
  • 5. So the challenge…  The challenge is to scale the web application without major re-engineering and buying new hardware while keeping its architecture simple and easy to manage.
  • 6. Solution Important Features: Asynchronous in nature Event driven Non-blocking I/O
  • 7. Proposed Architecture Proxy Middleware, Entry point for real world access, Security, Caching Nginx Server Serves static content, Caching Load Balancer  connects multithreaded node.js instances and handles load distribution V8 JavaScript engine  handles compilation and execution of JavaScript Event loop  Handles events in program during execution of asynchronous operations.
  • 9. Server Pool Routing request based on content type
  • 10. Nginx server Nginx server stores static data in hierarchical cache. Thus reduces the latency. Also supports compression format to reduce response size.
  • 11. Node.js Workflow 3 core execution models: 1.Asynchronous request processing 2.Event driven programming 3.Non-blocking I/O
  • 12.  When request is made to server, instead of waiting for the request to complete, server continues to process other requests.  When request processing completes, the response is sent to caller using callback mechanism.  Event listener listens to the events and determines the flow of program.  There is an event loop that listens to events and then triggers callback functions.
  • 13. Non-blocking I/O  Non-blocking I/O supports the execution of system to be continued without waiting for I/O operations to complete.  This enables the architecture to have asynchronous request processing.
  • 14. Event loop Event loop is a programming construct that waits for and dispatches events in a program once their asynchronous operation completes.
  • 15. Node Load Balancer Working  Load balancer distributes the workload among available servers.  Load Balancer sends periodic heartbeat to check server status.  If one of the servers is down then the load balancer distributes the request queue among the available servers.
  • 16. V8 JavaScript Engine  When V8 receives script source code, it parses it to create abstract syntax tree.  Then this AST is fed into the byte code generator to produce byte code of the source.  V8 execution environment then interprets this byte code and with the help of JIT compiler it produces the native machine code that gets executed.  It uses techniques such as in-lining, elision of expensive runtime properties, and inline caching are used for optimization
  • 17. CASE STUDY PayPal & eBay with Node.Js Changes from development perspective - The development time was almost half that with fewer people. Number of files that were constructed reduced to 40%. The number of lines of code was reduced by 33%. Changes from performance perspective The number of requests per second is doubled compared to Java application.  The response time is decreased by 35% compared to Java application.
  • 19. Advantages 1. Asynchronous 2. Event driven programming 3. Multithreading 4. Scalability 5. High throughput 6. High Performance 7. Cost effective 8.Minimum Latency 9. Efficient Resource Consumption 10. Set of Standard Libraries
  • 20. Conclusion Scalability is next decade challenge for enterprise community as more than 7.1 billion people are using internet. Most of the vendors use solutions like Horizontal, vertical & single threaded node.js. However, these single threaded architectures may not be able to fix the next generation scalable issues. Solution to the problem is defined in our proposed architecture – multithreaded node.js where multiple node.js instances are bind to the fixed number of threads to boost the power of existing Node JS. So multithreaded node.js can be a cost effective, software based scalable solution for next decade challenges for Enterprise industries.
  • 21. References  Web application performance and scalability http://www.webforefront.com/performance/scaling101.html  Node.js at PayPal https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/  Nginx http://www.aosabook.org/en/nginx.html  Ebay’s first node.js application http://www.ebaytechblog.com/2013/05/17/how-we-built-ebays-first-node- js-application/#.VHLrNIvF9hw  Node.js architecture diagram http://blog.cloudfoundry.org/2012/06/27/future-proofing-your-apps-cloud- foundry-and-node-js/

Editor's Notes

  • #22: Web application performance and scalability http://www.webforefront.com/performance/scaling101.html Node.js at PayPal https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/ Nginx http://www.aosabook.org/en/nginx.html http://www.ebaytechblog.com/2013/05/17/how-we-built-ebays-first-node-js-application/#.VHLrNIvF9hw Node.js architecture diagram http://blog.cloudfoundry.org/2012/06/27/future-proofing-your-apps-cloud-foundry-and-node-js/