Comparing Ruby on Rails Public vs. Private Cloud Options

15
Authors Michael Fedotov, Alex Khizhnyak, Renat Khasanshyn

description

The number of Ruby on Rails applications running in the cloud has been augmenting. And so has the number of public and private cloud solutions for Ruby on Rails. Choosing between them and—even before that—choosing between a public and a private cloud can be difficult. This white paper is intended to show you when you can benefit from running your Ruby on Rails application in the cloud, explain the differences between a public and a private cloud, and help you choose between the two.

Transcript of Comparing Ruby on Rails Public vs. Private Cloud Options

Page 1: Comparing Ruby on Rails Public vs. Private Cloud Options

Authors Michael Fedotov,

Alex Khizhnyak,

Renat Khasanshyn

Page 2: Comparing Ruby on Rails Public vs. Private Cloud Options

1. Executive Summary

2. Ruby on Rails in the Cloud

3. Public Cloud vs. Private Cloud

4. Engine Yard AppCloud™

4.1. Ease of Use and Accelerated Development

4.2. Scalability

4.3. Cost-Effectiveness

4.4. Reliability

4.5. Application Cloning and Application Templates

4.6. Challenges

5. Engine Yard xCloud™

5.1. Accelerated Development

5.2. Scalability

5.3. Customizable Hardware Environments

5.4. Reliability

5.5. Application Cloning and Templates

5.6. Challenges

6. Terremark’s Enterprise Cloud™

6.1. Scalability

6.2. Burst Mode

6.3. Ease of use

6.4. Role-based Access and Security

6.5. Flexible Integration

6.6. Challenges

7. Rackspace’s Private Cloud

7.1. Flexibility

7.2. Control

7.3. Scalability

7.4. Privacy, Security, and Reliability

7.5. Customizable Hardware Environments

7.6. Challenges

8. Making the Choice

9. Conclusion

10. About the Authors

Page 3: Comparing Ruby on Rails Public vs. Private Cloud Options

By 2012, 20 percent of businesses will own no IT assets; they will have chosen instead to operate in the

cloud, saving on setting up and maintaining their own data

servers—such is the prediction made by Gartner, Inc.

Meanwhile, according to Evans Data, Ruby on Rails usage has

increased by 40 percent in 2009 alone. Evans predicts that an

even higher increase is to be expected in 2010.

It seems only natural that the number of Ruby on Rails

applications running in the cloud has been augmenting. And so

has the number of public and private cloud solutions for Ruby on Rails. Choosing between them and—

even before that—choosing between a public and a private cloud can be difficult.

This white paper is intended to help you make those choices. It will show you when you can benefit from

running your Ruby on Rails application in the cloud, explain the differences between a public and a private

cloud, and help you choose between the two.

Cloud computing may have been successful in proving its claim that it is the new paradigm shift, but are

Ruby on Rails and cloud computing a good match? There are two fundamental reasons that make us

think they are, indeed.

Ruby is a language known for its relative computational expensiveness. Given that, Ruby on Rails

development can benefit significantly from the scalability that cloud computing offers. By enabling you to

expand your resources effortlessly whenever it is necessary, cloud computing relieves you of concerns

about whether your current amount of resources will suffice.

On the other hand, Ruby on Rails offers a multitude of scaling strategies that can be used in the cloud:

Capacity expansion. This is what usually crosses one’s mind first when s/he hears of scaling.

The possibility to increase productivity by assigning more resources is one of the fundamental

benefits of cloud computing. Yet it is even more efficient when used in concert with other

strategies and optimizations.

By 2012, 20% of

businesses will be

operating exclusively

in the cloud.

Page 4: Comparing Ruby on Rails Public vs. Private Cloud Options

Caching. Using toolkits, such as jQuery, effective browser-side caching can minimize requests to

the server. Taking advantage of such technologies as action and fragment caching can

significantly reduce server and database load. Function partitioning. This is about partitioning independent functions across multiple databases,

