Preparing for... inclement        weather            Martin Buhr           @martinbuhr        http://loadzen.com
So...WHO HERE HAS LOADTESTED THEIR APP?
For those that haven’t   (or don’t know)
Many people may tell you...
That these are your problem...                           (etc)
And they really can cause       trouble...
We know, it happened to us:          Jive.ly
Day 1:Launch
Day 2:Sarky email to TechCrunch
Day 3:#1 on TechCrunch UK
Day 3:#1 on TechCrunch US
Day 3:#1 on Digg
Shit.
So what happened?To Jive.ly:• Traffic exploded• Sign-ups exploded• In-bound links exploded• Rankings shot up• People were ...
So what really happened?
We lost users
They lost confidence
We lost opportunities
And it was expensive...
:-(
But that isn’t the general           case
You aren’t a C10K site
You’re not trying to piss off        Anonymous
You’re not on TechCrunch          (yet)
Remember these?                  (etc)
They don’t matter... yet  But these guys do...
ANYONE THAT GENERATESTRAFFIC THAT YOU DON’T  EXPECT BUT REALLY         WANT
You may ask yourself: Why should I care?
Why should I care?• Your database:  – Shared SQL server  – Unoptimised queries  – Unoptimised schemas  – Unnecessary reque...
Why should I care?• Your code:  – Nested nested loops  – Inefficient iterators  – Large in-memory objects  – About a milli...
Why should I care?• Your interface:  – Large images  – On the fly processing  – Slow JavaScript  – Slow web services
All of these are exposed andget exponentially worse the      higher your traffic
For start-ups, inefficient   code is expensive
For developers, it’s just    embarrassing...
Which is why we load test           :-)
Oh yeah...•   Your users get your service•   You make the most from your opportunities•   Users spend more on responsive s...
Learnt that the hard way...
That got me thinking...  Can I build my own?
Yes I can...And that became Loadzen     (let’s take a look...)
What is it?•   Load testing in the cloud•   Multi-scenario, weighted testing•   Real-time results•   Chrome plug-in•   Pay...
What’s it built in?•   Django (FCGI)•   MySQL•   Lighttpd•   RabbitMQ•   Pyro•   TornadIO•   SocketIO
What’s it really built in?
Python. Pure and Simple.
Look! A diagram!
And what did we learn?
Log everything• Dynamic RPC is hard• Black box code hurts, open up your systems• When your site breaks (and it will) – you...
Real-time is awesome• Event-based dev changes the way you think• Queues make everything seem scalable• But they introduce ...
UI: Make it simple, stupid•   If your UI sucks, your code is useless•   It’s not someone else’s problem•   If it makes you...
Always think scale• Don’t build for it, but think about it  – Cache your interface  – Use a CDN  – Make requests quick: th...
Pragmatism pays off• Don’t pick tech because it’s hot• Pick it because it solves your problem:  – Elegantly  – Efficiently...
Measure Everything.
Be inquisitive• Talk to your users• Love them (not too much!)• They are the single most important thing to  your company, ...
And lastly...
make stuff, be awesome.      (that’s our motto, btw)
Load testing, Lessons learnt and Loadzen - Martin Buhr at DevTank - 31st January 2012
Load testing, Lessons learnt and Loadzen - Martin Buhr at DevTank - 31st January 2012
Upcoming SlideShare
Loading in...5
×

Load testing, Lessons learnt and Loadzen - Martin Buhr at DevTank - 31st January 2012

758

Published on

Talk by Martin Buhr, Founder of Loadzen.com at Devtank on the 31st of January about the importance of load testing your site as a startup, how http://loadzen.com was built and the lessons learned.

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

  • Be the first to like this

