Ruby PaaS Hosting

Ruby is a popular, open source programming language. It is considered both powerful and practical because it is a natural and easy to read/write syntax. Ruby provides a unique object-oriented language and aims for simplicity. Ruby provides operator overloading, exception handling, iterators and closures, basic & special object-oriented features, garbage collection, and more. Ruby PaaS provides an out-of-box integration of the Ruby web servers. Ruby provides all the management and automatization tools like Ruby on Rails for convenient Ruby application development.

We are partnering with Jelastic to provide these features of the Ruby hosting.

Ruby PaaS Environment Hosting

This is how you use the powerful and intuitive topology wizard to set up the hosting of a new environment in the Togglebox UI.

  1. Switch to the Ruby language tab
  2. Select the application server and engine version required
  3. Add software stacks as required. (If needed, adjust other parameters, such as cloudlets (RAM and CPU), disk space, Public IPv4/IPv6, node count, etc.)

ruby versions

These are completely isolated and fully independent containers.
Scaled out nodes are automatically distributed across the VMs, ensuring high availability.

Ruby PaaS Application Servers

Ruby application servers are based on the Apache and NGINX software stacks.

Both utilize the Ruby on Rails framework for implementing web applications and the Passenger application server by default.

The NGINX Ruby stack can be easily configured to work with different inbuilt servers:

  • Passenger – a feature-rich application invaluable for the modern web apps and microservice APIs
  • Puma – oriented on speed and parallelism due to fast and accurate HTTP 1.1 protocol parsing
  • Unicorn – an HTTP server, which takes advantage of the Unix/Unix-like kernels features (low-latency, high-bandwidth connections)

Ruby PaaS Versions

You can easily change your Ruby version. This is a weekly updated Software Stack Versions document for reference.

Select the required version of Ruby and adjust it for the existing instances via container redeployment.

Ruby Application Deployment

The deployment process is automated for the managed Apache Ruby and NGINX Ruby application servers using:

  • application archive uploaded from the local machine or via external URL
  • remote VCS repository (e.g. GitHub)

ruby application deployment

When deploying a Ruby application, only a single context (ROOT) can be used.

You can select from three Deployment Types (i.e. RAILS_ENV) for it:

  • development – reloads all application classes and turns off caching (allows a faster development cycle)
  • production – turns on all caching
  • test – wipes out database between test runs

You can switch between using the drop-down list next to your application:

ruby deployment types

These related documents explain the deployment of the Ruby applications further:

Ruby Dependency Management

Bundler dependency manager automatically tracks and installs the exact gems and versions your project requires.

If the project has a Gemfile file in the root folder, dependencies with Bundler  are automatically resolved.

Any Ruby framework can be included in your Gemfile (SinatraRacktherubyracerRamaze, etc.)

You can also utilize Ruby on Rails available by default.

This Ruby Dependency Management documentation provides additional information.

Ruby Post Deploy Configuration

A rake_deploy file (located in the root folder of the project) can be created for any automated or repetitive actions.

A  provided list of commands will be executed via the rake tool after each restart of the Apache/NGINX node.

After successful execution, the rake_deploy file is automatically removed.

Refer to Ruby Post Deploy Configuration for additional information.

Domains Management

Provide a custom domain name for your Ruby application.

Based on the environment topology, you should use:

  • CNAME redirect if using Shared Load Balancer; is recommended for dev and test environments
  • DNS A Record if using Public IP; can handle high traffic load and is suitable for production environments

To redirect customers to the newer application version without downtime, use the swap domains functionality.

It is also available as the SwapExtIps API/CLI method.

ruby application custom domain

Automatic Vertical Scaling

We provide the exact amount of resources (RAM and CPU) required by your nodes according to the current load.

Once you have set the required cloudlets limit (128 MiB of RAM and 400 MHz of CPU each) everything else will be handled automatically.

ruby automatic vertical scaling

Pay-per-Use ensures that you never overpay for unused resources  because the platform eliminates the need to handle the load-related adjustments or perform architectural changes manually.

pay per use ruby hosting

Automatic vertical scaling provides additional information.

Manual Horizontal Scaling

Horizontal scaling requires selecting the required number of nodes between two scaling modes:

  • Stateless – simultaneously creates all new nodes from the base image template
  • Stateful – sequentially copies file system of the master container into the new nodes

ruby horizontal scaling

load balancer instance is automatically added upon Ruby server scaling.

Automatic Horizontal Scaling

Configure automatic horizontal scaling through tunable triggers that monitor nodes load changes such as an increase/decrease in their number.

  1. Just go to Settings > Monitoring > Auto Horizontal Scaling
  2. Then choose the required layer and resource to be monitored (CPURAMNetworkDisk I/O, Disk IOPS).
  3. Set the exact condition and specifics of scaling via the intuitive UI form.

ruby automatic horizontal scaling

Here is a list of more built-in tools and features: