Nell’iperspazio con Rocket: il Framework Web di Rust!
High Availability Server Apps
1. High Availability
Server apps
Tarek Ziade & Benoît Chesneau
Monday, October 3, 2011 1
2. • The C10K problem
• “It's time for web servers to handle ten
thousand clients simultaneously, don't you
think? After all, the web is a big place now. “
• http://www.kegel.com/c10k.html
Monday, October 3, 2011 2
31. asynchronous
or
synchronous
Monday, October 3, 2011 31
32. • bandwidth-bound & CPU-bound apps
• Fast operations required
• Needs a way to hold incoming connections
(cf nginx + gunicorn sync)
synchronous
Monday, October 3, 2011 32
33. • websocket, longpolling
• apps with long, blocking calls
• streaming
• slow clients
• slowloris & other DoS
asynchronous
Monday, October 3, 2011 33
34. gevent & eventlet
• Network libraries
• synchronous API
• monkey patch
• co-routines
• Code is always running async
gevent & eventlet
Monday, October 3, 2011 34
35. twisted
• asynchronous library
• Events & callbacks
• Twisted server == single event loop
twisted
Monday, October 3, 2011 35
43. • 10 frontends web
• +123 mysql (percona)
• 6 Open Ldap servers (2 masters, 4 slaves)
• ~1.5 M active users
• ~4 M registered users
• ~800 RPS for the storage
• CPU: 20% !!! ETooMuch
Monday, October 3, 2011 43