199
Enterprise Hosting for Ruby on Rails Julian Fischer [email protected] http://www.enterprise-rails.de Samstag, 15. Oktober 11

Enterprise rails hosting 3 ways to scale - 2011-10

Embed Size (px)

DESCRIPTION

Your project is evolving just fine, you have a steady, non-linear growth and your roadmap is tightly packed. You feel hosting issues become more and more time consuming. So what to do? In this talk we will see that the answer to this question is not as easy as: "we'll jump into the cloud". More than this three different ways to solve this problem will be presented: high-end hardware, commodity hardware and a cloud deployment scenario. This gives you options to choose from. For each scenario an exemplary system design illustrating its hosting structure will be shown. We will workout individual pros and cons which need to be considered carefully in respect to your individual requirements. In order to support your decision making we will draft a rough decision tree to help you picking the best possible scenario for your situation. So at the end of the talk should be able to plan your next scale out step, easily.

Citation preview

Page 1: Enterprise rails hosting   3 ways to scale - 2011-10

Enterprise Hosting for Ruby on Rails

Julian [email protected]

http://www.enterprise-rails.de

Samstag, 15. Oktober 11

Page 2: Enterprise rails hosting   3 ways to scale - 2011-10

Introduction

Samstag, 15. Oktober 11

Page 3: Enterprise rails hosting   3 ways to scale - 2011-10

IntroductionAbout me

Samstag, 15. Oktober 11

Page 4: Enterprise rails hosting   3 ways to scale - 2011-10

About meJulian Fischer‣Twitter: http://www.twitter.com/railshoster‣E-Mail: [email protected]

Samstag, 15. Oktober 11

Page 5: Enterprise rails hosting   3 ways to scale - 2011-10

About meJulian Fischer‣Twitter: http://www.twitter.com/railshoster‣E-Mail: [email protected]

‣ CEO of Avarteq GmbH

Samstag, 15. Oktober 11

Page 6: Enterprise rails hosting   3 ways to scale - 2011-10

About meJulian Fischer‣Twitter: http://www.twitter.com/railshoster‣E-Mail: [email protected]

‣ CEO of Avarteq GmbH

‣ Lecturer „Ruby on Rails“ @ HTWdS

Samstag, 15. Oktober 11

Page 7: Enterprise rails hosting   3 ways to scale - 2011-10

About meJulian Fischer‣Twitter: http://www.twitter.com/railshoster‣E-Mail: [email protected]

‣ CEO of Avarteq GmbH

‣ Lecturer „Ruby on Rails“ @ HTWdS

‣ Ruby und Ruby on Rails programmer

Samstag, 15. Oktober 11

Page 8: Enterprise rails hosting   3 ways to scale - 2011-10

About meJulian Fischer‣Twitter: http://www.twitter.com/railshoster‣E-Mail: [email protected]

‣ CEO of Avarteq GmbH

‣ Lecturer „Ruby on Rails“ @ HTWdS

‣ Ruby und Ruby on Rails programmer

‣ Entperise-Rails.de - Head of Hosting

Samstag, 15. Oktober 11

Page 9: Enterprise rails hosting   3 ways to scale - 2011-10

IntroductionAbout Avarteq GmbH

Samstag, 15. Oktober 11

Page 10: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

About Avarteq GmbH

Samstag, 15. Oktober 11

Page 11: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Founded in Nov. 2008 from two existing companies.

About Avarteq GmbH

Samstag, 15. Oktober 11

Page 12: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Founded in Nov. 2008 from two existing companies.

‣ Involvment of Key-Systems GmbHmanages ~2,5 * 10^6 domains for customers of 200+ countries.

About Avarteq GmbH

Samstag, 15. Oktober 11

Page 13: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Founded in Nov. 2008 from two existing companies.

‣ Involvment of Key-Systems GmbHmanages ~2,5 * 10^6 domains for customers of 200+ countries.

‣ Team size: ~20 people>16 full-time

About Avarteq GmbH

Samstag, 15. Oktober 11

Page 14: Enterprise rails hosting   3 ways to scale - 2011-10

IntroductionAssumptions for this talk

Samstag, 15. Oktober 11

Page 15: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Assumptions for this talk

Samstag, 15. Oktober 11

Page 16: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Ruby and Ruby on Rails architectures to be hosted.

Assumptions for this talk

Samstag, 15. Oktober 11

Page 17: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Ruby and Ruby on Rails architectures to be hosted.

‣ Hosting basics you know what a LB is and what it does.

Assumptions for this talk

Samstag, 15. Oktober 11

Page 18: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Ruby and Ruby on Rails architectures to be hosted.

‣ Hosting basics you know what a LB is and what it does.

‣ You are interested in a methodology to determine a suitable hosting solution for you. And you don‘t need to see Ruby code in a presentation to like it :-)

