35. Scaling up: memory
• add more memory
• mongrel can be very memory-hungry
• useful for caching (memcached)
• hint: check crucial.com for low prices
36. Scaling up: CPU
• upgrade to quad-core Opterons
• available later this year
• same socket
• same power / heat envelope
• use as drop-in replacement
38. Scaling out
• app servers scale (almost) linearly
• use same hardware (if possible)
• one type of processor, memory, disk
• simplifies maintenance / repair
39. Bottleneck: application
• lots of concurrent users
• rails is single threaded (mutex lock)
• solution: add more mongrels
• rule of thumb: 10 mongrels per cpu
• twitter runs on ca. 300 mongrels
40. Bottleneck: database
• avoid to hit database
• cache as much as possible
• scale up database masters
• more disks = faster access
• add read-only db slaves
42. Scaling storage
• disk failure very common
• use RAID1 for database masters
• network storage
• example: ATA-over-Ethernet (AoE)
• accessible as block device
• combine with cluster file system
44. • Evolving a cluster setup
• Scaling
• Make or buy?
• Discussion
45. Make or buy?
• think about total cost of ownership (TCO)
• not only hardware costs
• rackspace, power, bandwidth
• administration overhead
• „Utility? Or generator in the back
yard?“ (David Young)
48. • Evolving a cluster setup
• Scaling
• Make or buy?
• Discussion
49. Summary
• 2-machine cluster is cool (and quite
affordable) setup
• virtualization is a Good Thing
• scaling the database can be tricky
• make or buy depends on concrete situation