SlideShare une entreprise Scribd logo
1  sur  12
Scale up
Pedro Machado – Soft. Developer
pedro.machado@imobilemagic.com
How To Scale
• Vertical Scaling (Scale Up)
• Upgrade the server hardware
• Throw in more RAM, faster disk(s), CPU, etc
• Horizontal Scaling (Scale Out)
• Spin up another server instance
Vertical Scaling
• Advantages
• No code changes required
• Easy and fast to do – AWS
• No need to manage multiple machines
• Disadvantages
• Expensive
• Single point of failure
• Vendor lock-in
Horizontal Scaling
• Advantages
• Continuous availability/redundancy
• Continuous upgrades, with no downtime
• Better perfomance
• Disadvantages
• May required code/architectural changes
• Manage multiple machines
• Developing distributed systems can be complex
Before Scaling
• Cache, cache and cache!
• AWS – ElastiCache, Memcached, Redis
• Avoid unnecessary queries
• Tune your server / application
• Use indexes, wisely
• EXPLAIN SELECT * FROM Table WHERE name = ‘John’;
• Find and fix your bottlenecks
Database Scaling
• Sharding :
• Distribute table rows onto different servers
• Example: Customer table -> US customers are on ServerUS, EU customers on
ServerEU
• Partitioning
• Master-slave
• Inserts and Updates go to the master, reads go to the slave
• The single Master server is a limitation to scalability. Can quickly create a
bottleneck.
• Near real time – if master dies data may be lost.
Server Scaling – Microservices
Server Scaling – Microservices
• The pros
• A service should only do one thing and do it well
• A service is fully independent - self contained
• Has it’s own database type and tech stack (language agnostic)
• Fast deploys, tiny EAR = super fast deploy
• Loosely coupled - communicate asynchronously via messages/events,
queues or REST (sync)
• Self monitoring, e.g. Circuit Breaker, Bulkhead
• Greater resiliency – fault isolation
• Independent dev teams
Server Scaling – Microservices
• The cons
• Service discovery
• Distributed services are complex to deal with
• Fan out of requests
• 1 request in a monolithic application can be equal to multiple requests in a
microservices architecture
• Serialization overhead
• Latency
General Tips
• Monitor your server resources
• Set and configure alarms
• Elastic scaling
• Use AWS auto-scaling feature in conjunction with CloudWatch
• When X metric is above the limit-> spin up another instance
• When X metric is back to normal values -> kill an instance to save up costs
• https://www.youtube.com/watch?v=7SfVZqOVcCI
iMobileMagic Teck Talk Scale Up

Contenu connexe

Tendances

Best wordpress hosting
Best wordpress hosting Best wordpress hosting
Best wordpress hosting ken1990julius
 
SQL Server Database as a Cloud Service
SQL Server Database as a Cloud ServiceSQL Server Database as a Cloud Service
SQL Server Database as a Cloud ServicePio Balistoy
 
Visibility With Veeam One
Visibility With Veeam OneVisibility With Veeam One
Visibility With Veeam OneLai Yoong Seng
 
#DFWVMUG - Automating the Next Generation Datacenter
#DFWVMUG - Automating the Next Generation Datacenter#DFWVMUG - Automating the Next Generation Datacenter
#DFWVMUG - Automating the Next Generation DatacenterJosh Atwell
 
A Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability GroupsA Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability GroupsPio Balistoy
 
Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.
Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.
Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.OpenVZ
 
Application Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a ServiceApplication Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a ServiceWSO2
 
Managing the Infrastructure Stack with PowerShell
Managing the Infrastructure Stack with PowerShellManaging the Infrastructure Stack with PowerShell
Managing the Infrastructure Stack with PowerShellJosh Atwell
 
Simple cloud computing for office workers
Simple cloud computing for office workersSimple cloud computing for office workers
Simple cloud computing for office workersChris Sparshott
 
SharePoint on Imaginary Hardware - IndyTechFest 2010
SharePoint on Imaginary Hardware - IndyTechFest 2010SharePoint on Imaginary Hardware - IndyTechFest 2010
SharePoint on Imaginary Hardware - IndyTechFest 2010John Ferringer
 
Do you know where your server is?
Do you know where your server is?Do you know where your server is?
Do you know where your server is?SKALI Group
 
Automating the Next Generation Datacenter
Automating the Next Generation DatacenterAutomating the Next Generation Datacenter
Automating the Next Generation DatacenterJosh Atwell
 
Architecture Of Large Scale Websites
Architecture Of Large Scale WebsitesArchitecture Of Large Scale Websites
Architecture Of Large Scale WebsitesFeng Yu
 
