Опыт эксплуатации большого проекта на Ruby

Embed Size (px)

Citation preview

  • 1. Ruby- http://alexclear.livejournal.com

2. ? PHP- ^ WTF? 3. ? Ruby- ? ? ? 4. ( ) 5. Disclaimer , - ? ? , , ? 6. , top 3 ? 7. , , 8. LAMP MySQL 5.0.95 Drupal : OpenVZ - Cpanel ~20 RPS 9. 1 , . , PHP CMS , http://habrahabr.ru/post/144857 10. 2 Drupal , MySQL Apache/PHP Drupal ( ) ( ) 11. , , : Ruby on Rails RoR, RoR PHP/Drupal, , PHP 12. 1 Apache/PHP suPHP - () cPanel ( , ) MySQL MyISAM , ,flush_log_at_trx_commit . 13. 2 MySQL query cache ( ) slow log mk-log-parser , etckeeper ( ) cron- - 14. Drupal , 15. Ruby-: RHEL 5.5 Ruby 1.8.7 (REE), Rails 3 PostgreSQL MySQL (, , PostgreSQL online alter ) 16. Ruby-: Dell R710, 24 48 Gb, SAS- RAID BBU Production : RoR , , 17. Ruby-: RVM Unicorn god Unicorn cron+rake Resque god 18. , PHP- R/O , ( Ruby- ) (, ) , DDoS 19. DDoS 1 IP (~6000 ) - ipset IP mod_evasive 20. DDoS 2 ~8000 iptables %$^#! , ipset, 21. PHP- PHP- , Drupal , ( , ) 22. Ruby- , : , , , DNS 23. 1 , Resque fork() Fork rate ~80 forks/s 24. 2 (thank God), ? , - 25. 1 , GlusterFS KVM-based 10 26. 2 , ? ? PHP- Ruby- Ruby , - 27. 3 Java-? : Ruby? : PMP, http://poormansprofiler.org sh- gdb , 50-600 28. PMP RVM Ruby debug info , - 29. - 4 , GC GC REE 1.8.7 MRI 1.9.3 GC , , ! 30. ? Unicorn 4 8 Double facepalm , , ? 50-70% select(), - 50-70%? 4-8 ? 31. Unicorn select() : GC select() EventMachine ( ) 32. , ? , rake task Ruby 1.8.7 1.9.3 GC GC 33. ? :UPDATE purchases SET user_created_at = us.created_at FROM purchases pINNER JOIN users us ON us.id = p.user_idAND p.user_id >= 2000000 AND p.user_id < 2100000; , ? , full scan fork bomb archive bomb, SQL bomb 34. Sinatra , , - ? Sinatra , 35. , , , 36. mc , 16 , , mc , atop 37. pgfouine - , - : ? log_checkpoints , checkpoint , , , checkpoint_completion_target 1 ( ) 38. 9.X hot standby , , Slony-I DDL statements , hot standby, 39. pg_dumpall pg_dumpall WAL archiving pg_rman Amanda 40. git Caplite ( , ) Capistrano , (thank SASS, etc) 41. ( , ) Peer reviews Unit tests CI: Bigtuna Bigtuna Jenkins 42. Chef ! 43. NAGIOS http://host-tracker.com Airbrake NewRelic Smokeping ( ) - 44. 1 , , Google, Yandex, , , , - , ? , , ? 45. 2 , , -! ~15 Skype-, Yandex, Mail.Ru, Scalaxy , ( ) 46. 3 : ( ) , , 47. , Chef failover , SPOF 48. Who dares wins , Ruby on Rails , , 10 49. ? 50. ! http://alexclear.livejournal.com [email protected] http://github.com/alexclear