Y!7 Simple Scalability
-
Upload
steveathon -
Category
Documents
-
view
401 -
download
0
Transcript of Y!7 Simple Scalability
![Page 1: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/1.jpg)
Simple Scalability
On the cheap.
![Page 2: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/2.jpg)
Who am I?
Architect at Yahoo
Policy Advisor
Lamp Developer
Welfare Advocate
![Page 3: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/3.jpg)
The Basics
scale vs ha
horizontal vs vertical
write vs read
storage
serving
database
![Page 4: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/4.jpg)
Scale vs HA
Scale is NOT– Redundant– Performance*– Durable
HA is NOT– Distributed– Performance– Easy
http://www.studiosysadmins.com/gallery/detail/31/
![Page 5: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/5.jpg)
Horizontal vs Vertical
Vertical– Throw money at the problem– Disk, CPU, Ram.– Generally, good start.
Horizontal– Throw smarts at the problem– Strategic endpoints– Smarter applications
![Page 6: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/6.jpg)
Scale, how?
Distribute the storage– Shared Disk, NFS, Etc.
Distribute the db– Cluster, read nodes, etc.
Distribute the application– End points, read points, write points
![Page 7: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/7.jpg)
Write vs Read
Separate application logic
DB Abstraction is a good place to start– Run compare against query to detect method and select db profile for action
Disk write points– Pick a master server (simple) and sync out from there
![Page 8: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/8.jpg)
Basic Site
User access website
Website uses DB
Website stored on Disk
Some static content on Disk
Website
Dynamic ContentStatic Content
![Page 9: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/9.jpg)
Typical Scenario
Read Mostly
Write Rarely (Database)
Uploads (Storage)
More DB Content than static
Some static content (images, CSS, etc)
Dynamic ContentStatic Content
![Page 10: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/10.jpg)
Storage
Use a central location
Same Rack/Location– NFS, iSCSI, other solutions
Low write, mostly read– Scheduled syndication– Master location
Globally positioned– CDN for statics, API for write, DB read
Manage detection, syndication, failure
![Page 11: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/11.jpg)
Serving
Syndicating Application Files– Bit Torrent– RSync– CVS/SVN (Versioning in general)– Complex scripts
Managing users– Sessions!
Authority, Security
Shared nothing (SNA)
![Page 12: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/12.jpg)
Database
Cluster– Good, Bad, Indifferent?
Read Nodes vs Write Nodes
Amazon RDB
Multi Master, Master Master, Master Slave
Don’t touch HA
![Page 13: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/13.jpg)
Accessing Scaled Data
API
Read, Write Points
Data Exchange
Databases
![Page 14: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/14.jpg)
Managing Scaled Data
Versioning
Failures
Syndication of ‘stuff’
Authority– Master servers are always great
http://hackedgadgets.com/2006/02/04/server-farm/
![Page 15: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/15.jpg)
Geo DNS
Like DNS Load Balancing
Geared to IP pools, vs actual geography
Newish, not overly supported
Great for distributing traffic to multiple LB or etc.
Australian Host USA Host
AU US
![Page 16: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/16.jpg)
Geo DNS
Tag as many countries to specific services as you like
Allow for ungrouped countries to go somewhere different
Full CName, A, AAAA support
Australian Host USA Host
USEU
SG
CANZAU
![Page 17: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/17.jpg)
Scale on a Budget
Amazon Web Services– S3, EC2, VPC, RDS, SNS
Zerigo – Cloud DNS, Geo DNS, VPS
Mammoth – VPS
![Page 18: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/18.jpg)
Questions
![Page 19: Y!7 Simple Scalability](https://reader036.fdocuments.in/reader036/viewer/2022062420/55ccc868bb61eb57338b4611/html5/thumbnails/19.jpg)
Ask me later
@steveathon
http://fwdpass.it/bN4qeh