Optimize MySQL performance for developers
Optimize MySQL performance for developersOptimize MySQL performance for developers
Optimize MySQL performance for developersjackbillow
 
Virtual san pricing and packaging deck
Virtual san pricing and packaging deckVirtual san pricing and packaging deck
Virtual san pricing and packaging decksolarisyougood
 
Meta cloud architecture for the mobile agile enterprise
Meta cloud architecture for the mobile agile enterpriseMeta cloud architecture for the mobile agile enterprise
Meta cloud architecture for the mobile agile enterpriseEvarist Lobo
 
Store
StoreStore
StoreESUG
 
REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)Ameya Vijay Gokhale
 

Tendances (20)

Best wordpress hosting
Best wordpress hosting Best wordpress hosting
Best wordpress hosting
 
SQL Server Database as a Cloud Service
SQL Server Database as a Cloud ServiceSQL Server Database as a Cloud Service
SQL Server Database as a Cloud Service
 
Visibility With Veeam One
Visibility With Veeam OneVisibility With Veeam One
Visibility With Veeam One
 
#DFWVMUG - Automating the Next Generation Datacenter
#DFWVMUG - Automating the Next Generation Datacenter#DFWVMUG - Automating the Next Generation Datacenter
#DFWVMUG - Automating the Next Generation Datacenter
 
A Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability GroupsA Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability Groups
 
Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.
Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.
Profit from the cloud TM Parallels Dynamic Infrastructure And OpenStack.
 
Application Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a ServiceApplication Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a Service
 
Managing the Infrastructure Stack with PowerShell
Managing the Infrastructure Stack with PowerShellManaging the Infrastructure Stack with PowerShell
Managing the Infrastructure Stack with PowerShell
 
Simple cloud computing for office workers
Simple cloud computing for office workersSimple cloud computing for office workers
Simple cloud computing for office workers
 
SharePoint on Imaginary Hardware - IndyTechFest 2010
SharePoint on Imaginary Hardware - IndyTechFest 2010SharePoint on Imaginary Hardware - IndyTechFest 2010
SharePoint on Imaginary Hardware - IndyTechFest 2010
 
Do you know where your server is?
Do you know where your server is?Do you know where your server is?
Do you know where your server is?
 
Automating the Next Generation Datacenter
Automating the Next Generation DatacenterAutomating the Next Generation Datacenter
Automating the Next Generation Datacenter
 
Architecture Of Large Scale Websites
Architecture Of Large Scale WebsitesArchitecture Of Large Scale Websites
Architecture Of Large Scale Websites
 
Optimize MySQL performance for developers
Optimize MySQL performance for developersOptimize MySQL performance for developers
Optimize MySQL performance for developers
 
Virtual san pricing and packaging deck
Virtual san pricing and packaging deckVirtual san pricing and packaging deck
Virtual san pricing and packaging deck
 
Meta cloud architecture for the mobile agile enterprise
Meta cloud architecture for the mobile agile enterpriseMeta cloud architecture for the mobile agile enterprise
Meta cloud architecture for the mobile agile enterprise
 
Store
StoreStore
Store
 
Scalable web architecture
Scalable web architectureScalable web architecture
Scalable web architecture
 
Migrating EnterpriseOne to WebLogic Server
Migrating EnterpriseOne to WebLogic ServerMigrating EnterpriseOne to WebLogic Server
Migrating EnterpriseOne to WebLogic Server
 
REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)
 

Similaire à iMobileMagic Teck Talk Scale Up

The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenParticular Software
 
Building a highly scalable and available cloud application
Building a highly scalable and available cloud applicationBuilding a highly scalable and available cloud application
Building a highly scalable and available cloud applicationNoam Sheffer
 
Virtualization intro to freshers
Virtualization intro to freshersVirtualization intro to freshers
Virtualization intro to freshersShravani Mondrety
 
The move-to-hybrid-cloud-itsmf-april2015
The move-to-hybrid-cloud-itsmf-april2015The move-to-hybrid-cloud-itsmf-april2015
The move-to-hybrid-cloud-itsmf-april2015Eduserv
 
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service FabricTokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service FabricTokyo Azure Meetup
 
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Andrew Miller
 
Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)Govind Kanshi
 
Mtc learnings from isv & enterprise interaction
Mtc learnings from isv & enterprise  interactionMtc learnings from isv & enterprise  interaction
Mtc learnings from isv & enterprise interactionGovind Kanshi
 
