Cloud services are ever more present and everyone insists they are going to help you solve any and all issues we have. If this is so you have to decide for yourself, but in the meantime let's talk about pluses and minuses. What the system admin will have to get right and what he will get wrong.
On page seo презентация от Digital4PlovdivNikola Minkov
Презентация на собственика на SEO Агенция Serpact Никола Минков от Digital4Plovdiv на тема OnPage SEO стандарти за 2016 година - http://serpact.bg/nikola-minkov-beshe-lektor-na-digital4plovdiv/
Cloud services are ever more present and everyone insists they are going to help you solve any and all issues we have. If this is so you have to decide for yourself, but in the meantime let's talk about pluses and minuses. What the system admin will have to get right and what he will get wrong.
On page seo презентация от Digital4PlovdivNikola Minkov
Презентация на собственика на SEO Агенция Serpact Никола Минков от Digital4Plovdiv на тема OnPage SEO стандарти за 2016 година - http://serpact.bg/nikola-minkov-beshe-lektor-na-digital4plovdiv/
6. One machine concurrent setup
Browser
App Server
Makes request
Rails App
Parses the request Writes response
Sends response
App Server
App Server
App Server
App Server
Pool of workers
7. Many machines concurrent setup
Browser
Makes request Sends response
App Server
App Server
App Server
App Server
App Server
Load Balancer
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
Balances between machines
Instance/VM/Box Instance/VM/Box Instance/VM/Box
8. Slow clients
Връзката е бавна тъй като канала е Internet
Може да има network latency
Browser
App Server
App Server
App Server
App Server
App Server
Load Balancer
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
9. Използвайте "буфери" за трафика
Browser
App Server
App Server
App Server
App Server
App Server
ELB/haproxy/nginx
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
App Server
nginxnginx nginx
10. Изберете внимателно Ruby VM
● GC може да заема *МНОГО* време
● green threads vs true concurrency vs GIL
● много зависи от приложението
● ruby 1.8 не се поддържа официално
● GC tweaks
○ RUBY_GC_MALLOC_LIMIT
○ RUBY_HEAP_SLOTS_INCREMENT
○ RUBY_HEAP_MIN_SLOTS
11. Ruby Enterprise Edition
● Може бе най-добрата 1.8 имплементация
● Tweakable GC params
● copy-on-write friendly GC
● Използва TCMalloc - по-бърз malloc
12. JRuby
● Изграден върху JVM
● Използва JVM GC - много бърз
● Не поддържа native extensions
● Unicorn не се поддържа
● Трябва да се ползва TomCat, JBoss,
GlassFish, etc.
● Няма GIL + използва native threads
13. ● GC-то може да се тунингова
● Не всички gem-ове се поддържат
● Странна поддръжка на unicode
● Може би най-добрия избор за нов проект
MRI 2.0
16. Полезни проекти/услуги
● Unicorn - app server
● nginx - web server
● haproxy - load balancer
● AWS - real-time scaling infrastructure
● NewRelic - kick ass monitoring
● REE - optimized ruby VM
● memcached - сесии, кеширане
17. ● Първо измервайте, после оптимизирайте
● Работещ продукт - най-важната
оптимизация
● В повечето случай bottleneck-а е data IO
● Rails скалира не по-лошо от всеки един
друг framework
● Всичко e computer science
И не забравяйте!