which enables individual databases to scale independently. One example is making a copy of a

reporting database from a production database.

Workload segregation. Tasks that can be performed after a Web request has been fulfilled (i.e.

sending confirmation e-mails) might be better off if they

are moved to a background job processor, such as

Navvy.

Using non-relational data stores. Non-relational data

stores, such as Tokyo, Redis, and Riak, can be used to

offload your main database. In addition, they typically

demonstrate better performance than relational

databases, and they scale better.

Ruby (and the Ruby on Rails framework specifically) is widely known for the high developer productivity it

facilitates. Here are only some of the reasons for it:

Programmer-, rather than computer-oriented approach to development, saving hours of

developers’ time

Simplified yet powerful and fast application deployment, relying on Phusion Passenger for

automatically managing the back end, Capistrano for automation, etc.

Ruby on Rails is a perfect fit for Agile development, auspicious for test-driven and behavior-driven

development and the DRY (Don’t Repeat Yourself) approach. With RoR, even small programmer

teams can achieve tremendous efficiency.

The focus on efficiency is evident. Similarly, cloud computing is a technology oriented on increasing

productivity by relieving enterprises of concerns over implementation and operation (we will demonstrate it

later). This means that in terms of productivity Ruby on Rails and cloud computing work fundamentally in

the same vein: they aim to leave the developers to actually develop, not wallow in an incomprehensible

code soup or ponder available resources. For a company or enterprise that stresses efficiency, Ruby on

Rails in the cloud, therefore, is a definite winner.

Multiple scaling

strategies can be used

to deal with Ruby on

Rails’ considerable

computational

expensiveness.

Page 5: Comparing Ruby on Rails Public vs. Private Cloud Options

As two forms of fundamentally the same computing model, public and private computing have much in

common. These essential common features include:

Broad network. Cloud computing capabilities are available over a network.

On-demand self-service. A customer can provision computing capabilities automatically, without

the need to interact with the service provider in person.

Rapid elasticity. Computing capabilities can be rapidly scaled in or scaled out whenever needed.

To the customer, this often means that the elasticity of computing resources available is practically

limitless.

Measured service. Resource use is measured and optimized automatically, offering transparency

to both the client and the service provider.

The difference between the two models, however, is still considerable. It is, arguably, best represented in

the definitions of public and private computing proposed by the U.S. National Institute of Standards and

Technology.

NIST defines public cloud computing as a form of cloud computing where “the infrastructure is made

available to the general public or a large industry group and is owned by an organization selling cloud

services.”

Private cloud computing, by contrast, is characterized by its infrastructure being “operated solely for an

organization. It may be managed by the organization or a third party and may exist on premises or off

premises.”

As can be deduced from the two definitions, the principal difference between a public and a private cloud

is who the cloud infrastructure is running for. If access to the same infrastructure is provided to a

multitude of customers, one would hardly be mistaken to call it a public cloud. If the infrastructure (whether

it is owned by the company or the service provider) is usable specifically by one customer, this is

unmistakably a private cloud.

Public clouds dramatically simplify implementation and reduce implementation costs, allowing saving both

on initial set up and management. The access to the external infrastructure is typically billed based on

usage.

Unlike public clouds, with private clouds the initial set-up costs and, often, operational costs are still there.

Yet significant economy can be achieved by saving on the maintenance of the physical servers and

reduced delivery time enabled by the cloud model. Furthermore, operating in a private cloud means no

privacy and stability concerns and more control over the infrastructure than with a public cloud.

Page 6: Comparing Ruby on Rails Public vs. Private Cloud Options

Public Cloud Private Cloud

Infrastructure customers Multiple Single

Infrastructure type External External/Internal (depending on specific solution)

Implementation costs – +

Maintenance and operational costs – –/+ (depending on specific solution)

Billing by usage + –

Control over infrastructure Limited Full

Source: Altoros Systems, Inc.

Engine Yard is one of the most popular cloud computing vendors, and there is a good reason for that.

Offering great flexibility, Engine Yard makes it possible for small companies and enterprises alike to make

the most of cloud computing. Let us see what key features Engine Yard has to offer for Ruby on Rails

cloud development, focusing on AppCloud™, the Amazon-based budget public cloud solution.

Engine Yard AppCloud™ provides you with a pre-integrated, pre-tested Ruby on Rails technology stack.

This includes Web/application/database servers, built-in monitoring and process management, a Rails-

optimized Linux distribution, in-memory caches, etc. Not only does that take off your shoulders the burden

of setting up and configuring an infrastructure to meet your requirements, but that also allows for

accelerating development by 10-20%—or even more—by saving the time your team would otherwise have

to spend on deployment.

AppCloud™ is easily scalable, allowing you to change the number of and size of your instances with a few

clicks through the AppCloud™ user interface. With AppCloud™, there is no necessity to over-provision

ahead of time just to be on the safe side. Just scale when you actually need to.

Page 7: Comparing Ruby on Rails Public vs. Private Cloud Options

You can start with a small instance and get 10 hours for as little as $1. You pay only for what you use,

meaning that you do not need to pay for a resource once you have

stopped using it. Considering the pricing and the scalability, you

really cannot get much more cost-effective than this.

Reliability is always a major concern for those planning to migrate

to or already operating in the cloud. Engine Yard makes every effort

to ensure their customers’ data is always safe, with remote backups

running every 24 hours and remote monitoring testing your Web

site every five minutes. Should anything arise (like, for example,

your application needing additional capacity), the monitoring system will provide a timely notification. In

case there is any unexpected downtime, the Engine Yard support team will also be alerted immediately.

Engine Yard AppCloud™ lets you clone your full production environment with a single click, regardless of

how many instances and databases it is using. Or, if necessary, you can just as simply shut the production

environment down. Another peculiarity of the AppCloud™ is that all of the information required to

reproduce application capacity is stored in a configuration management system. Whenever you need to,

you can effortlessly re-use it. This means that the Don’t Repeat Yourself approach now reaches out

beyond the level of a single Ruby application.

For all its inarguable advantages, Engine Yard’s public cloud solution (and all public cloud solutions, for

that matter) still has a number of downsides. In certain cases, operating in the public cloud could generate

such amounts of data that providing the network bandwidth to cope with it would simply be unreasonable,

cost-wise.

The public cloud, also, does not necessarily provide much economy when running large-scale

applications. In fact, for some very large enterprises with their own huge IT resource pools, outsourcing to

the public cloud can turn out to be a more expensive option.

A few more problems arise from having to share the servers with other users. If just one of the companies

operating in the cloud, say, inflicts an attack on the server, it is everyone who suffers. Likewise, if one of

the users abuses the service, resulting in the service address being blocked by spam filters, etc., none of

the mail sent from the server will be able to get through. Privacy concerns are another one of the factors

Engine Yard’s

solutions can help you

accelerate

development by 20%

or even more.

Page 8: Comparing Ruby on Rails Public vs. Private Cloud Options

discouraging many from choosing the public cloud. For all the pains providers take to ensure maximum

security, a public cloud is not a place to put confidential or sensitive data.

These considerations, and the desire to be in full control, lead many companies to consider migrating to a

private cloud.

Engine Yard’s xCloud™ is an enterprise cloud computing offering based on the infrastructure delivered by

Terremark, one of the world’s largest Infrastructure-as-a-Service providers. xCloud™ allows for building

private and hybrid clouds, and can be used to satisfy a wide range of enterprise-level cloud needs. While

similar to AppCloud™ in many aspects, xCloud™ also has a number of distinctive features that

emphasize its orientation toward running enterprise-scale applications.

Similar to AppCloud™, xCloud™ offers an environment immediately ready for running your Ruby

application with a managed and integrated Ruby on Rails stack.

Engine Yard claims it provides “limitless scalability.” This sounds reasonable, considering that many of the