Building Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureBuilding Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureFisnik Doko
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowAndrew Miller
 
Server its functions and types.pptx
Server its functions and types.pptxServer its functions and types.pptx
Server its functions and types.pptxDrIrfanulHaqAkhoon
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that growGibraltar Software
 
Architecting for the cloud scability-availability
Architecting for the cloud scability-availabilityArchitecting for the cloud scability-availability
Architecting for the cloud scability-availabilityLen Bass
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithMarkus Eisele
 
Transforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesTransforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesAdam Takvam
 
Moving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed InstanceMoving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed InstanceThomas Sykes
 
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Marina Peregud
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...Amazon Web Services
 

Similaire à iMobileMagic Teck Talk Scale Up (20)

The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves Goeleven
 
Building a highly scalable and available cloud application
Building a highly scalable and available cloud applicationBuilding a highly scalable and available cloud application
Building a highly scalable and available cloud application
 
Virtualization intro to freshers
Virtualization intro to freshersVirtualization intro to freshers
Virtualization intro to freshers
 
The move-to-hybrid-cloud-itsmf-april2015
The move-to-hybrid-cloud-itsmf-april2015The move-to-hybrid-cloud-itsmf-april2015
The move-to-hybrid-cloud-itsmf-april2015
 
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service FabricTokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
 
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
 
Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)
 
Mtc learnings from isv & enterprise interaction
Mtc learnings from isv & enterprise  interactionMtc learnings from isv & enterprise  interaction
Mtc learnings from isv & enterprise interaction
 
Building Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureBuilding Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft Azure
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - Varrow
 
25 snowflake
25 snowflake25 snowflake
25 snowflake
 
Server its functions and types.pptx
Server its functions and types.pptxServer its functions and types.pptx
Server its functions and types.pptx
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that grow
 
Architecting for the cloud scability-availability
Architecting for the cloud scability-availabilityArchitecting for the cloud scability-availability
Architecting for the cloud scability-availability
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
Transforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesTransforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web Services
 
Moving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed InstanceMoving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed Instance
 
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
 

iMobileMagic Teck Talk Scale Up

  • 1.
  • 2. Scale up Pedro Machado – Soft. Developer pedro.machado@imobilemagic.com
  • 3. How To Scale • Vertical Scaling (Scale Up) • Upgrade the server hardware • Throw in more RAM, faster disk(s), CPU, etc • Horizontal Scaling (Scale Out) • Spin up another server instance
  • 4. Vertical Scaling • Advantages • No code changes required • Easy and fast to do – AWS • No need to manage multiple machines • Disadvantages • Expensive • Single point of failure • Vendor lock-in
  • 5. Horizontal Scaling • Advantages • Continuous availability/redundancy • Continuous upgrades, with no downtime • Better perfomance • Disadvantages • May required code/architectural changes • Manage multiple machines • Developing distributed systems can be complex
  • 6. Before Scaling • Cache, cache and cache! • AWS – ElastiCache, Memcached, Redis • Avoid unnecessary queries • Tune your server / application • Use indexes, wisely • EXPLAIN SELECT * FROM Table WHERE name = ‘John’; • Find and fix your bottlenecks
  • 7. Database Scaling • Sharding : • Distribute table rows onto different servers • Example: Customer table -> US customers are on ServerUS, EU customers on ServerEU • Partitioning • Master-slave • Inserts and Updates go to the master, reads go to the slave • The single Master server is a limitation to scalability. Can quickly create a bottleneck. • Near real time – if master dies data may be lost.
  • 8. Server Scaling – Microservices
  • 9. Server Scaling – Microservices • The pros • A service should only do one thing and do it well • A service is fully independent - self contained • Has it’s own database type and tech stack (language agnostic) • Fast deploys, tiny EAR = super fast deploy • Loosely coupled - communicate asynchronously via messages/events, queues or REST (sync) • Self monitoring, e.g. Circuit Breaker, Bulkhead • Greater resiliency – fault isolation • Independent dev teams
  • 10. Server Scaling – Microservices • The cons • Service discovery • Distributed services are complex to deal with • Fan out of requests • 1 request in a monolithic application can be equal to multiple requests in a microservices architecture • Serialization overhead • Latency
  • 11. General Tips • Monitor your server resources • Set and configure alarms • Elastic scaling • Use AWS auto-scaling feature in conjunction with CloudWatch • When X metric is above the limit-> spin up another instance • When X metric is back to normal values -> kill an instance to save up costs • https://www.youtube.com/watch?v=7SfVZqOVcCI