Upload
naomi-george
View
218
Download
2
Embed Size (px)
Citation preview
Special Thanks To…
Rokk3r Labs
Charles Irizarry & Charles Walter
www.rokk3rlabs.co
Short bio about me… Andrew Simkovsky 15 years working with database technology
Oracle, MySQL/MariaDB, SQL Server, Postgres
Redis, MongoDB, CouchDB, Cassandra, Neo4j Worked across many industries
Consulting, Retail, Telecommunications, Energy
Data, Marketing, Gaming, Health Care
Scaling: What’s it really about?
User access to business logic and data Either reading or writing, or both
Non-user access to business logic and data Background data processing
Scaling is making sure that this happens without flaw at all sizes and access
volumes!
Cost Thresholds
Micro – light processing, simple activities, handful of users
Small – tens of users
Medium – hundreds of users
Large – thousands of users
Huge – heavy processing, diverse activities, lots of users
Scaling Needs for Different Layers
Network Request volume Traffic isolation Geographical
Data storage Possibly separate reads & writes Separate bulk access vs individual Complex data vs simple data Static data vs changing data Different types of database engines based on type of
access
Scaling Needs for Different Layers
Application / functional logic Separating application by functionality to create
services Each service can scale independently Groups of simple services can create highly
customized applications
Presentation to user Web servers server only rendered pages Leave logic to the application Exception: real-time, user-facing functionality only
needed by a single user within a session
Scaling Strategy
IdealEnvironment that simply evolves from one threshold
to the next with minimal intervention or impact
Next BestEnvironment that evolves from one threshold to the next with some impact, but is planned & controlled
NOT idealHit limitations unexpectedly, causing outages, downtime, performance impact, and you are
scrambling to fix it
Infrastructure as a Service
Amazon Web Services
Google Cloud
Microsoft Azure
Rackspace
OpenShift
Do It Yourself
IaaS Management Frameworks
Management Frameworks
Infrastructure as as Service
Platform as a Service
Software as a Service
Platform Service Providers
AWS Elastic Beanstalk
Google App Engine
Heroku
Cloud Foundry (Pivotal CF)
OutSystems
WaveMaker
Many others….
IaaS Management Frameworks
Infrastructure as as Service
Platform as a Service
Software as a Service
Management Frameworks
PaaS
P
rovid
ers
PaaS Pros & Cons
PROS:
Get started quickly
Very low initial cost
Little or no infrastructure knowledge needed
Performance metrics readily available
Can moderately scale easily
Cons:
Lots of providers, difficult to choose
Some will not support all technologies
Little control over individual components
Switching from PaaS to self-managed can be tough
Example App – Greeting Card Maker
Create, send, and receive custom greeting cards
Both web & mobile app front ends
Custom cards creator gadget
Manage contact lists & event calendar
Reminders of events
Notification of cards received & opened
Send “Thank You” responses
Online payments
Internal Needs
Store & manage data User profiles
Contact lists
Personal event calendars
Storage for clip art, animations, other media
Interface to create greeting cards Browser
Mobile app
Mechanism to render the final card as an animation
Mechanism to send notifications
Online payments
Application to handle all the logic
Micro Option 1 (traditional)
All data(user +
multimedia)
Application
Browser
Notifications
Desktop or mobile
All on single web
server
$3 - $40 / monthNo scalingHandful of users
Micro Option 2: PaaS (Heroku)
Application
Browser
Notifications
Desktop or mobile
Heroku Container
User Data Multimedia
Caching
$0 - $40 / month + add-onsInitial scalingHandful to hundreds of users
Micro Option 3: PaaS (Elastic Beanstalk)
Application(EC2)
Browser
Notifications(SNS)
Desktop or mobile
Elastic BeanstalkContainer
User Data(RDS)
Multimedia
(S3)
CloudFront
$0-40 / month+Initial scaling+Handful to hundreds of users
Scaling Note…
Micro Options 2 & 3 already enable you to
scale from Micro to Small, and maybe to
Medium!!
Moving On To Medium
Remember: Looking to minimize pain of crossing cost threshold
Let’s follow AWS path
Need thousands of users eventually
Need to ensure uptime
We get spikes of user activity
Holidays are especially tough!
Medium Option: AWS
Application
(EC2)
Browser
Notifications(SNS)
Desktop or mobile
User Data(RDS)
Multimedia
(S3)
CloudFront
$250 / month+Hundreds of users+
EC2 c3.large x2 =$150RDS t2.med x1 = $49ELB = $18SNS = $10Transcoding = $10 Applicati
on(EC2)
User Data(RDS)
AZ1 AZ2
ELASTIC LOAD BALANCER
AWS Pricing Calculator
https://calculator.s3.amazonaws.com/index.html
Large Option: AWS
AZ1 AZ2
AZ3 AZ4
DB DB
DB DB
Application
(EC2)
CACHE
HAProxyApplicati
on(EC2)
CACHE
HAProxy
Application
(EC2)
CACHE
HAProxyApplicati
on(EC2)
CACHE
HAProxy
ROUTE53
Web Server
Web Server
Web Server
Web Server
Further Scaling
Remember: Looking to minimize pain of crossing cost threshold
Get into the details per bottleneck
Inflate out: separation / specialization of functionality
Automation, automation, automation
Infrastructure components are cattle, not pets
Seek out new technology & tools
Thank You For Coming!
Please rate this Meet Up:www.meetup.com/data-masters
(or go there to join!)
Check out my blog and forums:www.dbtekpro.com