Building your own (Rails) hosting environment

3,299 views

Published on

Published in: Technology
0 Comments
14 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,299
On SlideShare
0
From Embeds
0
Number of Embeds
287
Actions
Shares
0
Downloads
0
Comments
0
Likes
14
Embeds 0
No embeds

No notes for slide
  • Most people get this wrong
    Intro to my background
    Mention URL
  • This list is the product of my own mistakes
    Lead-out on why Hardware RAID
  • Degraded mode performance
    Cache with BBU
    Hot swap drives
  • Remote console
    Redundant PSU
  • Ruby is very memory bandwidth intensive
    Lots of L2 Cache, fast system memory
    Fill banks evenly
    1 row = 1333 Mhz, 2 = 1066, 3 = 800
  • Summarize hardware
    Lead out to R710
  • This is (basically) what Basecamp runs on
    Lead-out to Linux
  • Use Red Hat if you need vendor support
    Examples use CentOS 5
    Avoid Debian or Gentoo unless you really know what you’re doing
  • It’s okay to have DB on same machine
    Watch out for log files
    Lead out - Deploying Rails with Passenger
  • UseGlobalQueue
    PoolIdleTime
    Ruby Enterprise Edition
  • If it isn’t tested, it’s not a backup
  • All your switches should be Cisco
  • Like Testing for production systems
    Make decisions with real data
    Cacti & Nagios, not as hard as they look, use Net-SNMPd
  • What are your questions?
  • Building your own (Rails) hosting environment

    1. 1. Building your own hosting environment Nic Benders http://nicbenders.com/hosting nic@nicbenders.com
    2. 2. Server Checklist Hardware RAID + Hot Swap drives Remote console Redundant power supply Xeon CPU Linux distro with Long Term Support Apache + Phusion Passenger Working backups Gigabit Ethernet Monitoring
    3. 3. Switch from Software RAID-5 to Hardware RAID-1
    4. 4. Server Checklist Hardware RAID + Hot Swap drives Remote console Redundant power supply Xeon CPU Linux distro with Long Term Support Apache + Phusion Passenger Working backups Gigabit Ethernet Monitoring
    5. 5. Nehalem Memory Architecture •Each CPU has 3 channels •Each channel has up to 3 banks (slots)
    6. 6. Server Checklist Hardware RAID + Hot Swap drives Remote console Redundant power supply Xeon CPU Linux distro with Long Term Support Apache + Phusion Passenger Working backups Gigabit Ethernet Monitoring
    7. 7. Dell R710 (about $4,000) Dual Xeon E5520 (8 cores total) 12G RAM (6x2G, 1066 MHz RDIMM) RAID with 256M cache and battery backup 2x 146G, 15k RPM SAS drives Redundant power supplies Remote Console
    8. 8. Linux Distro Red Hat Enterprise Linux Ubuntu Server (LTS) or CentOS 5.x (Tikanga) 8.04 (Hardy Heron) Released in 2007 Released in 2008 Supported until 2014 Supported until 2013
    9. 9. Other Linux Tips Only install what you need Use LVM, especially for the root partition Use ext3 with “noatime” Everything you need should be in /etc/hosts Use iptables, even if you have a firewall Make sure root’s mail is being forwarded Learn Chef
    10. 10. conf.d/app.example.com.conf
    11. 11. conf.d/00-passenger.conf
    12. 12. /usr/local/sbin/ree_wrapper
    13. 13. Server Checklist Hardware RAID + Hot Swap drives Remote console Redundant power supply Xeon CPU Linux distro with Long Term Support Apache + Phusion Passenger Working backups Gigabit Ethernet Monitoring
    14. 14. Gigabit Switches Cisco (Linksys) Cisco 3750G SLM2008 • About $4,000 • About $100 • 24 or 48 ports • 4 or 8 ports • Very fast backplane • Offers some remote • Stackable, forms single management logical switch
    15. 15. Server Checklist Hardware RAID + Hot Swap drives Remote console Redundant power supply Xeon CPU Linux distro with Long Term Support Apache + Phusion Passenger Working backups Gigabit Ethernet Monitoring
    16. 16. Monitoring Alerting Performance • Nagios • Cacti • Pingdom ($) • New Relic RPM ($$)
    17. 17. Server Checklist Hardware RAID + Hot Swap drives Remote console Redundant power supply Xeon CPU Linux distro with Long Term Support Apache + Phusion Passenger Working backups Gigabit Ethernet Monitoring
    18. 18. http://nicbenders.com/hosting

    ×