Startup Scalability Strategies Frank Mashraqi
Hello!
Agenda <ul><li>Keeping score:  What to measure? </li></ul><ul><li>Discerning the difference:  What to focus on? </li></ul>...
Keeping Score: What to Measure? client response time memory utilization throughput cache utilization reads per second thre...
<ul><li>Performance != </li></ul><ul><li>High Availability != </li></ul><ul><li>Scalability </li></ul>
<ul><li>Performance </li></ul>Ability to process or execute a task compared to time and resources used
<ul><li>High Availability </li></ul>Ability of a system to ensure a certain degree of operational continuity flickr.com/ph...
<ul><li>Scalability </li></ul>Ability to handle growing amounts of traffic in a graceful manner or ability to be readily e...
Pick any two!! <ul><li>C onsistency </li></ul><ul><li>A vailability </li></ul><ul><li>P artition-Tolerance </li></ul><ul><...
Vertical or Horizontal? <ul><li>Vertical </li></ul><ul><li>Aka Scaling up </li></ul><ul><li>Adding resources to a node </l...
How to Partition? <ul><li>Functional Partitioning </li></ul><ul><li>Key based partitioning </li></ul><ul><ul><li>(users en...
How to balance? <ul><li>Balance is easier if the foundation is right </li></ul><ul><li>Use agile methodologies </li></ul><...
Before and After <ul><li>What to do before you get big? </li></ul><ul><ul><li>Lay the right foundation </li></ul></ul><ul>...
What skills / hires are most crucial to dealing with scalability?
Best Practices <ul><li>Go Asynchronous </li></ul><ul><li>Go Stateless </li></ul><ul><li>“ Best IO is No IO” </li></ul><ul>...
How to blow up?
Can scalability be outsourced?  aka Can Cloud fix Twitter? <ul><li>Amazon </li></ul><ul><li>Google AppEngine </li></ul><ul...
Things to take away <ul><li>Focus on scalability, the rest will follow </li></ul><ul><li>Horizontal is better, Vertical is...
Appendix <ul><li>Notes/Tips:  http://mashraqi.com/2008/09/startonomics-startup-scalability.html   </li></ul><ul><li>Person...
Upcoming SlideShare
Loading in...5
×

Scalability for Startups (Frank Mashraqi, Startonomics SF 2008)

2,806

Published on

Presentation by Frank Mashraqi on how to plan (but not overengineer) scalability for startups.

Published in: Technology
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,806
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
129
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide
  • Scalability for Startups (Frank Mashraqi, Startonomics SF 2008)

    1. 1. Startup Scalability Strategies Frank Mashraqi
    2. 2. Hello!
    3. 3. Agenda <ul><li>Keeping score: What to measure? </li></ul><ul><li>Discerning the difference: What to focus on? </li></ul><ul><li>Finding your path: Which way to go? </li></ul><ul><li>Choosing your architecture: How to partition? </li></ul><ul><li>Walking the line: How to balance? </li></ul><ul><li>Building your team: Who to hire? </li></ul><ul><li>Thinking ahead: What about the future? </li></ul><ul><li>Offloading scalability: Is it for me? </li></ul>
    4. 4. Keeping Score: What to Measure? client response time memory utilization throughput cache utilization reads per second thread thrashing disk utilization disk response time failure rates resource utilization IO wait swap utilization <ul><ul><li>cache prunes </li></ul></ul>threshold exceptions exceeding high or low water marks <ul><ul><li>cache hit ratio </li></ul></ul>writes per second threads created transactions per second connections usage distribution of data disk saturation locking statistics growth rate queries per shard threads running CPU Saturation memory/ IO contention connections per shard
    5. 5. <ul><li>Performance != </li></ul><ul><li>High Availability != </li></ul><ul><li>Scalability </li></ul>
    6. 6. <ul><li>Performance </li></ul>Ability to process or execute a task compared to time and resources used
    7. 7. <ul><li>High Availability </li></ul>Ability of a system to ensure a certain degree of operational continuity flickr.com/photos/mag3737
    8. 8. <ul><li>Scalability </li></ul>Ability to handle growing amounts of traffic in a graceful manner or ability to be readily enlarged : freefoto.ca/key/viewpoint?g2_itemId=7348
    9. 9. Pick any two!! <ul><li>C onsistency </li></ul><ul><li>A vailability </li></ul><ul><li>P artition-Tolerance </li></ul><ul><ul><li>Choose if you don’t care about 24/7 availability or accommodating high traffic. </li></ul></ul><ul><ul><li>Choose for a site that must be available 24/7 </li></ul></ul><ul><ul><li>Choose for a high traffic website </li></ul></ul>
    10. 10. Vertical or Horizontal? <ul><li>Vertical </li></ul><ul><li>Aka Scaling up </li></ul><ul><li>Adding resources to a node </li></ul><ul><ul><li>Getting a bigger server </li></ul></ul><ul><ul><li>Using faster CPUs </li></ul></ul><ul><li>Twice as fast servers can be more than twice expensive </li></ul><ul><li>Horizontal </li></ul><ul><li>Aka Scaling out </li></ul><ul><li>Adding more nodes </li></ul><ul><li>Cost efficient </li></ul><ul><ul><li>Commodity hardware </li></ul></ul><ul><ul><li>increased management complexity </li></ul></ul><ul><li>“ more complex” programming model </li></ul><ul><ul><li>Right foundation </li></ul></ul><ul><li>Throughput and latency between nodes </li></ul>
    11. 11. How to Partition? <ul><li>Functional Partitioning </li></ul><ul><li>Key based partitioning </li></ul><ul><ul><li>(users ending in 01 go to server 1) </li></ul></ul><ul><li>Range based partitioning </li></ul><ul><ul><li>(records ranging from 2M to 4M go to server 8) </li></ul></ul><ul><li>Directory server based partitioning </li></ul><ul><ul><li>(no pre-defined partitioning scheme, instead a lookup is required) </li></ul></ul>
    12. 12. How to balance? <ul><li>Balance is easier if the foundation is right </li></ul><ul><li>Use agile methodologies </li></ul><ul><li>Technical debt is expensive </li></ul><ul><li>Technical mortgage is a KILLER! </li></ul>
    13. 13. Before and After <ul><li>What to do before you get big? </li></ul><ul><ul><li>Lay the right foundation </li></ul></ul><ul><ul><li>Ability to Shard / Partition </li></ul></ul><ul><ul><li>Decouple components </li></ul></ul><ul><ul><li>Effectively cache </li></ul></ul><ul><ul><li>Have a plan in place </li></ul></ul><ul><li>What can wait after things start to grow? </li></ul><ul><ul><li>Now focus on micro optimizations </li></ul></ul><ul><ul><li>Acquiring and upgrading hardware </li></ul></ul><ul><ul><li>Performance optimizations and OS tuning </li></ul></ul><ul><ul><li>Implementing High Availability and Disaster recovery </li></ul></ul><ul><ul><li>Use CDN </li></ul></ul>
    14. 14. What skills / hires are most crucial to dealing with scalability?
    15. 15. Best Practices <ul><li>Go Asynchronous </li></ul><ul><li>Go Stateless </li></ul><ul><li>“ Best IO is No IO” </li></ul><ul><ul><li>Cache effectively using shared cache and monitor utilization </li></ul></ul><ul><li>Decouple as much as possible </li></ul><ul><li>Build using APIs </li></ul><ul><ul><li>Easy to scale development and deployment and open up your service </li></ul></ul><ul><li>Virtualize/Abstract everything </li></ul>
    16. 16. How to blow up?
    17. 17. Can scalability be outsourced? aka Can Cloud fix Twitter? <ul><li>Amazon </li></ul><ul><li>Google AppEngine </li></ul><ul><li>Rackspace </li></ul><ul><li>AppNexus </li></ul><ul><li>10Gen </li></ul><ul><li>Other providers? </li></ul>
    18. 18. Things to take away <ul><li>Focus on scalability, the rest will follow </li></ul><ul><li>Horizontal is better, Vertical is costly </li></ul><ul><li>Go Asynchronous </li></ul><ul><li>Architect so you don’t have to re-architect </li></ul><ul><li>Choose two out of Consistency, Availability and Partition-Tolerance </li></ul><ul><li>Measure utilization first, then performance </li></ul><ul><li>Choose the right infrastructure & invest in right skills </li></ul>
    19. 19. Appendix <ul><li>Notes/Tips: http://mashraqi.com/2008/09/startonomics-startup-scalability.html </li></ul><ul><li>Personal blog: http://mashraqi.com </li></ul><ul><li>Twitter: http://twitter.com/mashraqi </li></ul><ul><li>MySQL Blog: http://mysqldatabaseadministration.blogspot.com </li></ul><ul><li>Email: fmashraqi@yahoo.com </li></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×