Assumptions for this talk

Samstag, 15. Oktober 11

Page 19: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Ruby and Ruby on Rails architectures to be hosted.

‣ Hosting basics you know what a LB is and what it does.

‣ You are interested in a methodology to determine a suitable hosting solution for you. And you don‘t need to see Ruby code in a presentation to like it :-)

Assumptions for this talk

Samstag, 15. Oktober 11

Page 20: Enterprise rails hosting   3 ways to scale - 2011-10

Hosting todayand in the near future

Samstag, 15. Oktober 11

Page 21: Enterprise rails hosting   3 ways to scale - 2011-10

The future of hostingcan be found in the cloud.

Samstag, 15. Oktober 11

Page 22: Enterprise rails hosting   3 ways to scale - 2011-10

But not on EC2.

Samstag, 15. Oktober 11

Page 23: Enterprise rails hosting   3 ways to scale - 2011-10

US Cloud providers do to hosting what Starbucks did to coffee.

From $1 with free refill to ...

Samstag, 15. Oktober 11

Page 24: Enterprise rails hosting   3 ways to scale - 2011-10

More and more free or achievable cloud

technologies emerge.

Samstag, 15. Oktober 11

Page 25: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Hosting today and in the future

Samstag, 15. Oktober 11

Page 26: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Eucalyptus

Hosting today and in the future

Samstag, 15. Oktober 11

Page 27: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Eucalyptus

‣ OpenStack

Hosting today and in the future

Samstag, 15. Oktober 11

Page 28: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Eucalyptus

‣ OpenStack

‣ vCloud

Hosting today and in the future

Samstag, 15. Oktober 11

Page 29: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Eucalyptus

‣ OpenStack

‣ vCloud

‣ ...

Hosting today and in the future

Samstag, 15. Oktober 11

Page 30: Enterprise rails hosting   3 ways to scale - 2011-10

Many „smaller“ clouds will become available

within the next few years.

Samstag, 15. Oktober 11

Page 31: Enterprise rails hosting   3 ways to scale - 2011-10

Additional abstraction layers will be established.

Helping to stay independent or even mash up existing clouds.

Samstag, 15. Oktober 11

Page 32: Enterprise rails hosting   3 ways to scale - 2011-10

Abstraction via services

Samstag, 15. Oktober 11

Page 33: Enterprise rails hosting   3 ways to scale - 2011-10

„Start an instance on an internal cloud, then with the same code start another on EC2 or Rackspace.

Deltacloud protects your apps from cloud API changes and incompatibilities, so you can concentrate on managing cloud

instances the way you want.“

http://incubator.apache.org/deltacloud/

Samstag, 15. Oktober 11

Page 34: Enterprise rails hosting   3 ways to scale - 2011-10

Client side abstraction

Samstag, 15. Oktober 11

Page 35: Enterprise rails hosting   3 ways to scale - 2011-10

Fog

„Collections provide a simplified interface, making clouds easier

to work with and switch between.“

https://github.com/geemus/fog

Samstag, 15. Oktober 11

Page 36: Enterprise rails hosting   3 ways to scale - 2011-10

So be prepared for the cloud.Design your app scalable.

Samstag, 15. Oktober 11

Page 37: Enterprise rails hosting   3 ways to scale - 2011-10

BUT

Samstag, 15. Oktober 11

Page 38: Enterprise rails hosting   3 ways to scale - 2011-10

For nowConsider your options.

Pick carefully.

Samstag, 15. Oktober 11

Page 39: Enterprise rails hosting   3 ways to scale - 2011-10

Making a decision requires options to choose from.

Samstag, 15. Oktober 11

Page 40: Enterprise rails hosting   3 ways to scale - 2011-10

Know your options!

Samstag, 15. Oktober 11

Page 41: Enterprise rails hosting   3 ways to scale - 2011-10

3 Hosting ScenariosOverview

Samstag, 15. Oktober 11

Page 42: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

3 Hosting Scenarios

Samstag, 15. Oktober 11

Page 43: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Cloud Hosting

3 Hosting Scenarios

Samstag, 15. Oktober 11

Page 44: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Cloud Hosting

‣ Commodity Hardware Cluster

3 Hosting Scenarios

Samstag, 15. Oktober 11

Page 45: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Cloud Hosting

‣ Commodity Hardware Cluster

‣ High End Hardware Cluster

3 Hosting Scenarios

Samstag, 15. Oktober 11

Page 46: Enterprise rails hosting   3 ways to scale - 2011-10

3 Hosting ScenariosCloud Hosting

Samstag, 15. Oktober 11

Page 47: Enterprise rails hosting   3 ways to scale - 2011-10

Cloud HostingUrban Legends

Samstag, 15. Oktober 11

Page 48: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Urban Legends

Samstag, 15. Oktober 11

