Choosing a VDS Hosting for a Ruby on rails Project


    From the experience of other rails, it is known that for hosting rails-projects you need VDS hosting.
    Knowledgeable people suggest that from openVZ and Xen , Xen is better.

    Task conditions: find an inexpensive VDS hosting option Xen.

    After a short search, they chose

    • Large selection of tariffs
    • Connection within 24 hours from receipt of payment
    • Connection to a host network 1000 mbps full-duplex, 1 IP address
    • Shared internet connection 100 mbps unlimited
    • Guaranteed allocation of resources (processor, memory, disk) without overselling
    • Installation and configuration of the operating system
    • All administrator privileges (root access)
    • Ability to install your own operating system kernel
    • Xen-based paravirtualization and hardware-based virtualization based on Xen and KVM
    • Preinstalled software (presets)
    • Service Level Agreement (SLA) with compensation
    • Guaranteed service availability over 99.5%
    • Replacing faulty equipment within 1 hour
    • Storage Area Network (SAN)
    • RAID1 Disk Mirroring

    Hosting purchase

    Consists of simple steps:
    • Choose tariff
    • Pay (there are many ways, we transferred via Sber, 4 days)
    • After payment you will receive a letter specifying the distribution and preset - select and wait a couple of hours :)

    Domain registration

    Since truevds only deal with VDS, you need to register a domain yourself. We calculated how much it costs to register on : 620 rubles in the org zone + 600 Primary-Standard dns + 150 Secondary dns = 1370 rubles / year for domain registration only. When buying a hosting for a year, Sveb starts with a SX-2 tariff, the domain is given as a gift, plus a convenient admin panel.


    VDS we have tru :) Even Tru-12. It runs .
    And is Svebovsky sx-2.
    Total: 180 * 12 + 1440 = 3600 per year.

    NB: they found a sane registrar (by the way, their sweb is registered). .org for 440 per year, primary and secondary dns free

    Software installation

    You can take the Ruby on Rails production preset, but for the freshness of the software it is better to install everything yourself.
    We took debian .
    Ruby we need is not simple, but Enterprise Edition
    1. Download the latest version
    2. Unpack and install
    3. Set up Ruby EE as ruby ​​by default in / etc / environmen:

    PATH = "/ opt / ruby-enterprise-xxx / bin: / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / sbin: / bin: / usr / games"
    You can and so:
    sudo ln -s / opt / ruby-enterprise / bin / ruby ​​/ usr / bin / ruby
    sudo ln -s / opt / ruby-enterprise / bin / gem / usr / bin / gem
    sudo ln -s / opt / ruby-enterprise / bin / rake / usr / bin / rake

    Installing and Configuring nginx
    Ruby EE itself installs nginx and passender for it.
    Habra help
    Config to run nginx
    Install postresql
    sudo aptitude install postgresql-server postgresql-server-dev

    NB: postgresql-server-dev is needed to build gem postgres

    For example, you need to create a database under redmine.
    Create a user and a database under redmine (username and database redmine)
    1. sudo su postgres
    2. #createuser redmine --no-superuser --no-createdb --no-createrole --login - --encrypted -pwprompt
    3. #createdb --owner = redmine --encoding = utf-8 redmine
    4. #exit

    Configure , fighting with a long application downloading

    long loading nginx rails
    5.8. Resource control and optimization options

    5.8.3. passenger_pool_idle_time - here indicate the unload time when idle (0 - do not unload)

    Comments, additions are welcome :)

    Also popular now: