The Wayback Machine - https://web.archive.org/web/20180518194922/http://ruby.sys-con.com:80/node/3322909

Welcome!

Ruby-On-Rails Authors: Liz McMillan, Pat Romanski, Elizabeth White, Hovhannes Avoyan, Yeshim Deniz

Related Topics: @DevOpsSummit, Microservices Expo, Open Source Cloud, @CloudExpo, Ruby-On-Rails

@DevOpsSummit: Blog Post

Ruby on Rails Performance Tips By @Monitis | @CloudExpo [#Cloud]

Rails has continued to scale up as an elegant way to build dynamic websites quickly and efficiently

Top 5 Ruby on Rails Performance Tips for the Small Business

2015 is the 10th birthday of Ruby on Rails (or simply called Rails), the popular open source web application framework that uses the Ruby programming language. Ever since Rails burst on the scene a decade ago it has continued to scale up as an elegant way to build dynamic websites quickly and efficiently. Rails has garnered a strong following, especially among tech startups. In fact, some of the best known firms out there are using the framework to build their sites. Examples of elegant sites built on Rails are GrouponAirbnb, and Bloomberg.

The irony of Rails is that even though it was originally designed as an easy way to learn code and build sites, it has become quite “complex.” One writer captures the sentiment this way:

For something that is touted as being an “easy” to use framework, Rails is a pretty complex beast. Over the years it has progressed from a seemingly simple framework that “anyone” can learn to the intricate collection of add-ons, gems and extensions that make it the power house it is now.

Indeed, Rails is a great ecosystem that is used by startups, small businesses, and enterprises alike to build cool, interactive websites. What’s more, if you using Rails then you’re going to want to get the most mileage from the framework. You’re going to want to optimize, expand, and build upon the simple and elegant tools and resources that help make Rails what it is. Therefore, in what follows we want to outline 5 key performance tips, or best practices, which will help you maximize your Rails shop and make it an even more powerful tool in your web development arsenal.

1. Caching
You’ve probably heard this term before. Caching is a mechanism for the temporary storage of web pages in order to reduce bandwidth and improve performance. This saves server time and makes things altogether faster. It’s a common practice in web development and is fairly straightforward to implement in Rails applications. For an overview of the various caching options and updates in Rails, see the RailsGuides documentation here.

2. Content Delivery Network
A content delivery network is a way of taking a website’s static files, like CSS, images, and JavaScript, and delivering them through web servers that are closer to the user’s physical location. Shorter proximity amounts to faster load time and ultimately better performance. But another benefit is that by offloading the bandwidth you also get less risk of downtime disruptions due to traffic volumes. One development expert calls CDNs the “ultimate low-hanging fruit optimization” for Rails and other frameworks. From a cost, efficiency, and scalability perspective, the best resource for making this happen on Rails is Amazon CloudFront.

Ruby2

3. Minify CSS stylesheets and JavaScript
Code optimization is one of the best ways to increase performance, no matter what framework or language you’re using for development. The most common approach is by minifying and concatenating multiple code files into one. For example, if your app has five JavaScript files the browser will make five separate HTTP requests to fetch them. To avoid the block and wait time, an alternative approach would be to minify and concatenate those 5 files into one streamlined one. Rails makes it especially easy and intuitive to minify files through its assets pipeline. This built-in feature concatenates and compresses JavaScript and CSS assets and also enables writing these assets in other languages and pre-processors such as CoffeeScript, Sass and ERB.

4. Use background processing
There’s a lot going on under the hood whenever a web request is made. For example, emailing users, running reports, processing images, updating counters, sending info to external API’s, and search engine indexing are all examples of background processes. The trick is to ensure these are optimized and handled automatically without slowing down the actual application response. Fortunately, there are tools out there like Sidekiq or Resque, which are specifically designed for use on Rails to help manage your background jobs and to ensure they are processed efficiently.

5. Cloud-based application performance monitoring
Your high-end Rails apps are only as good as the performance of your infrastructure, which is why application performance is too important to leave to chance. What this requires is the best-in-class monitoring capability for all your IT systems. That’s exactly what you’ll find in Monitis. As the trusted leader in this market, Monitis offers a 24/7 cloud-based monitoring platform for websites, servers, applications, and networks. Through an easy to follow and intuitive web-interface, Monitis tracks all of your business-critical applications to ensure everything is running optimally and that you’re alerted to issues long before your customers are. In fact, the mobile version of Monitis allows you to get the latest metrics and push notifications delivered to your Android and iPhone/iPad devices.

Ruby3

If you’d like to get onboard with the latest in real-time, cloud-based web app monitoring then go on over to Monitis and start a free trial today. Knowing that your Rails apps are entrusted to a proven industry leader like Monitis will give you the peace of mind you deserve.

Read the original blog entry...

More Stories By Hovhannes Avoyan

Hovhannes Avoyan is the CEO of PicsArt, Inc.,

IoT & Smart Cities Stories
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
DXWorldEXPO LLC announced today that All in Mobile, a mobile app development company from Poland, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. All In Mobile is a mobile app development company from Poland. Since 2014, they maintain passion for developing mobile applications for enterprises and startups worldwide.
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
DXWorldEXPO LLC announced today that Ed Featherston has been named the "Tech Chair" of "FinTechEXPO - New York Blockchain Event" of CloudEXPO's 10-Year Anniversary Event which will take place on November 12-13, 2018 in New York City. CloudEXPO | DXWorldEXPO New York will present keynotes, general sessions, and more than 20 blockchain sessions by leading FinTech experts.
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science" is responsible for guiding the technology strategy within Hitachi Vantara for IoT and Analytics. Bill brings a balanced business-technology approach that focuses on business outcomes to drive data, analytics and technology decisions that underpin an organization's digital transformation strategy.