Ruby is a popular, open source programming language with a powerful and practical, yet natural and easy to read/write syntax. Ruby combines the best practices from various solutions to provide a unique object-oriented language, which aims for simplicity and provides such features as basic & special object-oriented features; operator overloading; exception handling; iterators and closures; garbage collection, and more.
CirrusGrid PaaS provides an out-of-box integration of the Ruby web servers, providing all the management and automatization tools (e.g. Ruby on Rails web-development framework) for comfortable hosting and maximally convenient Ruby application development.
In this article, we’ll go through the distinctive features of the Ruby hosting and introduce the Ruby-related possibilities within CirrusGrid PaaS.
CirrusGrid PaaS provides a powerful and intuitive topology wizard to set up the hosting of a new environment.
Switch to the Ruby language tab, select the required application server and engine version, add any other software stack required. If needed, adjust other parameters, such as cloudlets (RAM and CPU), disk space, Public IPv4/IPv6, node count, etc.
Note: All instances are completely isolated and fully independent containers. Additionally, scaled out nodes are automatically distributed across the physical servers (or VMs), ensuring high availability.
CirrusGrid PaaS provides Ruby application servers based on the Apache and NGINX software stacks. Both ones are configured to utilize the Ruby on Rails framework for implementing web applications and the Passenger application server by default.
Herewith, if needed, the NGINX Ruby stack can be easily configured to work with different inbuilt servers:
The following Ruby versions are supported at the moment:
You can select the required version of Ruby via the topology wizard during the creation of a new environment, as well as adjust it for the existing instances via container redeployment.
CirrusGrid PaaS automates the deployment process for the managed Apache Ruby and NGINX Ruby application servers using:
When deploying a Ruby application, only a single context (ROOT) can be used. However, you can select from three Deployment Types (i.e. RAILS_ENV) for it:
If needed, you can switch between the Ruby deployment types via the appropriate drop-down list next to your application (see the image below).
Read the related documents to learn more about the deployment of the Ruby applications:
All Ruby instances within CirrusGrid PaaS are provided with the Bundler dependency manager for automatic tracking and installing the exact gems and versions, which your project requires. If the project has a Gemfile file in the root folder, it will automatically resolve dependencies with Bundler after deployment to the server without you having to perform any manual intervention.
Also, if needed, you can include any Ruby framework into your Gemfile (Sinatra, Rack, therubyracer, Ramaze, etc.) or utilize Ruby on Rails – one of the most popular frameworks for developing and implementing web application, which is available by default.
Refer to the Ruby Dependency Management documentation for additional information.
In order to automate the repetitive actions that Ruby projects need to perform after the application is deployed (e.g. db:migrate), a rake_deploy file (located in the root folder of the project) can be created.
The file should contain a list of commands (each one from a new line) that will be executed consecutively via the rake tool after each restart of the Apache/NGINX node. After successful execution, the rake_deploy file is automatically removed. Refer to the Ruby Post Deploy Configuration documentation for additional information.
You can provide a custom domain name for your Ruby application to be used instead of the default one. Based on the environment topology, you should use:
To switch traffic from one environment to another (e.g. to redirect customers to the newer application version without downtime), the swap domains functionality should be used. It is also available as the SwapExtIps API/CLI method.
One of the key-features of CirrusGrid PaaS is dynamic provisioning of the exact amount of resources (RAM and CPU) required by your nodes according to the current load with no manual intervention. Just set the required cloudlets limit (128 MiB of RAM and 400 MHz of CPU each) for your Ruby application server and everything else will be handled by the platform automatically.
As a result, you automatically benefit on a truly user-oriented Pay-per-Use charging approach and don’t need to guess or predict the incoming load. It ensures that you never overpay for unused resources and save your time because the platform eliminates the need to handle the load-related adjustments or perform architectural changes manually.
Refer to the automatic vertical scaling documentation for additional information.
Horizontal scaling via CirrusGrid PaaS is as simple as selecting the required number of nodes via corresponding section in the topology wizard. Additionally, you can choose between two scaling modes:
Note: For the proper distribution of requests, a load balancer instance is automatically added upon Ruby server scaling.
The maximum number of the same-type servers within a single environment layer depends on a particular hosting provider settings (usually this limit stands for 16 nodes and can be enlarged by sending the appropriate request to support).
You can configure automatic horizontal scaling for your Ruby environment through tunable triggers, which monitor the changes in the nodes load and increase/decrease their number appropriately.
The process is simple, access the environment Settings > Monitoring > Auto Horizontal Scaling section, 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.
In addition, hosting at CirrusGrid PaaS allows using other built-in tools and features, for example:
Get your free trial account and start exploring Ruby hosting benefits within CirrusGrid multi-cloud platform for your own applications!
Powered by BetterDocs
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.