Highly scalable-architectures

download Highly scalable-architectures

of 22

Embed Size (px)

Transcript of Highly scalable-architectures

  1. 1. Highly scalable architectures How Twitter deals with its scalability problems Benjamin Hiltpolt Master Seminar 3
  2. 2. Scalability Twitter Introduction Problems Solutions Summary Overview
  3. 3. ... is the ability of a system, network, or process, to handle a growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth. Scalability 1. Andr B. Bondi, 'Characteristics of scalability and their impact on performance', Proceedings of the 2nd international workshop on Software and performance, Ottawa, Ontario, Canada, 2000, ISBN 1-58113-195-X, pages 195203
  4. 4. Horizontally Vertically Scalability
  5. 5. load scalability functional scalability administrative scalability geographic scalability Scalability challenges
  6. 6. microblogging tweets: 140 chars 500M registered users 1.6 Billion searches per day 90M TPD Twitter
  7. 7. downtime 2007: 5d 23h ~2% downtime FIFA World Cup 2010: Service Rejections ~10-20% Scalability problems
  8. 8. June 2009 Twitpocalypse September 2009 Twitpocalypse solution: Snowflake Scalability problems
  9. 9. presidential elections 31 M tweets 327452 TPM 455000 retweets of this photo how do they manage this? Twitter now
  10. 10. starting October 2010 do a lot of monitoring use open source decoupling -> soft launches review system Redesign
  11. 11. Puppet Review Board Murder (bittorrent) Darkmode Management
  12. 12. open API single point to optimize use the crowd to extend twitter 90% of all calls API
  13. 13. cache (DB only Backup) memcache denormalize avoid joins sharding (Flock DB --> MySQL) Database
  14. 14. biggest rails application unicorn (no downtime during deploy) rails scales ruby doesn't ? Ruby on Rails
  15. 15. faster (20%) JVM: Garbage collection scalable static types Scala on Rails
  16. 16. first Starling (Ruby) mid-2008 queue crashed now Kestrel (Scala, Memcache) Queue
  17. 17. big problem e.g. bot harvesting friends solutions: realistic limits delete such accounts Abuse
  18. 18. Unexpected problems: Twitpocalypse UNIX: Cron, Syslog fail most (first) solutions will fail Lessions
  19. 19. DRY, KISS testing (deploy only if tests pass) monitoring (collect everything) caching avoid synchronous calls Lessions:
  20. 20. Thank you! Questions?
  21. 21. http://engineering.twitter.com/2010/09/tech-behind-new-twittercom.html http://www.theregister.co.uk/2012/11/08/twitter_epic_traffic_saved_by_java/ http://engineering.twitter.com/2012/11/bolstering-our-infrastructure.html http://blog.twitter.com/2010/09/better-twitter.html http://highscalability.com/blog/2009/6/27/scaling-twitter-making-twitter-10000-percent-faster.html http://www.youtube.com/watch?v=gxUWfQmN8-4&feature=gv http://www.youtube.com/watch?v=z8LU0Cj6BOU http://blog.redfin.com/devblog/2010/05/how_and_why_twitter_uses_scala.html http://www.artima.com/scalazine/articles/twitter_on_scala.html http://www.technologyreview.com/view/412834/the-secret-behind-twitters-growth/?nlid=1908 http://www.unlimitednovelty.com/2009/04/twitter-blaming-ruby-for-their-mistakes.html http://www.infoq.com/news/2009/06/Twitter-Architecture Twitter architecture overview http://highscalability.com/blog/2009/4/5/at-some-point-the-cost-of-servers-outweighs-the-cost-of-prog.html http://blog.obiefernandez.com/content/2009/04/my-reasoned-response-about-scala-at-twitter.html refs