SlideShare a Scribd company logo
1 of 28
Scaling your Web
Application
Scaling your Web App
Topics to be covered :
1. What is Scaling ?
2. Why do we need to scale ?
3. How do we scale ?
- Scaling up Vs. Scaling out
4. What is Sharding ?
5. RDBMS vs NoSQL (Perspective : Scalibility)
Web is Data

Username

Birthday

Blog Post

Images

Vidoes
Desirable Properties of a Web App

Scalability

High Availability

Performance

Manageability

Low Cost

Feature Rich

Generates $$$ :D
What is Scaling ?

Scalability
It is the property of your system to handle
growing amount of work in a graceful manner
or to be readily enlarged as demand
increases.

Scaling and performance are different.
So What is Performance ?

Performance :
The amount of useful work accomplished by a
computer system compared to the time and
resources used.
Better Performance means more work
accomplished in shorter time and/or using less
resources
Ok. Now What ?

I have an application up and running on
servers and Its doing pretty well.
Why should I think about scaling it ?
Will it really require scaling ?
Why do I need scaling ?

Who knows your app might be the next FB or
Twitter...

How will you handle so many Users doing so many
things over network ??? It might go up to processing
millions of request / second. So,
Scale it !!!!!! :)
OK. Cool.
I really need to think about scaling my
application now.
Wait a minute !!!!!
How should I do it ??
How Should I Scale ??
Well there are a couple of ways to
scale your application
1. Scaling Up
2. Scaling Out
Scaling Up vs. Scaling Out

Scaling Up :
− More CPU, Bigger HD, More RAM, etc.
− Biggest , fastest single computer that exists is still
not as fastest as two of such computers together.
− i.e. Diminishing returns => Not a good solution
Nah!! Not Efficient !!!!
Scaling Up Vs. Scaling Out

Scaling Out :
− Add more nodes

Master / Slave architecture

Sharding
Master / Slave Architecture
Master / Slave Architecture

Pros :
− Increased READ speed
− Takes READ load off of master
− Allows us to join across all tables

Cons:
− Doesn't buy increased write throughput
− Single point failure
What is Sharding ?

Sharding is the method of splitting your database
across several servers (called a Cluster).

Each shard can consist of one or multiple machines.
No machine has all your data on it.

More machines =>
More RAM.CPU =>
More operations/sec =>
Improved Throughput.
Yeyyy !!!!
What is Sharding ?
Sharding

Pros :
− Increased READ and WRITE throughput
− No Single Point Failure

Individual features can fail But Whole system won't go
down at a time.

Cons :
− Can't join queries between shards
RDBMS vs NoSQL
(Perspective : Scalibility)
Scaling : RDBMS

RDBMS guarantee ACID operationsACID operations but when a
relational database grows out of one server, it is no
longer that easy to use. In other words, they don't scale
out very well in a distributed system.

The CAP theoremCAP theorem states that a distributed (i.e. scalable)
system cannot guarantee all of the following properties at
the same time:
Consistency Availability Partition tolerance

Most NoSQL Databases drop Consistency in favour of
availability. Thats why they are better scalable.
Why NoSQL Databases Scale &
RDBMS does not (?)

Data Sharding would require distinct data entities that can be
distributed and processed independently.

RDBMS can't do that because of its table based nature

NoSQL do not distribute a logical entity across multiple tables,
it’s always stored in one place.

NoSQL only enforce consistency inside a single entity and
sometimes not even that.
Example
Does it mean that my app gives a
better performance now ?

No It doesn't. Performance depends on how correctly you
implement (scalable solution) for your case.

Besides there are several factors affecting like
− Disk I/O
− Network
− Caching
So What Should I Choose ?
MySQL
OR
MongoDB
MySQL OR MongoDB
“The real thing to point out is that if you are
being held back from making something super
awesome because you can’t choose a
database, you are doing it wrong.
If you know mysql, just use it. Optimize when
you actually need to.
Use it like a k/v store, use it like a rdbms, but for
god sake, build your killer app! None of this
will matter to most apps.
Facebook still uses MySQL, a lot. Wikipedia
uses MySQL, a lot. FriendFeed uses MySQL,
MySQL OR MongoDB
“What am I going to build my next app on?
Probably Postgres.
Will I use NoSQL? Maybe. I might also use
Hadoop and Hive. I might keep everything in
flat files.
Maybe I’ll start hacking on Maglev. I’ll use
whatever is best for the job.
If I need reporting or ACIDIty, I won’t be using
any NoSQL.
If I need caching, I’ll probably use Tokyo Tyrant.
Conclusion of the Debate
If there’s anything to take away from the
RDBMS vs NoSQL debate,
it’s just to be happy there are more tools, because
more cool tools means more win win situation for
everyone.
Summary
We covered following topics :
1. What is Scaling ?
2. Why do we need to scale ?
3. How to do we scale ?
- Scaling up Vs. Scaling out
4. What is Sharding ?
5. RDBMS vs NoSQL (Perspective : Scalibility)
Thank You
&
Questions
------------------------------------------------
Ketan Deshmukh.