world’s biggest RoR Web applications run on xCloud™—including CafePress, Howcast, kgb, RepairPal,

and others.

Scalability in xCloud™ is achieved by using “slices,” one slice being a 2.6 GHz Xeon machine with 768

MB RAM, 10 GB of local slice storage, a 45 GB shared file system and up to two MySQL/Postgre

databases. A minimum order is one production slice and one staging slice. At the other end of the scale,

Engine Yard is offering those with higher demands a dedicated cluster whose minimum configuration

includes two Coraid SAN shelves with 24 disks per unit, as well as three compute nodes with 8 CPU cores

and 32 GB RAM each. Plenty of room for scaling, as you can see, especially keeping in mind that you can

use up to 672 instances.

Many applications have unique requirements that most service providers fail to meet, offering

infrastructures that are more generally oriented. Engine Yard xCloud™, however, claims to be flexible

enough to incorporate any specific hardware or appliance requirements that its customers might have.

Page 9: Comparing Ruby on Rails Public vs. Private Cloud Options

The reliability and security standards are very high here, as they are in AppCloud™. What is more,

xCloud™ offers its customers a variety of compliance guarantees, including PCI and SAS70.

Like AppCloud™, xCloud™ is perfectly suited for the Don’t Repeat Yourself approach. You can clone your

full production environment with a single click and reproduce your application capacity from the

configuration management system.

Based on Terremark’s Enterprise Cloud™, Engine Yard xCloud™ essentially shares its downsides, which

will be focused upon in the next chapter.

Terremark is a leader in virtualized, VMware-based infrastructure services, and its Enterprise Cloud™

probably enjoys more popularity than any other private cloud solution in the niche. The fact that the U.S.

federal government uses the Enterprise Cloud™ is a case in point. With Enterprise Cloud™, you get a

straightforward yet powerful Web-based interface that provides access to Terremark’s datacenters where

your virtual machine is hosted.

Unlike most contending services, the Enterprise Cloud™ is based on resources, not server units or slices.

This allows for more precision when scaling and for more economy, as well, since you do not have to pay

for the part of an additional server unit that is actually idle. It also makes it considerably easier to scale

than with many other services. However, there is no downgrading.

One of the Enterprise Cloud™’s greatest features, Burst Mode enables you to get access to a pool of

additional resources to deal with peaks in usage. The great thing about it is that it allows you to buy a

package that suits your average use, and leave the burst mode to deal with your peak use.

Page 10: Comparing Ruby on Rails Public vs. Private Cloud Options

Terremark prides itself in its easy-to-use Web console, which can be used for creating and managing

virtual servers. With this console, you can also control load balancers and firewall resources allocated to

your environment without any special knowledge.

The Enterprise Cloud™ enables customers to create user accounts and define roles and responsibilities

for different users. Helpful as such an approach is in terms of boosting usage efficiency and workflow

management, it is also a great feature, security-wise.

The standards of security in the Enterprise Cloud™ are high and comply with modern certification

requirements, such as SAS70 Type II, PCI-DSS, and Safe Harbor. The security system features a firewall,

an encryption system, a logging system, intrusion detection and prevention mechanisms, file integrity

monitoring, and other features.

You can easily create a hybrid environment by integrating your existing private network with Enterprise

Cloud™—and Terremark will handle the configuration and security concerns for you.

It is also possible to combine your Enterprise Cloud™ with a dedicated server. The operation of exposing

a physical server to your private cloud takes just a few minutes, and afterwards you can control both using

Terremark’s Web-based interface.

With these features, you can increase productivity by extending your cloud and creating a seamless hybrid

environment.

There are still a few challenges that the Enterprise Cloud™ possesses. The lack of configurability for the

built-in load balancer is one of the most conspicuous among them. In fact, it cannot be configured at all,

as the traffic is distributed automatically. However, Terremark can provide its customers with a hardware

load balancer, if they find it necessary.

