← All Articles

Cost of setting up and running a Rails app

Khash SajadiKhash Sajadi
Jan 31st 14Updated Jul 27th 17
Ruby on Rails

How much does it cost your business to setup and run a Rails production app?

Many want to know the cost comparison of building and managing their infrastructure with Cloud 66 vs the alternatives. We thought we should see if we can put a number on it!

What is our sample app?

For this we chose a very small production Rails app with very common requirements: scalable (load balanced, backed by a single database and protected by SSL). There is nothing special in this stack that requires specific components to be installed.

  • Framework: Rails 3
  • DB: PostgreSQL
  • Environment: Production
  • Other requirements: SSL

Heroku

Let’s see how much it is going to cost us to run this on Heroku:

  • 1x Dyno (512MB, 1x Shared CPU) = $0.05 x 730 = $36.50
  • PostgreSQL: Standard Yanari (400MB RAM, 64GB HDD) = $50
  • SSL certificate = $20

Total: $106.50 per month + $0 setup

DIY

We all know the value of automation when it comes to infrastructure and deployment. We automate things not to speed them up, but to make them repeatable, testable and less prone to human errors.

For our app, we are going to assume an experienced DevOp is going to put the needed scripts together. They can be Chef, Puppet, Ansible, Saltstack, Capistrano or anything our dev is comfortable to start and maintain within the business.

  • 1x VPS (512MB, 2x CPU) = $5
  • 1x Load Balancer = $5
  • SSL certificate = Free
  • PostgreSQL (1GB RAM, 30GB HDD) = $10
  • Maintenance and updates = $60
  • Monitoring service 3x server: $45

Total: $125.00 per month + $300 Setup

Cloud 66

Here is how much it is going to cost to do the same thing on Cloud 66.

  • 1x VPS (512MB, 2x CPU) = $5
  • 1x Load Balancer = $5
  • SSL certificate = Free
  • PostgreSQL (1GB RAM, 30GB HDD) = $10
  • Cloud 66 Charge: $19 (first server of the account) + $9 (second server of the stack)
  • Maintenance = 1x Backup = $12
  • Monitoring = Free

Total: $60 per month + $0 setup

Note: this will drop to $50 per month for the second stack as only the first server of the account is $19.

What’s the setup fee?

Assuming a salary of $60k for a web developer (you can add 50% on top of that to calculate the cost to the business). $60k is around $40 per hour for the dev ($60 per hour to the business).

We are assuming the developer involved knows everything needed and is going to write the scripts (Bash, Chef, Puppet, Ansible, Capistrano,…) following best practices.

The scripts will have to perform the following:

  • Setup the servers, web server, database server, access rights, load balancer, SSL certificate
  • Deploy the app
  • Manage the firewalls
  • Backup DBs, send them offsite and rotate them
  • Setup server protection and updates
  • Setup monitoring for new servers.

We are going to assume around 5 hours of total time spent on setting all this up for the stack: $300

What’s the maintenance and updates fee?

Doing DIY also will require around 1 hour per stack per month maintenance on average: patching servers and the framework with the latest updates, updating scripts with app requirements, managing firewalls and access rights etc.

Assumptions

  • Cloud provider: DigitalOcean or
    Vexxhost.
  • Monitoring provider: Server
    Density
  • Developer salary: $60k per year.
  • Business overhead (tax, insurance, benefits, office,…) 50%

Try Cloud 66 for Free, No credit card required