Page 49: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Cloud technologies are wonderful

Urban Legends

Samstag, 15. Oktober 11

Page 50: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Cloud technologies are wonderful

‣ People become euphoric

Urban Legends

Samstag, 15. Oktober 11

Page 51: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Cloud technologies are wonderful

‣ People become euphoric

‣ Marketing people oversimplify advantages

Urban Legends

Samstag, 15. Oktober 11

Page 52: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Cloud technologies are wonderful

‣ People become euphoric

‣ Marketing people oversimplify advantages

‣ People want do believe

Urban Legends

Samstag, 15. Oktober 11

Page 53: Enterprise rails hosting   3 ways to scale - 2011-10

#1 Go to the cloud

and get rid of sys ops.

Samstag, 15. Oktober 11

Page 54: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Urban Legends

Samstag, 15. Oktober 11

Page 55: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ The hole decision process should be accompanied by an experienced sys op. You don‘t need plenty of workhours here but you definitely want to have advice here and there.

Urban Legends

Samstag, 15. Oktober 11

Page 56: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ The hole decision process should be accompanied by an experienced sys op. You don‘t need plenty of workhours here but you definitely want to have advice here and there.

‣ You‘re still running unix services. Depending on how custom your system is you will need sys ops helping to configure your services accordingly. Template configs from the community might not fit your scenario. How much memory do you got? You have to adapt cache sizes, number of Passenger processes to be spawned, ...

Urban Legends

Samstag, 15. Oktober 11

Page 57: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Urban Legends

Samstag, 15. Oktober 11

Page 58: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Who writes your chef recipies? Who writes your service configuration templates? Who tweaks your database?

Urban Legends

Samstag, 15. Oktober 11

Page 59: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Who writes your chef recipies? Who writes your service configuration templates? Who tweaks your database?

‣ Every got a mistery failure? Which shouldn‘t be there but actually is. Library dependency issues, sporadic network problems, spontenously failing processes, ...

Urban Legends

Samstag, 15. Oktober 11

Page 60: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Who writes your chef recipies? Who writes your service configuration templates? Who tweaks your database?

‣ Every got a mistery failure? Which shouldn‘t be there but actually is. Library dependency issues, sporadic network problems, spontenously failing processes, ...

‣ Who recovers from serious failures? Taking your backups and refills production databases.

Urban Legends

Samstag, 15. Oktober 11

Page 61: Enterprise rails hosting   3 ways to scale - 2011-10

Who gets up at night?

Samstag, 15. Oktober 11

Page 62: Enterprise rails hosting   3 ways to scale - 2011-10

Not having a sys op means ...

Samstag, 15. Oktober 11

Page 63: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Urban Legends

Samstag, 15. Oktober 11

Page 64: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Making a mistakes potentially causing a lot of trouble. It‘s so hard to be a sys op and programmer at once. These roles have different perspectives, by nature.

Urban Legends

Samstag, 15. Oktober 11

Page 65: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Making a mistakes potentially causing a lot of trouble. It‘s so hard to be a sys op and programmer at once. These roles have different perspectives, by nature.

‣ Accpeting drawbacks by not focusing on service configurations, ...

Urban Legends

Samstag, 15. Oktober 11

Page 66: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Making a mistakes potentially causing a lot of trouble. It‘s so hard to be a sys op and programmer at once. These roles have different perspectives, by nature.

‣ Accpeting drawbacks by not focusing on service configurations, ...

‣ Having people acting like sys ops sbd. performing sys op tasks can be considered a sys op. Even if he/she looks like a programmer :-)

Urban Legends

Samstag, 15. Oktober 11

Page 67: Enterprise rails hosting   3 ways to scale - 2011-10

#2 Go to the cloud and

have no outages any more.

Samstag, 15. Oktober 11

Page 68: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Urban Legends

Samstag, 15. Oktober 11

Page 69: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Data center issues can‘t be avoided From experience, there will be network outages caused by switches, routes, broken wires, whatever. http://rh.gd/nMNSUK as an example.

Urban Legends

Samstag, 15. Oktober 11

Page 70: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Data center issues can‘t be avoided From experience, there will be network outages caused by switches, routes, broken wires, whatever. http://rh.gd/nMNSUK as an example.

‣ Self healing can‘t recover every issue Resetting your computer often helps. Hence it‘s a good guess. But it does not help all the time. Do you really want to distract your programmers to dig through unix service logs? Ineffective.

Urban Legends

Samstag, 15. Oktober 11

Page 71: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Data center issues can‘t be avoided From experience, there will be network outages caused by switches, routes, broken wires, whatever. http://rh.gd/nMNSUK as an example.

‣ Self healing can‘t recover every issue Resetting your computer often helps. Hence it‘s a good guess. But it does not help all the time. Do you really want to distract your programmers to dig through unix service logs? Ineffective.