Page 11: Comparing Ruby on Rails Public vs. Private Cloud Options

Best known for its managed hosting and public cloud services, Rackspace has also been offering one of

the most versatile private cloud solutions available. With Rackspace’s Private Cloud, the offer is as

follows: you get a number of physical servers with the freedom to virtualize whatever you need on them.

Rackspace manages the servers, while you get full access to the virtual machines on them.

Rackspace’s solution is probably as flexible as cloud computing can get, and certainly more flexible than

any public cloud offering. Since you have full access to your virtual machine, you are free to use it in the

way you need and the physical management is taken care of for you.

With the Private Cloud, you are fully in control of things. First, you, as has already been mentioned, can do

anything you think necessary with your virtual machine. You know exactly what is running and you run

exactly what you want. Second, the physical servers on which the machine is run are used exclusively by

you.

Rackspace’s private cloud does not fail to deliver one of the fundamental advantages of cloud computing.

Here, scalability is achieved almost as simply as within a public cloud. If you need to scale, you hire

another physical server or reconfigure one of the existing.

You do not have to share the physical servers with anyone, so you can rest assured that your data is as

safe as if the servers were your own. The servers are also protected with a firewall, and the monitoring is

consistent and efficient.

With the Private Cloud, your hardware is customizable more than ever to meet your needs. Since the

hardware is provided specifically for your use, Rackspace will be willing to customize it to any possible

degree. Its team will also take care of the deployment process.

Page 12: Comparing Ruby on Rails Public vs. Private Cloud Options

It has to be kept in mind, however, that the costs of using a private cloud are considerably higher than

those of operating within a public cloud. This is especially true given Rackspace’s recommendation to

have a certain surplus of computing power lest one of your servers fail. If it happens, your other servers

must be able to take over its load. But unless the failure actually takes place, you will be paying some 30

to 40 percent overhead.

And for all the flexibility of the Private Cloud, the reverse of the coin is that while Rackspace partially takes

care of deployment, the setup and configuring of an environment is still left to you. This means you will not

be able to save as much on the setup costs with the private cloud as you would if you were using a public

cloud. Moreover, maintaining the environment is also essentially left to you, which is a contrast to Engine

Yard’s preconfigured and ready-to-use environment.

It should also be noted that although VMWare’s ESX, which the Enterprise Cloud™ runs on, has a feature

to limit resources for each virtual machine, you cannot use this feature for your virtual machines in the

cloud. So, you can only rely on the built-in limitation mechanisms to watch that none of the VMs consumes

too much of the resources.

The choice between a private and a public cloud can be a tough one for many to make. If you are one of

those yet undecided as to which type of cloud suits your needs better, these guidelines will hopefully help

you make a well-informed decision.

Here are a few points to consider before everything else:

Scale of your application. Do the size and the complexity of your application justify going for a

private cloud? Or is it a relatively small application that can run perfectly within the infrastructure of

a public cloud? Costs. In many cases, cost is what actually defines the choice

between a private and a public cloud. Smaller companies often

find a public cloud to be much more affordable, given both the

lack of setup and operational costs and the modest pricing. It is

worth keeping in mind, however, that for larger applications a

private cloud can, in fact, be more economical.

Bandwidth. If you plan to operate in the public cloud, how

much data will your application generate? Can you deal with

that data without having to expand your bandwidth beyond reason?

In many cases, cost

is what actually

defines the choice

between a private

and a public cloud.

Page 13: Comparing Ruby on Rails Public vs. Private Cloud Options

Flexibility and control. What is more important for your business: having full control over the

environment or being able to get started quickly and effortlessly? Do you have the staff to take

care that the environment is functioning properly?

Custom hardware. Do you really need custom hardware that a public cloud cannot provide?

Have you actually contacted the service provider directly to confirm that it really cannot?

Typically, smaller businesses find a public cloud to be better-suited for their needs, while enterprises often

opt for the private cloud option as a more rational and a more powerful architecture. However, there might

