Making mistakes can't be avoided. Everyone makes them and you need to learn from them or be cursed to repeat them again and again. A shortcut to making mistakes is to try to learn from mistakes other people make so you don't have to deal with them yourself. When it comes to Rails hosting there are two main classes of mistakes - technical and business (or people). Technical mistakes are more common and easier to fix so I'm going to focus on some that I see time and time again.
A technical mistake occurs when a developer writes code that causes the computer to do something differently than what they were hoping for. A simple example is when someone writes code to add they somehow 5 + 1 = 7, not quite the right answer. The source of these mistakes are commonly from the developer not understanding how a piece of technology works and using it incorrectly. These mistakes, called bugs in the software industry, are in every single computer program in the world.
The first common technical mistake is a poor choice in a hosting provider. With Rails hosting, you really want to get a high quality provider so your application stays online. They should also know how to run the application efficiently, which means giving you the resources you need for it.
The second mistake I see often is that the application is not being watched carefully enough to make sure it's still running. This is called process monitoring. All that it does is check in on your application and make sure that it's still running within the boundaries of "good". Without this, you will never know how it's working or even if the application is still working. In the extreme cases, I've seen sites go offline for days without anyone knowing what happened. This ties in with the first mistake, the better hosts will give you a process monitoring system or add your site into their own system for you.
Another common technical mistake has to do with how you are using your database. If your application code has fast database queries written for it, then it should perform well even as the application is used more and more. If you have slow database queries, then it will be like driving on ice: you might get there but it will be slow and you might hurt someone. If you use a tool like New Relic, you should be able to find these slower queries before it's too late.
The previous mistakes are all about the server and application code. There is another mistakes many people make that affects every single visitor to your site. That is having too many and too large of files sent to the browser. These include things like JavaScript, CSS, and image files. Typically when a visitor first comes to your site, they have to download every single one of these files. This might cause them to wait and could even have them leaving the site before even one page loads. The solution is to look into ways to shrink the file sizes and reduce the number of files you need to send to a visitor, especially on their first visit.
The final mistake I see is probably the worst one and can cause the most problems in a team. The mistake is not having an automated deployment process in place. To do this, you need to setup a free tool like cap and write a little bit of code that describes how your Rails hosting servers are configured. Then with a single command you can do an update on every server. Without this script, everyone on the team will have their own special way of deploying and I'd guarantee that people will miss steps or forget to do something vital. Probably right before you get a bunch of traffic to your site and cause a crash.
These are just a few of the common technical mistakes I've seen when hosting Rails sites. Is your team making some of these?
Author Resource:
There are quality rails hosts out there you can use to help prevent some of these mistakes. IX Web Hosting Rails is a good example of one you can use.