‣ Autoscaling won‘t keep your service up unless you set it up correctly AND your autoscale settings either match the situation or be very aggressive (wasting money). Do you really want to scale out on a DDoS attack?

Urban Legends

Samstag, 15. Oktober 11

Page 72: Enterprise rails hosting   3 ways to scale - 2011-10

#3 Go to the cloud and

save money.

Samstag, 15. Oktober 11

Page 73: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Urban Legends

Samstag, 15. Oktober 11

Page 74: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Not true for every case. You have to do the math.

Urban Legends

Samstag, 15. Oktober 11

Page 75: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Not true for every case. You have to do the math.

‣ Actually it‘s pretty expensive.

Urban Legends

Samstag, 15. Oktober 11

Page 76: Enterprise rails hosting   3 ways to scale - 2011-10

#4 Go to the cloud

it‘s safe.

Samstag, 15. Oktober 11

Page 77: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Urban Legends

Samstag, 15. Oktober 11

Page 78: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ It‘s simply not There are serious legal issues being discussed.

Urban Legends

Samstag, 15. Oktober 11

Page 79: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ It‘s simply not There are serious legal issues being discussed.

‣ Infrastructure non-transparency Do you really understand the infrastructure topology? If not how can you be sure about your data being kept private?

Urban Legends

Samstag, 15. Oktober 11

Page 80: Enterprise rails hosting   3 ways to scale - 2011-10

Again. Cloud is a future technology.

But don‘t be blind.

Samstag, 15. Oktober 11

Page 81: Enterprise rails hosting   3 ways to scale - 2011-10

Cloud HostingPro

Samstag, 15. Oktober 11

Page 82: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Cloud Hosting

Samstag, 15. Oktober 11

Page 83: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Maximal flexibility with Auto Scaling

Cloud Hosting

Samstag, 15. Oktober 11

Page 84: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Maximal flexibility with Auto Scaling

‣ Grow & Shrink start and stop (app/server) instances. Shut down what you don‘t need and pay per use.

Cloud Hosting

Samstag, 15. Oktober 11

Page 85: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Maximal flexibility with Auto Scaling

‣ Grow & Shrink start and stop (app/server) instances. Shut down what you don‘t need and pay per use.

‣ Robustness with auto healing.

Cloud Hosting

Samstag, 15. Oktober 11

Page 86: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Maximal flexibility with Auto Scaling

‣ Grow & Shrink start and stop (app/server) instances. Shut down what you don‘t need and pay per use.

‣ Robustness with auto healing.

‣ Kill and restart misbehaving components.

Cloud Hosting

Samstag, 15. Oktober 11

Page 87: Enterprise rails hosting   3 ways to scale - 2011-10

Cloud HostingContra

Samstag, 15. Oktober 11

Page 88: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Cloud Hosting

Samstag, 15. Oktober 11

Page 89: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Scale carefully or do you really want to scale out to serve requests to DDoS attack resulting into a FDoS - a financial denial of service by spending all your money? Setup your scaleout rules carefully.

Cloud Hosting

Samstag, 15. Oktober 11

Page 90: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Scale carefully or do you really want to scale out to serve requests to DDoS attack resulting into a FDoS - a financial denial of service by spending all your money? Setup your scaleout rules carefully.

‣ Autohealing within limits switch off - switch on it not always a suitable repair strategy. Nothing replaces an experienced sysop! It‘s just reducing his workload taking away no brainer tasks.

Cloud Hosting

Samstag, 15. Oktober 11

Page 91: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Cloud Hosting

Samstag, 15. Oktober 11

Page 92: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Causes legal issues for EU companies putting data to a US providers. http://rh.gd/p6l26y (german). In certain scenarios virtualizatin is completely forbidden (e.g. certain levels of pci compliance).

Cloud Hosting

Samstag, 15. Oktober 11

Page 93: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Causes legal issues for EU companies putting data to a US providers. http://rh.gd/p6l26y (german). In certain scenarios virtualizatin is completely forbidden (e.g. certain levels of pci compliance).

‣ Unreasonable expensive compared to physical hardware. 4 - 20 times more for similar performance. Depending on your cloud provider and instance/resource type.

Cloud Hosting

Samstag, 15. Oktober 11

Page 94: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Causes legal issues for EU companies putting data to a US providers. http://rh.gd/p6l26y (german). In certain scenarios virtualizatin is completely forbidden (e.g. certain levels of pci compliance).

‣ Unreasonable expensive compared to physical hardware. 4 - 20 times more for similar performance. Depending on your cloud provider and instance/resource type.

‣ You are a number by being one in a million customers. Don‘t expect reasonable help when needed.

Cloud Hosting

Samstag, 15. Oktober 11

Page 95: Enterprise rails hosting   3 ways to scale - 2011-10

Did you know?

Samstag, 15. Oktober 11

Page 96: Enterprise rails hosting   3 ways to scale - 2011-10

Samstag, 15. Oktober 11

Page 97: Enterprise rails hosting   3 ways to scale - 2011-10

3 Hosting ScenariosCommodity Hardware

Samstag, 15. Oktober 11

Page 98: Enterprise rails hosting   3 ways to scale - 2011-10

Commodity HardwarePro

Samstag, 15. Oktober 11

Page 99: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Commodity Hardware

Samstag, 15. Oktober 11

Page 100: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ „Cheap“ hardware in huge datacenters.

Commodity Hardware

Samstag, 15. Oktober 11

Page 101: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ „Cheap“ hardware in huge datacenters.

‣ Traffic included.

Commodity Hardware

Samstag, 15. Oktober 11

Page 102: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ „Cheap“ hardware in huge datacenters.

‣ Traffic included.

‣ Private GBit backnet available. Physically dedicated

Commodity Hardware

Samstag, 15. Oktober 11

Page 103: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ „Cheap“ hardware in huge datacenters.

‣ Traffic included.

‣ Private GBit backnet available. Physically dedicated

‣ Maximum performance from your budget. Get a E3 Xenion

Quad Core 1245, 16 GB ECC RAM, 2*3TB HDD for 69 € / month.

Commodity Hardware

Samstag, 15. Oktober 11

Page 104: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Commodity Hardware

Samstag, 15. Oktober 11

Page 105: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Why would you scale out if you already have plenty of workforce for your money? That‘s a simple thought. A very good option especially if you know your load and grow rate.

Commodity Hardware

Samstag, 15. Oktober 11

Page 106: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Why would you scale out if you already have plenty of workforce for your money? That‘s a simple thought. A very good option especially if you know your load and grow rate.

‣ No legal issues for EU companies.

Commodity Hardware

Samstag, 15. Oktober 11

Page 107: Enterprise rails hosting   3 ways to scale - 2011-10

Commodity HardwareContra

Samstag, 15. Oktober 11

Page 108: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Commodity Hardware

Samstag, 15. Oktober 11

Page 109: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ You are a number by being one in a couple of thousand customers. Expect response and repair times within 30 min to 24h.

Commodity Hardware

Samstag, 15. Oktober 11

Page 110: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ You are a number by being one in a couple of thousand customers. Expect response and repair times within 30 min to 24h.

‣ Scaling less flexible. Server relocation might be necessary. Server setup fees make shrink operations expensive.

Commodity Hardware

Samstag, 15. Oktober 11

Page 111: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ You are a number by being one in a couple of thousand customers. Expect response and repair times within 30 min to 24h.

‣ Scaling less flexible. Server relocation might be necessary. Server setup fees make shrink operations expensive.

‣ Hardware is not high end. Smart system design needed to compensate eventual hardware failures.

Commodity Hardware

Samstag, 15. Oktober 11

Page 112: Enterprise rails hosting   3 ways to scale - 2011-10

3 Hosting ScenariosHigh End Hardware

Samstag, 15. Oktober 11

Page 113: Enterprise rails hosting   3 ways to scale - 2011-10

High End HardwarePro

Samstag, 15. Oktober 11

Page 114: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

High End Hardware

Samstag, 15. Oktober 11

Page 115: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ High end hardware in well staffed datacenters. Close contact to data center technicians. Quick responses. Fast failure recovery.

High End Hardware

Samstag, 15. Oktober 11

Page 116: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ High end hardware in well staffed datacenters. Close contact to data center technicians. Quick responses. Fast failure recovery.

‣ Very realiable hardware. Hardware RAID, hot swappable hdds, redundant power supplies, ...

High End Hardware

Samstag, 15. Oktober 11

Page 117: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ High end hardware in well staffed datacenters. Close contact to data center technicians. Quick responses. Fast failure recovery.

‣ Very realiable hardware. Hardware RAID, hot swappable hdds, redundant power supplies, ...

‣ Private GBit backnet available. Physically dedicated

High End Hardware

Samstag, 15. Oktober 11

Page 118: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ High end hardware in well staffed datacenters. Close contact to data center technicians. Quick responses. Fast failure recovery.

‣ Very realiable hardware. Hardware RAID, hot swappable hdds, redundant power supplies, ...

‣ Private GBit backnet available. Physically dedicated

‣ Maximum performance. Get multi cpu servers with 2 x 6

XENON Cores, up to 192 GB RAM, SAS and SDD hdds, ...

High End Hardware

Samstag, 15. Oktober 11

Page 119: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

High End Hardware

Samstag, 15. Oktober 11

Page 120: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Custom equipped servers can be built specific for their individual purposes. A server with fast cpus and SSD disks will boost your DB service, for example.

