Comparing Ruby on Rails Public vs. Private Cloud Options


Published on

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.

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Comparing Ruby on Rails Public vs. Private Cloud Options

  1. 1. Authors Michael Fedotov, Alex Khizhnyak, Renat Khasanshyn
  2. 2. 1. Executive Summary2. Ruby on Rails in the Cloud3. Public Cloud vs. Private Cloud4. 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. Challenges5. 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. Challenges6. 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. Challenges7. 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. Challenges8. Making the Choice9. Conclusion10. About the Authors
  3. 3. By 2012, 20 percent of businesses will own no IT assets; they will have chosen instead to operate in thecloud, saving on setting up and maintaining their own dataservers—such is the prediction made by Gartner, Inc. By 2012, 20% ofMeanwhile, according to Evans Data, Ruby on Rails usage has businesses will beincreased by 40 percent in 2009 alone. Evans predicts that aneven higher increase is to be expected in 2010. operating exclusively in the cloud.It seems only natural that the number of Ruby on Railsapplications running in the cloud has been augmenting. And sohas 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 fromrunning your Ruby on Rails application in the cloud, explain the differences between a public and a privatecloud, 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 areRuby on Rails and cloud computing a good match? There are two fundamental reasons that make usthink they are, indeed.Ruby is a language known for its relative computational expensiveness. Given that, Ruby on Railsdevelopment can benefit significantly from the scalability that cloud computing offers. By enabling you toexpand your resources effortlessly whenever it is necessary, cloud computing relieves you of concernsabout 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.
  4. 4.  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. Multiple scaling strategies can be used  Using non-relational data stores. Non-relational data stores, such as Tokyo, Redis, and Riak, can be used to to deal with Ruby on offload your main database. In addition, they typically Rails’ considerable demonstrate better performance than relational databases, and they scale better. computational expensiveness.Ruby (and the Ruby on Rails framework specifically) is widely known for the high developer productivity itfacilitates. 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 increasingproductivity by relieving enterprises of concerns over implementation and operation (we will demonstrate itlater). This means that in terms of productivity Ruby on Rails and cloud computing work fundamentally inthe same vein: they aim to leave the developers to actually develop, not wallow in an incomprehensiblecode soup or ponder available resources. For a company or enterprise that stresses efficiency, Ruby onRails in the cloud, therefore, is a definite winner.
  5. 5. As two forms of fundamentally the same computing model, public and private computing have much incommon. 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 inthe definitions of public and private computing proposed by the U.S. National Institute of Standards andTechnology.NIST defines public cloud computing as a form of cloud computing where “the infrastructure is madeavailable to the general public or a large industry group and is owned by an organization selling cloudservices.”Private cloud computing, by contrast, is characterized by its infrastructure being “operated solely for anorganization. It may be managed by the organization or a third party and may exist on premises or offpremises.”As can be deduced from the two definitions, the principal difference between a public and a private cloudis who the cloud infrastructure is running for. If access to the same infrastructure is provided to amultitude of customers, one would hardly be mistaken to call it a public cloud. If the infrastructure (whetherit is owned by the company or the service provider) is usable specifically by one customer, this isunmistakably a private cloud.Public clouds dramatically simplify implementation and reduce implementation costs, allowing saving bothon initial set up and management. The access to the external infrastructure is typically billed based onusage.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 andreduced delivery time enabled by the cloud model. Furthermore, operating in a private cloud means noprivacy and stability concerns and more control over the infrastructure than with a public cloud.
  6. 6. Public Cloud Private CloudInfrastructure customers Multiple SingleInfrastructure 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 makethe most of cloud computing. Let us see what key features Engine Yard has to offer for Ruby on Railscloud 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 burdenof setting up and configuring an infrastructure to meet your requirements, but that also allows foraccelerating development by 10-20%—or even more—by saving the time your team would otherwise haveto spend on deployment.AppCloud™ is easily scalable, allowing you to change the number of and size of your instances with a fewclicks through the AppCloud™ user interface. With AppCloud™, there is no necessity to over-provisionahead of time just to be on the safe side. Just scale when you actually need to.
  7. 7. 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 havestopped using it. Considering the pricing and the scalability, youreally cannot get much more cost-effective than this. Engine Yard’s solutions can help you accelerateReliability is always a major concern for those planning to migrate development by 20%to or already operating in the cloud. Engine Yard makes every effortto ensure their customers’ data is always safe, with remote backups or even more.running every 24 hours and remote monitoring testing your Website every five minutes. Should anything arise (like, for example,your application needing additional capacity), the monitoring system will provide a timely notification. Incase 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 ofhow many instances and databases it is using. Or, if necessary, you can just as simply shut the productionenvironment down. Another peculiarity of the AppCloud™ is that all of the information required toreproduce 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 outbeyond the level of a single Ruby application.For all its inarguable advantages, Engine Yard’s public cloud solution (and all public cloud solutions, forthat matter) still has a number of downsides. In certain cases, operating in the public cloud could generatesuch 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-scaleapplications. In fact, for some very large enterprises with their own huge IT resource pools, outsourcing tothe 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 companiesoperating in the cloud, say, inflicts an attack on the server, it is everyone who suffers. Likewise, if one ofthe users abuses the service, resulting in the service address being blocked by spam filters, etc., none ofthe mail sent from the server will be able to get through. Privacy concerns are another one of the factors
  8. 8. discouraging many from choosing the public cloud. For all the pains providers take to ensure maximumsecurity, 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 aprivate cloud.Engine Yard’s xCloud™ is an enterprise cloud computing offering based on the infrastructure delivered byTerremark, one of the world’s largest Infrastructure-as-a-Service providers. xCloud™ allows for buildingprivate and hybrid clouds, and can be used to satisfy a wide range of enterprise-level cloud needs. Whilesimilar to AppCloud™ in many aspects, xCloud™ also has a number of distinctive features thatemphasize its orientation toward running enterprise-scale applications.Similar to AppCloud™, xCloud™ offers an environment immediately ready for running your Rubyapplication with a managed and integrated Ruby on Rails stack.Engine Yard claims it provides “limitless scalability.” This sounds reasonable, considering that many of theworld’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 768MB RAM, 10 GB of local slice storage, a 45 GB shared file system and up to two MySQL/Postgredatabases. 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 configurationincludes two Coraid SAN shelves with 24 disks per unit, as well as three compute nodes with 8 CPU coresand 32 GB RAM each. Plenty of room for scaling, as you can see, especially keeping in mind that you canuse up to 672 instances.Many applications have unique requirements that most service providers fail to meet, offeringinfrastructures that are more generally oriented. Engine Yard xCloud™, however, claims to be flexibleenough to incorporate any specific hardware or appliance requirements that its customers might have.
  9. 9. 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 yourfull production environment with a single click and reproduce your application capacity from theconfiguration management system.Based on Terremark’s Enterprise Cloud™, Engine Yard xCloud™ essentially shares its downsides, whichwill 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 astraightforward yet powerful Web-based interface that provides access to Terremark’s datacenters whereyour 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 payfor the part of an additional server unit that is actually idle. It also makes it considerably easier to scalethan 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 ofadditional resources to deal with peaks in usage. The great thing about it is that it allows you to buy apackage that suits your average use, and leave the burst mode to deal with your peak use.
  10. 10. Terremark prides itself in its easy-to-use Web console, which can be used for creating and managingvirtual servers. With this console, you can also control load balancers and firewall resources allocated toyour environment without any special knowledge.The Enterprise Cloud™ enables customers to create user accounts and define roles and responsibilitiesfor different users. Helpful as such an approach is in terms of boosting usage efficiency and workflowmanagement, it is also a great feature, security-wise.The standards of security in the Enterprise Cloud™ are high and comply with modern certificationrequirements, 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 integritymonitoring, and other features.You can easily create a hybrid environment by integrating your existing private network with EnterpriseCloud™—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 exposinga physical server to your private cloud takes just a few minutes, and afterwards you can control both usingTerremark’s Web-based interface.With these features, you can increase productivity by extending your cloud and creating a seamless hybridenvironment.There are still a few challenges that the Enterprise Cloud™ possesses. The lack of configurability for thebuilt-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 hardwareload balancer, if they find it necessary.
  11. 11. Best known for its managed hosting and public cloud services, Rackspace has also been offering one ofthe most versatile private cloud solutions available. With Rackspace’s Private Cloud, the offer is asfollows: 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 thanany public cloud offering. Since you have full access to your virtual machine, you are free to use it in theway 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 doanything you think necessary with your virtual machine. You know exactly what is running and you runexactly what you want. Second, the physical servers on which the machine is run are used exclusively byyou.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 hireanother 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 assafe as if the servers were your own. The servers are also protected with a firewall, and the monitoring isconsistent and efficient.With the Private Cloud, your hardware is customizable more than ever to meet your needs. Since thehardware is provided specifically for your use, Rackspace will be willing to customize it to any possibledegree. Its team will also take care of the deployment process.
  12. 12. It has to be kept in mind, however, that the costs of using a private cloud are considerably higher thanthose of operating within a public cloud. This is especially true given Rackspace’s recommendation tohave a certain surplus of computing power lest one of your servers fail. If it happens, your other serversmust be able to take over its load. But unless the failure actually takes place, you will be paying some 30to 40 percent overhead.And for all the flexibility of the Private Cloud, the reverse of the coin is that while Rackspace partially takescare of deployment, the setup and configuring of an environment is still left to you. This means you will notbe able to save as much on the setup costs with the private cloud as you would if you were using a publiccloud. Moreover, maintaining the environment is also essentially left to you, which is a contrast to EngineYard’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 featureto limit resources for each virtual machine, you cannot use this feature for your virtual machines in thecloud. So, you can only rely on the built-in limitation mechanisms to watch that none of the VMs consumestoo 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 ofthose yet undecided as to which type of cloud suits your needs better, these guidelines will hopefully helpyou 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 In many cases, cost between a private and a public cloud. Smaller companies often is what actually find a public cloud to be much more affordable, given both the lack of setup and operational costs and the modest pricing. It is defines the choice worth keeping in mind, however, that for larger applications a between a private private cloud can, in fact, be more economical. and a public cloud.  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?
  13. 13.  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 oftenopt for the private cloud option as a more rational and a more powerful architecture. However, there mightbe 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 decideon the specific service provider. The exhibit below illustrates the pros and cons of the four cloud solutionsreviewed in this white paper.Solution Special Features ChallengesEngine Yard  Pre-integrated, pre-tested Ruby on  You share the public cloud withAppCloud™ Rails technology stack other customers.  Don’t Repeat Yourself with application  Not suitable for storing templates particularly delicate informationEngine Yard  Accelerated development with pre-xCloud™ integrated Ruby on Rails technology stack and application templates  Built-in load balancer is not  Customizable hardware environments configurable.Terremark’s  Burst mode helps you deal with  Cannot manually limit resourcesEnterprise Cloud™ unexpected peaks in usage. for your virtual machines  Seamless integration with your private network or dedicated hardwareRackspace’s  Full control over virtualization on  More expensive than publicPrivate Cloud dedicated hardware cloud offerings  Customizable hardware environments  You have to essentially maintain the environment by yourself. Source: Altoros Systems, Inc.
  14. 14. Operating in the cloud helps make up for the comparative computation expensiveness Ruby on Rails isknown 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 scalingstrategies for maximum efficiency.However, certain kinds of data are just too delicate to be stored in a public cloud. If this is the case, aprivate cloud is a better option. You should also consider a privatecloud if your application is data heavy, since running such anapplication in a public cloud would mean unreasonable bandwidth If the choice betweenexpenses. public and privateWith such solutions as Terremark’s Enterprise Cloud, a private cloud is made wisely,cloud is also easier to integrate with your internal infrastructure,while Rackspace’s Private Cloud provides you with external it can help you savededicated hardware. dramatically.Choosing between Ruby on Rails cloud solutions involves a lot offactors, 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 freelancejournalist for a number of IT-related periodicals since 2003, covering next to all aspects of IT, andspecifically software developments, in an abundance of articles. He has taken part in several scientificconferences and provided service for many more participants creating and holding their presentations. Healso 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 UserGroup. 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 frequentlyat a wide range of events, and most recently was selected as a finalist for the 2007 Emerging Executive ofthe 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.
  15. 15. Khasanshyn is a co-founder of the Belarusian Java User Group and studied Engineering at BelarusianState Technical University.Altoros Systems, Inc. is a global software delivery acceleration specialist that provides focused outsourcedsoftware product engineering, independent Quality Assurance, and testing services to softwareorganizations and information-driven enterprises. Founded in 2001 and headquartered in Sunnyvale,California, Altoros has representative offices in Western Massachusetts and Norway. It manages asoftware development center in Eastern Europe out of its offices in Minsk, Belarus. For more information,please visit