More Related Content

What's hot

NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS Ganesh Kondal
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkSVDevOps
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot IntroductionJeevesh Pandey
 
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advanceDaeMyung Kang
 
Web Application Performance
Web Application PerformanceWeb Application Performance
Web Application PerformanceCodeFireTech
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)Sujit Majety
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMongoDB
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.jsNodejsFoundation
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLJayant Surana
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentationThanh Tuong
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentationHyphen Call
 

What's hot (20)

NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java framework
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
Java seminar
Java seminarJava seminar
Java seminar
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
core java
core javacore java
core java
 
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advance
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Web Application Performance
Web Application PerformanceWeb Application Performance
Web Application Performance
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.js
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
 
Spring boot
Spring bootSpring boot
Spring boot
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
 

Viewers also liked

Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...
Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...
Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...Amazon Web Services
 
Scaling your web app with MySQL replication
Scaling your web app with MySQL replicationScaling your web app with MySQL replication
Scaling your web app with MySQL replicationGiuseppe Maxia
 
10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M users10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M usersAmazon Web Services
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with ApacheBradley Holt
 
(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best Practices(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best PracticesAmazon Web Services
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXNGINX, Inc.
 

Viewers also liked (7)

Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...
Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...
Scaling a Mobile Web App to 100 Million Clients and Beyond (MBL302) | AWS re:...
 
Scaling your web app with MySQL replication
Scaling your web app with MySQL replicationScaling your web app with MySQL replication
Scaling your web app with MySQL replication
 
10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M users10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M users
 
XenApp Load Balancing
XenApp Load BalancingXenApp Load Balancing
XenApp Load Balancing
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with Apache
 
(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best Practices(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best Practices
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINX
 

Similar to Scaling Your Web Application

Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesJon Meredith
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Archroyans
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Archguest18a0f1
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Archmclee
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabasesAdi Challa
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal PerformancesVladimir Ilic
 
Drupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp NorthDrupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp NorthPhilip Norton
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformancePantheon
 
Web scale architecture design
Web scale architecture designWeb scale architecture design
Web scale architecture designNepalAdz
 
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...Eric Sembrat
 
Stacktrace Berlin RC.2
Stacktrace Berlin RC.2Stacktrace Berlin RC.2
Stacktrace Berlin RC.2Oliver Seemann
 
MySQL HA Presentation
MySQL HA PresentationMySQL HA Presentation
MySQL HA Presentationpapablues
 
Klmug presentation - Simple Analytics with MongoDB
Klmug presentation - Simple Analytics with MongoDBKlmug presentation - Simple Analytics with MongoDB
Klmug presentation - Simple Analytics with MongoDBRoss Affandy
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingAshok Modi
 
http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151xlight
 
Azure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with Azure
Azure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with AzureAzure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with Azure
Azure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with AzureMarco Parenzan
 
Databases benoitg 2009-03-10
Databases benoitg 2009-03-10Databases benoitg 2009-03-10
Databases benoitg 2009-03-10benoitg
 
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?Clustrix
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with BlackfireMarko Mitranić
 

Similar to Scaling Your Web Application (20)

Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabases
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
Drupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp NorthDrupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp North
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress Performance
 
Web scale architecture design
Web scale architecture designWeb scale architecture design
Web scale architecture design
 
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...
 
Stacktrace Berlin RC.2
Stacktrace Berlin RC.2Stacktrace Berlin RC.2
Stacktrace Berlin RC.2
 
MySQL HA Presentation
MySQL HA PresentationMySQL HA Presentation
MySQL HA Presentation
 
Klmug presentation - Simple Analytics with MongoDB
Klmug presentation - Simple Analytics with MongoDBKlmug presentation - Simple Analytics with MongoDB
Klmug presentation - Simple Analytics with MongoDB
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151
 
Azure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with Azure
Azure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with AzureAzure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with Azure
Azure Weekly - 2015.01.20 - Marco Parenzan - Data Opportunities with Azure
 
Databases benoitg 2009-03-10
Databases benoitg 2009-03-10Databases benoitg 2009-03-10
Databases benoitg 2009-03-10
 
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
 
Big data
Big dataBig data
Big data
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Scaling Your Web Application

  • 2. Scaling your Web App Topics to be covered : 1. What is Scaling ? 2. Why do we need to scale ? 3. How do we scale ? - Scaling up Vs. Scaling out 4. What is Sharding ? 5. RDBMS vs NoSQL (Perspective : Scalibility)
  • 4. Desirable Properties of a Web App  Scalability  High Availability  Performance  Manageability  Low Cost  Feature Rich  Generates $$$ :D
  • 5. What is Scaling ?  Scalability It is the property of your system to handle growing amount of work in a graceful manner or to be readily enlarged as demand increases.  Scaling and performance are different.
  • 6. So What is Performance ?  Performance : The amount of useful work accomplished by a computer system compared to the time and resources used. Better Performance means more work accomplished in shorter time and/or using less resources
  • 7. Ok. Now What ?  I have an application up and running on servers and Its doing pretty well. Why should I think about scaling it ? Will it really require scaling ?
  • 8. Why do I need scaling ?  Who knows your app might be the next FB or Twitter...  How will you handle so many Users doing so many things over network ??? It might go up to processing millions of request / second. So, Scale it !!!!!! :)
  • 9. OK. Cool. I really need to think about scaling my application now. Wait a minute !!!!! How should I do it ?? How Should I Scale ??
  • 10. Well there are a couple of ways to scale your application 1. Scaling Up 2. Scaling Out
  • 11. Scaling Up vs. Scaling Out  Scaling Up : − More CPU, Bigger HD, More RAM, etc. − Biggest , fastest single computer that exists is still not as fastest as two of such computers together. − i.e. Diminishing returns => Not a good solution Nah!! Not Efficient !!!!
  • 12. Scaling Up Vs. Scaling Out  Scaling Out : − Add more nodes  Master / Slave architecture  Sharding
  • 13. Master / Slave Architecture
  • 14. Master / Slave Architecture  Pros : − Increased READ speed − Takes READ load off of master − Allows us to join across all tables  Cons: − Doesn't buy increased write throughput − Single point failure
  • 15. What is Sharding ?  Sharding is the method of splitting your database across several servers (called a Cluster).  Each shard can consist of one or multiple machines. No machine has all your data on it.  More machines => More RAM.CPU => More operations/sec => Improved Throughput. Yeyyy !!!!
  • 17. Sharding  Pros : − Increased READ and WRITE throughput − No Single Point Failure  Individual features can fail But Whole system won't go down at a time.  Cons : − Can't join queries between shards
  • 18. RDBMS vs NoSQL (Perspective : Scalibility)
  • 19. Scaling : RDBMS  RDBMS guarantee ACID operationsACID operations but when a relational database grows out of one server, it is no longer that easy to use. In other words, they don't scale out very well in a distributed system.  The CAP theoremCAP theorem states that a distributed (i.e. scalable) system cannot guarantee all of the following properties at the same time: Consistency Availability Partition tolerance  Most NoSQL Databases drop Consistency in favour of availability. Thats why they are better scalable.
  • 20. Why NoSQL Databases Scale & RDBMS does not (?)  Data Sharding would require distinct data entities that can be distributed and processed independently.  RDBMS can't do that because of its table based nature  NoSQL do not distribute a logical entity across multiple tables, it’s always stored in one place.  NoSQL only enforce consistency inside a single entity and sometimes not even that.
  • 22. Does it mean that my app gives a better performance now ?  No It doesn't. Performance depends on how correctly you implement (scalable solution) for your case.  Besides there are several factors affecting like − Disk I/O − Network − Caching
  • 23. So What Should I Choose ? MySQL OR MongoDB
  • 24. MySQL OR MongoDB “The real thing to point out is that if you are being held back from making something super awesome because you can’t choose a database, you are doing it wrong. If you know mysql, just use it. Optimize when you actually need to. Use it like a k/v store, use it like a rdbms, but for god sake, build your killer app! None of this will matter to most apps. Facebook still uses MySQL, a lot. Wikipedia uses MySQL, a lot. FriendFeed uses MySQL,
  • 25. MySQL OR MongoDB “What am I going to build my next app on? Probably Postgres. Will I use NoSQL? Maybe. I might also use Hadoop and Hive. I might keep everything in flat files. Maybe I’ll start hacking on Maglev. I’ll use whatever is best for the job. If I need reporting or ACIDIty, I won’t be using any NoSQL. If I need caching, I’ll probably use Tokyo Tyrant.
  • 26. Conclusion of the Debate If there’s anything to take away from the RDBMS vs NoSQL debate, it’s just to be happy there are more tools, because more cool tools means more win win situation for everyone.
  • 27. Summary We covered following topics : 1. What is Scaling ? 2. Why do we need to scale ? 3. How to do we scale ? - Scaling up Vs. Scaling out 4. What is Sharding ? 5. RDBMS vs NoSQL (Perspective : Scalibility)