High End Hardware

Samstag, 15. Oktober 11

Page 121: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Custom equipped servers can be built specific for their individual purposes. A server with fast cpus and SSD disks will boost your DB service, for example.

‣ Vertical scale outs Servers can be upgraded by adding more memory, better CPUs, more hdds, ...

High End Hardware

Samstag, 15. Oktober 11

Page 122: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Custom equipped servers can be built specific for their individual purposes. A server with fast cpus and SSD disks will boost your DB service, for example.

‣ Vertical scale outs Servers can be upgraded by adding more memory, better CPUs, more hdds, ...

‣ Hybdrid solutions with private clouds. If there‘s a private cloud co-located in the datacenter you can have physical machines to encounter ground loads and use a cloud workforce to serve peaks.

High End Hardware

Samstag, 15. Oktober 11

Page 123: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

High End Hardware

Samstag, 15. Oktober 11

Page 124: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Scale outs New servers can be added. High end data centers usually provide advanced switching technologies with vlan capabilities.

High End Hardware

Samstag, 15. Oktober 11

Page 125: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Scale outs New servers can be added. High end data centers usually provide advanced switching technologies with vlan capabilities.

‣ No legal issues for EU companies.

High End Hardware

Samstag, 15. Oktober 11

Page 126: Enterprise rails hosting   3 ways to scale - 2011-10

High End HardwareContra

Samstag, 15. Oktober 11

Page 127: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

High End Hardware

Samstag, 15. Oktober 11

Page 128: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ More expensive than cheap hw Still much cheaper than cloud resources for a comparable performance.

High End Hardware

Samstag, 15. Oktober 11

Page 129: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ More expensive than cheap hw Still much cheaper than cloud resources for a comparable performance.

‣ Contract durations Due to financial write offs contract lifetimes are usually longer than for commodity servers or cloud resources.

High End Hardware

Samstag, 15. Oktober 11

Page 130: Enterprise rails hosting   3 ways to scale - 2011-10

Proceed systematically.

Think. Evaluate. Think again.

Samstag, 15. Oktober 11

Page 131: Enterprise rails hosting   3 ways to scale - 2011-10

How to build a hostingAn exemplary process

Samstag, 15. Oktober 11

Page 132: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processRequirements Analysis

Samstag, 15. Oktober 11

Page 133: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Requirements Analysis

Samstag, 15. Oktober 11

Page 134: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Budget Calculate roughly 2.5 to 5% of your overall project costs.

Requirements Analysis

Samstag, 15. Oktober 11

Page 135: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Budget Calculate roughly 2.5 to 5% of your overall project costs.

‣ Expected Load

Requirements Analysis

Samstag, 15. Oktober 11

Page 136: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Budget Calculate roughly 2.5 to 5% of your overall project costs.

‣ Expected Load

‣ Ground load Present on a daily basis.

Requirements Analysis

Samstag, 15. Oktober 11

Page 137: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Budget Calculate roughly 2.5 to 5% of your overall project costs.

‣ Expected Load

‣ Ground load Present on a daily basis.

‣ Peak load Triggered by (external) events.

Requirements Analysis

Samstag, 15. Oktober 11

Page 138: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Requirements Analysis

Samstag, 15. Oktober 11

Page 139: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Desired Response Time How many ms to serve.

Requirements Analysis

Samstag, 15. Oktober 11

Page 140: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Desired Response Time How many ms to serve.

‣ Desired Availability Uptime / Downtime ratio.

Requirements Analysis

Samstag, 15. Oktober 11

Page 141: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Desired Response Time How many ms to serve.

‣ Desired Availability Uptime / Downtime ratio.

‣ Geographic Targeting Where are your users located?

Requirements Analysis

Samstag, 15. Oktober 11

Page 142: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Desired Response Time How many ms to serve.

‣ Desired Availability Uptime / Downtime ratio.

‣ Geographic Targeting Where are your users located?

‣ Estimated Growth 1 month, 6 month, 12 months.

Requirements Analysis

Samstag, 15. Oktober 11

Page 143: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Requirements Analysis

Samstag, 15. Oktober 11

Page 144: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Legal constraints Be aware of privacy law issues.

Requirements Analysis

Samstag, 15. Oktober 11

Page 145: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Legal constraints Be aware of privacy law issues.

‣ Technical constraints e.g. ugly Windows legacy stuff.

Requirements Analysis

Samstag, 15. Oktober 11

Page 146: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Legal constraints Be aware of privacy law issues.

‣ Technical constraints e.g. ugly Windows legacy stuff.

‣ Competence Know how to run an app in production?

Requirements Analysis

Samstag, 15. Oktober 11

Page 147: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processIdentify System Components

Samstag, 15. Oktober 11

Page 148: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Identify System Components

Samstag, 15. Oktober 11

