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
- Switch to the Ruby language tab
- Select the application server and engine version required
- 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 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.
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)
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:
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 (Sinatra, Rack, therubyracer, Ramaze, 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.
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.
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.
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
Automatic Horizontal Scaling
Configure automatic horizontal scaling through tunable triggers that monitor nodes load changes such as an increase/decrease in their number.
- Just go to Settings > Monitoring > Auto Horizontal Scaling
- Then choose the required layer and resource to be monitored (CPU, RAM, Network, Disk I/O, Disk IOPS).
- Set the exact condition and specifics of scaling via the intuitive UI form.
Here is a list of more built-in tools and features:
- Built-in or Custom SSL
- Public IPv4 and IPv6
- A wide range of complementary software stacks, including SQL and NoSQL databases
- Container firewalls, endpoints and environment network isolation
- User-friendly UI and SSH access
- Open API and Cloud Scripting for automation
- Pay-per-use pricing model
- Collaboration for teamwork
- Multi-cloud distribution