be considerations in specific cases that lead executives to choose differently.

Even once the choice between a public and a private cloud has been made, it is still necessary to decide

on the specific service provider. The exhibit below illustrates the pros and cons of the four cloud solutions

reviewed in this white paper.

Solution Special Features Challenges

Engine Yard

AppCloud™

Pre-integrated, pre-tested Ruby on

Rails technology stack

Don’t Repeat Yourself with application

templates

You share the public cloud with

other customers.

Not suitable for storing

particularly delicate information

Engine Yard

xCloud™

Accelerated development with pre-

integrated Ruby on Rails technology

stack and application templates

Customizable hardware environments Built-in load balancer is not

configurable.

Cannot manually limit resources

for your virtual machines Terremark’s

Enterprise Cloud™

Burst mode helps you deal with

unexpected peaks in usage.

Seamless integration with your private

network or dedicated hardware

Rackspace’s

Private Cloud

Full control over virtualization on

dedicated hardware

Customizable hardware environments

More expensive than public

cloud offerings

You have to essentially maintain

the environment by yourself.

Source: Altoros Systems, Inc.

Page 14: Comparing Ruby on Rails Public vs. Private Cloud Options

Operating in the cloud helps make up for the comparative computation expensiveness Ruby on Rails is

known for. It is also a great way to stress efficiency and get the most of RoR’s high productivity potential.

Public cloud options are perfectly suited for medium-sized Rails applications, allowing for easy scaling.

Apart from the simple capacity expansion, Ruby on Rails developers can use a number of other scaling

strategies for maximum efficiency. However, certain kinds of data are just too delicate to be stored in a public cloud. If this is the case, a

private cloud is a better option. You should also consider a private

cloud if your application is data heavy, since running such an

application in a public cloud would mean unreasonable bandwidth

expenses.

With such solutions as Terremark’s Enterprise Cloud, a private

cloud is also easier to integrate with your internal infrastructure,

while Rackspace’s Private Cloud provides you with external

dedicated hardware.

Choosing between Ruby on Rails cloud solutions involves a lot of

factors, but if the choice is made wisely, it can help you save dramatically and boost your productivity.

Michael Fedotov is Technology Evangelist at Altoros Systems, Inc. and has been working as a freelance

journalist for a number of IT-related periodicals since 2003, covering next to all aspects of IT, and

specifically software developments, in an abundance of articles. He has taken part in several scientific

conferences and provided service for many more participants creating and holding their presentations. He

also has experience working as an interpreter and presently is studying Japanese.

Alex Khizhnyak is Chief Evangelist at Altoros Systems, Inc. and co-founder of the Belarus Java User

Group. Since 1998, he has gained experience as an author, editor, media specialist, event manager,

conference speaker, and blogger. So far, his education background combines IT, programming,

economics, and journalism.

Renat Khasanshyn is the founder and CEO of Altoros Systems, Inc. Mr. Khasanshyn speaks frequently

at a wide range of events, and most recently was selected as a finalist for the 2007 Emerging Executive of

the Year award by the Massachusetts Technology Leadership Council. Prior to founding Altoros Systems,

Mr. Khasanshyn was VP of Engineering for Tampa-based insurance company, PriMed, Inc. Mr.

If the choice between

public and private

cloud is made wisely,

it can help you save

dramatically.

Page 15: Comparing Ruby on Rails Public vs. Private Cloud Options

Khasanshyn is a co-founder of the Belarusian Java User Group and studied Engineering at Belarusian

State Technical University.

Altoros Systems, Inc. is a global software delivery acceleration specialist that provides focused outsourced

software product engineering, independent Quality Assurance, and testing services to software

organizations and information-driven enterprises. Founded in 2001 and headquartered in Sunnyvale,

California, Altoros has representative offices in Western Massachusetts and Norway. It manages a

software development center in Eastern Europe out of its offices in Minsk, Belarus. For more information,

please visit www.altoros.com.