Page 149: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Which components are present? search server, background processing, key/value store, replicating rdbms, ...

Identify System Components

Samstag, 15. Oktober 11

Page 150: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Which components are present? search server, background processing, key/value store, replicating rdbms, ...

‣ Eliminate SPOFs Try to have everything crucial twice+.

Identify System Components

Samstag, 15. Oktober 11

Page 151: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processChoose Platform

Samstag, 15. Oktober 11

Page 152: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Choose Platform

Samstag, 15. Oktober 11

Page 153: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Which platform matches your requirements best? Shrink/Scale, cheap workforce or rock solid?

Choose Platform

Samstag, 15. Oktober 11

Page 154: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Which platform matches your requirements best? Shrink/Scale, cheap workforce or rock solid?

‣ (Really) need resources on demand? Or is it just for the case that ... If you need to grow and shrink, cloud providers will to the trick.

Choose Platform

Samstag, 15. Oktober 11

Page 155: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Which platform matches your requirements best? Shrink/Scale, cheap workforce or rock solid?

‣ (Really) need resources on demand? Or is it just for the case that ... If you need to grow and shrink, cloud providers will to the trick.

‣ Want to have the maximum performance from your budget? Then hardware might be your choice.

Choose Platform

Samstag, 15. Oktober 11

Page 156: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Choose Platform

Samstag, 15. Oktober 11

Page 157: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Geographic location Where are your users.

Choose Platform

Samstag, 15. Oktober 11

Page 158: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Geographic location Where are your users.

‣ You and the supply chain Are you a number or a customer? Do you have access to technical staff?

Choose Platform

Samstag, 15. Oktober 11

Page 159: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Geographic location Where are your users.

‣ You and the supply chain Are you a number or a customer? Do you have access to technical staff?

‣ Quality of Service What are the response times? How fast do they repair?

Choose Platform

Samstag, 15. Oktober 11

Page 160: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processInitial Dimension

Samstag, 15. Oktober 11

Page 161: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Initial Dimension

Samstag, 15. Oktober 11

Page 162: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Know your app To match your desired response time you‘ll need to know your app‘s resource consumption. At least roughly.

Initial Dimension

Samstag, 15. Oktober 11

Page 163: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Know your app To match your desired response time you‘ll need to know your app‘s resource consumption. At least roughly.

‣ Create a system design draft. Decide where to run which system component. The smaller your building blocks are the better.

Initial Dimension

Samstag, 15. Oktober 11

Page 164: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Know your app To match your desired response time you‘ll need to know your app‘s resource consumption. At least roughly.

‣ Create a system design draft. Decide where to run which system component. The smaller your building blocks are the better.

‣ Estimate the # servers you need. And decide about scaleout settings if you‘re on a cloud plattform.

Initial Dimension

Samstag, 15. Oktober 11

Page 165: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Know your app To match your desired response time you‘ll need to know your app‘s resource consumption. At least roughly.

‣ Create a system design draft. Decide where to run which system component. The smaller your building blocks are the better.

‣ Estimate the # servers you need. And decide about scaleout settings if you‘re on a cloud plattform.

‣ Order servers or whatever you rely on.

Initial Dimension

Samstag, 15. Oktober 11

Page 166: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processSystem Design

Samstag, 15. Oktober 11

Page 167: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

System Design

Samstag, 15. Oktober 11

Page 168: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Detailed System Design Describes where to run what. How to use what resource when and how. How what to connects to what.

System Design

Samstag, 15. Oktober 11

Page 169: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Detailed System Design Describes where to run what. How to use what resource when and how. How what to connects to what.

‣ Monitoring plan. Monitor everything your app relies on. This will give you diagnosis information when you need it. So plan what to monitor how.

System Design

Samstag, 15. Oktober 11

Page 170: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Detailed System Design Describes where to run what. How to use what resource when and how. How what to connects to what.

‣ Monitoring plan. Monitor everything your app relies on. This will give you diagnosis information when you need it. So plan what to monitor how.

‣ Backup plan. Data can be lost. Be prepared and think about where your app produces valuable data to be backuped.

System Design

Samstag, 15. Oktober 11

Page 171: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processInstallation(automation)

Samstag, 15. Oktober 11

Page 172: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Installation(automation)

Samstag, 15. Oktober 11

Page 173: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Get a bluprint of your hosting Use Chef.

Installation(automation)

Samstag, 15. Oktober 11

Page 174: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Get a bluprint of your hosting Use Chef.

‣ Describe how to setup every system component. Keep your recipies small and simple.

Installation(automation)

Samstag, 15. Oktober 11

Page 175: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Get a bluprint of your hosting Use Chef.

‣ Describe how to setup every system component. Keep your recipies small and simple.

‣ Be ready for a deployment. You have successfully automated your installation process if you can run cap deploy afterwards.

