Top Banner
Simple Scalability On the cheap.
19
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Y!7 Simple Scalability

Simple Scalability

On the cheap.

Page 2: Y!7 Simple Scalability

Who am I?

Architect at Yahoo

Policy Advisor

Lamp Developer

Welfare Advocate

Page 3: Y!7 Simple Scalability

The Basics

scale vs ha

horizontal vs vertical

write vs read

storage

serving

database

Page 4: Y!7 Simple Scalability

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

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

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

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

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

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

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

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

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

Accessing Scaled Data

API

Read, Write Points

Data Exchange

Databases

Page 14: Y!7 Simple Scalability

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

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

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

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

Questions

Page 19: Y!7 Simple Scalability

Ask me later

@steveathon

http://fwdpass.it/bN4qeh