No Downloads
Views
Total Views
758
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Load testing, Lessons learnt and Loadzen - Martin Buhr at DevTank - 31st January 2012"

  1. 1. Preparing for... inclement weather Martin Buhr @martinbuhr http://loadzen.com
  2. 2. So...WHO HERE HAS LOADTESTED THEIR APP?
  3. 3. For those that haven’t (or don’t know)
  4. 4. Many people may tell you...
  5. 5. That these are your problem... (etc)
  6. 6. And they really can cause trouble...
  7. 7. We know, it happened to us: Jive.ly
  8. 8. Day 1:Launch
  9. 9. Day 2:Sarky email to TechCrunch
  10. 10. Day 3:#1 on TechCrunch UK
  11. 11. Day 3:#1 on TechCrunch US
  12. 12. Day 3:#1 on Digg
  13. 13. Shit.
  14. 14. So what happened?To Jive.ly:• Traffic exploded• Sign-ups exploded• In-bound links exploded• Rankings shot up• People were buzzing• Free press!
  15. 15. So what really happened?
  16. 16. We lost users
  17. 17. They lost confidence
  18. 18. We lost opportunities
  19. 19. And it was expensive...
  20. 20. :-(
  21. 21. But that isn’t the general case
  22. 22. You aren’t a C10K site
  23. 23. You’re not trying to piss off Anonymous
  24. 24. You’re not on TechCrunch (yet)
  25. 25. Remember these? (etc)
  26. 26. They don’t matter... yet But these guys do...
  27. 27. ANYONE THAT GENERATESTRAFFIC THAT YOU DON’T EXPECT BUT REALLY WANT
  28. 28. You may ask yourself: Why should I care?
  29. 29. Why should I care?• Your database: – Shared SQL server – Unoptimised queries – Unoptimised schemas – Unnecessary requests
  30. 30. Why should I care?• Your code: – Nested nested loops – Inefficient iterators – Large in-memory objects – About a million other bad practices and shortcuts
  31. 31. Why should I care?• Your interface: – Large images – On the fly processing – Slow JavaScript – Slow web services
  32. 32. All of these are exposed andget exponentially worse the higher your traffic
  33. 33. For start-ups, inefficient code is expensive
  34. 34. For developers, it’s just embarrassing...
  35. 35. Which is why we load test :-)
  36. 36. Oh yeah...• Your users get your service• You make the most from your opportunities• Users spend more on responsive sites• You improve your bottom lineAnd best of all:• You become a better developer
  37. 37. Learnt that the hard way...
  38. 38. That got me thinking... Can I build my own?
  39. 39. Yes I can...And that became Loadzen (let’s take a look...)
  40. 40. What is it?• Load testing in the cloud• Multi-scenario, weighted testing• Real-time results• Chrome plug-in• Pay as you test
  41. 41. What’s it built in?• Django (FCGI)• MySQL• Lighttpd• RabbitMQ• Pyro• TornadIO• SocketIO
  42. 42. What’s it really built in?
  43. 43. Python. Pure and Simple.
  44. 44. Look! A diagram!
  45. 45. And what did we learn?
  46. 46. Log everything• Dynamic RPC is hard• Black box code hurts, open up your systems• When your site breaks (and it will) – you know why
  47. 47. Real-time is awesome• Event-based dev changes the way you think• Queues make everything seem scalable• But they introduce their own problems! – Queue -> Socket -> Browser is a killer on your system – Flow control and timing can be issues
  48. 48. UI: Make it simple, stupid• If your UI sucks, your code is useless• It’s not someone else’s problem• If it makes your users life easier, it’s worth it.• Always think – can I make it simpler?
  49. 49. Always think scale• Don’t build for it, but think about it – Cache your interface – Use a CDN – Make requests quick: think async – Make sure your database is fast – Use the right tool for the job!
  50. 50. Pragmatism pays off• Don’t pick tech because it’s hot• Pick it because it solves your problem: – Elegantly – Efficiently• Architect for extensibility – You’ll deal with it sooner or later
  51. 51. Measure Everything.
  52. 52. Be inquisitive• Talk to your users• Love them (not too much!)• They are the single most important thing to your company, react. – Even if you can’t fix it
  53. 53. And lastly...
  54. 54. make stuff, be awesome. (that’s our motto, btw)
  1. A particular slide catching your eye?

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

×