Installation(automation)

Samstag, 15. Oktober 11

Page 176: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processStrengthen your system.

Samstag, 15. Oktober 11

Page 177: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Strengthen your system

Samstag, 15. Oktober 11

Page 178: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Your app need dependent processes? Use a process monitor such as kickstart, monit or god to keep them alive. Double check with nagios for a system health status.

Strengthen your system

Samstag, 15. Oktober 11

Page 179: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Your app need dependent processes? Use a process monitor such as kickstart, monit or god to keep them alive. Double check with nagios for a system health status.

‣ Make your servers reboot proof. Your system needs to get back to normal on a black out automatically.

Strengthen your system

Samstag, 15. Oktober 11

Page 180: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Your app need dependent processes? Use a process monitor such as kickstart, monit or god to keep them alive. Double check with nagios for a system health status.

‣ Make your servers reboot proof. Your system needs to get back to normal on a black out automatically.

‣ Desaster and Recovery planning. What is the most likely error event? What is the impact? How to fix it?

Strengthen your system

Samstag, 15. Oktober 11

Page 181: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Your app need dependent processes? Use a process monitor such as kickstart, monit or god to keep them alive. Double check with nagios for a system health status.

‣ Make your servers reboot proof. Your system needs to get back to normal on a black out automatically.

‣ Desaster and Recovery planning. What is the most likely error event? What is the impact? How to fix it?

‣ Simulate disasters. Test your recovery plans.

Strengthen your system

Samstag, 15. Oktober 11

Page 182: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processDeployment

Samstag, 15. Oktober 11

Page 183: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Installation(automation)

Samstag, 15. Oktober 11

Page 184: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Use a deployment tool. Not really worth mentioning but just to be complete. Do I have to mention capistrano?

Installation(automation)

Samstag, 15. Oktober 11

Page 185: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Use a deployment tool. Not really worth mentioning but just to be complete. Do I have to mention capistrano?

‣ Setup Capistrano. Cap deploy. Shouldn‘t need more than that for the average case. Automate whatever you can. Make it foolproof.

Installation(automation)

Samstag, 15. Oktober 11

Page 186: Enterprise rails hosting   3 ways to scale - 2011-10

An exemplary processTest && Launch

Samstag, 15. Oktober 11

Page 187: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Test && Launch

Samstag, 15. Oktober 11

Page 188: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Test your setup. Perform acceptance tests. Partly covered by

your desaster simulations. Also test with your customer, your users, ...

Test && Launch

Samstag, 15. Oktober 11

Page 189: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Test your setup. Perform acceptance tests. Partly covered by

your desaster simulations. Also test with your customer, your users, ...

‣ Go live! Cover your eyes and pray :-)

Test && Launch

Samstag, 15. Oktober 11

Page 190: Enterprise rails hosting   3 ways to scale - 2011-10

Lessons LearnedKey Statements to remember

Samstag, 15. Oktober 11

Page 191: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

Lessons Learned

Samstag, 15. Oktober 11

Page 192: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Creating a hosting. Should be considered to be a project. Process it systematically.

Lessons Learned

Samstag, 15. Oktober 11

Page 193: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Creating a hosting. Should be considered to be a project. Process it systematically.

‣ Be aware of people holding a hammer. Because if you got a hammer everything you see is a nail.

Lessons Learned

Samstag, 15. Oktober 11

Page 194: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Creating a hosting. Should be considered to be a project. Process it systematically.

‣ Be aware of people holding a hammer. Because if you got a hammer everything you see is a nail.

‣ Make decisions. No decision without choices. Know your options.

Lessons Learned

Samstag, 15. Oktober 11

Page 195: Enterprise rails hosting   3 ways to scale - 2011-10

@railshoster

‣ Creating a hosting. Should be considered to be a project. Process it systematically.

‣ Be aware of people holding a hammer. Because if you got a hammer everything you see is a nail.

‣ Make decisions. No decision without choices. Know your options.

‣ Reduce sysop work. But running an app is a pain and burdon for most developers.

Lessons Learned

Samstag, 15. Oktober 11

Page 196: Enterprise rails hosting   3 ways to scale - 2011-10

Focus on adding value to your business.

Samstag, 15. Oktober 11

Page 197: Enterprise rails hosting   3 ways to scale - 2011-10

Focus on your app.

Samstag, 15. Oktober 11

Page 198: Enterprise rails hosting   3 ways to scale - 2011-10

Samstag, 15. Oktober 11

Page 199: Enterprise rails hosting   3 ways to scale - 2011-10

Thank youfor your

attention!

Headquarter:http://www.avarteq.de

Blog:http://ww.treibstofff.de

Rails Enterprise Hosting:http://www.enterprise-

rails.com

Rails Hosting:http://www.railshoster.com

Samstag, 15. Oktober 11