In a previous publication, we talked about the new positioning of our product, its transformation into a more comprehensive
Platform-as-Infrastructure solution, which combines the flexibility of IaaS and the convenience of PaaS. In this article we will describe the structure of the Jelastic cluster and its main components.
The main task of Jelastic is to simplify complex technical solutions, to automate the routine work of administrators and developers. So, for example, today you can easily deploy complex applications written in Java, PHP and Ruby. Multi-language support was originally incorporated into the Jelastic architecture. In the near future there will also be support for Node.js, Python and .Net.
Let's take a closer look at the features of the Jelastic platform architecture and the opportunities it opens up for developers and administrators of the cluster.
')
general information
Installation
Jelastic Platform-as-Infrastructure is an isolated
cluster consisting of a group of servers and services that interact as a complete system, providing the ability to conveniently deploy, test, maintain and scale applications in production.
The Jelastic cluster consists of
physical servers that host
virtual isolated containers allocated for user environments, and a
management server for internal system services.

Managing server
Managing server - contains a set of internal components for resource management, query processing, analysis of user activity and universal support of the Jelastic cluster. Usually, we recommend using a separate dedicated server, as this provides a higher level of stability and availability. The components of the management server are responsible for:
- Provisioning required resources
- Template configuration (clustering, load balancing, etc.)
- Application Lifecycle Management
- Deploying Applications
- Application scaling
- Processing user requests through a shared resolver
- Logs and statistics
- Billing
- Business intelligence tools
- Monitoring and Verification
Each process mentioned above is serviced by a separate subsystem, a detailed description of which will be presented in subsequent publications.
Infrastructure layer
Jelastic is relatively not picky about basic resources and can be installed both on
bare hardware and on such
IaaS solutions as OpenStack, AWS Amazon, Azure, Rackspace and others.
The number of
physical servers required for the full functioning of the cluster depends on the expected load and is negotiated before installation.
Physical servers or large virtual machines (virtualized using KVM, ESXi, Hyper-V, etc.) are further divided into small,
isolated virtual containers . A set of such containers with all the stacks necessary for a particular application forms a user environment.
When creating the environment, the requested containers are pulled from the pool with pre-prepared templates. This helps to reduce the process of creating and setting the environment to read seconds.
Considering that different stacks are placed inside isolated containers, different layers of the application topology (load balancer, server, database, etc.) can scale absolutely independently. This discards the possibility of one stack affecting others.

Container virtualization
Jelastic uses
Parallels Virtuozzo Containers , which makes it possible to achieve a very good density by the number of containers on a single physical server. This is achieved through the use of
virtualization at the operating system level .
This kind of virtualization allows you to split physical servers into small
containers , which as a result are more densely located within the allocated physical resources. Containers hosted on a physical server are independent Linux machines on CentOS (other versions may also be supported).
Full
isolation and a high level of protection of containers maximize the uptime and prevent unauthorized borrowing of resources from each other. An environment with all installed containers gets complete privacy and becomes inaccessible to other users.
It should be noted that Jelastic is the first platform, which began to use full container virtualization from the first days. Our closest competitors, OpenShift and CloudFoundry, have once again redesigned their solutions by implementing the cgroups + SElinux and Warden pseudo-container virtualization layer, respectively. In the near future, another stage of architecture redesign awaits them, in which they will already be a little closer to the current Jelastic solution - both platforms are migrating to Docker. However, even with this, Jelastic will have several important advantages - better insulation of containers with the same efficiency of resource utilization, the presence of live migration, as well as invaluable three-year experience of using containers inside the platform.High availability for applications
One of the functional features is the uniform distribution of containers of the same environment across different physical servers. This is achieved by using anti-affinity rules that regulate the distribution of containers across a cluster in such a way that the containers of the same environment do not fall on the same physical server as much as possible.

As a result, when you create a clustered application, the risk that your application will stop working if there are problems with one of the physical servers is reduced.
Live migration
Jelastic provides a unique opportunity to balance the cluster if any physical server is overloaded. This happens through
live migration . Such a solution allows for automated evacuation of containers from physical servers, if necessary, for carrying out routine maintenance. At the same time, live migration does not affect the performance of applications - they remain active and receive the necessary resources.

Also, the unique functionality of automatic
vertical scaling is perfectly combined with live migration, allowing applications to be able to scale within the server without delays and damage to productivity. When one application is scaled (consuming more and more resources on the server), other applications can be automatically migrated to other servers, thus freeing up resources for an actively growing application. There is no need to reload the application containers, thus reducing the risk of downtime of the applications.
Hibernation mode (sleep mode)
A high degree of resource efficiency is achieved using a special
hibernation mode of applications. Inactive applications, for example to which there have been no calls in the last two days, are suspended and placed in sleep mode, unloading all the RAM to the disk. As a result, the freed resources are returned to the cluster for later use.
Being in
sleep mode, containers do not consume resources (only disk space) and allow end users to save money. When applications are again requested, the platform returns them to the active state in which they were before hibernation, literally in a matter of seconds. In future releases, this functionality will be significantly expanded and will allow end users to customize the hibernation and “wake up” schedule.
Container level caching
To make the use of resources even more rational, Jelastic uses
a memory deduplication mechanism . This mechanism collects statistics about identical files, which are most often requested by different containers (system libraries, application server and database files, etc.), and places such files in cache memory. As a result, the container may directly access the cache instead of the disk for data. This increases performance by reducing the number of I / O operations.
Access levels
Jelastic in its own way is useful for various groups of users - developers of Internet applications, medium and small business (which requires scalable hosting for standard applications or SaaS), large software development companies, IT integrators, financial organizations with developed IT departments, and of course providers hosting services. Each type of Jelastic users has a certain level of access and a certain way of interacting with the platform.
There are
three levels of access to the Jelastic cluster:
- administrators
- developers or SMB
- end users

Jelastic provides two administration panels: Jelastic Cluster Panel (JCA) for cluster administrators (this month they plan to open public access to a large amount of documentation on this panel), and also a control panel (Dashboard) for developers. The presence of two control panels with separate functionality makes the Jelastic system a convenient solution for Dev and Ops teams.
Admins
Jelastic platform administrators are Ops departments of companies owning established clusters. After installation, the platform goes into their full disposal.
Using
Jelastic Cluster Admin Panel, administrators can set up basic configurations (limits, quotas, tariffs, localization, etc.), as well as conduct cluster maintenance during upgrades or maintenance.
Four main tasks that are performed by administrators during the life cycle of a Jelastic cluster are:
- Installation
- Launch
- Control
- Update

Jelastic provides a complete set of tools and detailed instructions for the qualitative performance of all the above tasks.
Developers and SMB
This group of users can create environments, deploy applications and perform all the actions necessary for the successful
life cycle of their applications . Work with environments and applications occurs mainly through
the control panel for developers.
The following are the main actions that can be performed by developers in the Jelastic system:
- creating simple and complex environments
- deploying applications in various ways without changing the code
- change software stack settings
- vertical and horizontal scaling of applications
- testing and remote debugging of applications
- application lifecycle management
- cloning and accessing environments
- the ability to pause and launch environments
- statistics analysis and log processing
- transition to the full version and account replenishment
- And so on.
In hosting installations, developer activity in the Jelastic system begins with the registration and testing of the functional during the trial period. The main stages of the life cycle are presented in the diagram:

At the end of the trial period, developers have to choose whether to switch to the full version, or the environments created during the test period will be automatically deleted over time.
End users
End users are connected to the Jelastic cluster indirectly through the
use of applications deployed by developers in their environments.
All incoming user requests are sent to the domain name of the corresponding application and processed in one of the following ways:
Jelastic uses several synchronized resolvers to simultaneously serve requests and distribute the load between them. The number of resolvers depends on the total load on the applications in the cluster.

- via an external IP if it is added to the environment entry point (load balancer, application server or database).
The outer IP address is recommended to be used for production applications, since this significantly reduces the potential risks of the influence of some applications on others. Also, the use of an external IP address allows access to such features as remote debugging of applications, remote backup, using JMX, FTP, using custom SSL certificates, working with websockets.

Summary
In this article, we briefly reviewed the internal architecture of the Jelastic platform. There are still many interesting technical details that we will describe step by step in subsequent publications.
For now, you can independently explore all the functions, power and flexibility of the Jelastic platform by registering for a
free trial period .
Corporate users can contact our
sales department and discuss the possibility of installing Jelastic inside their own data centers.
CTO, Jelastic
Ruslan Sinitsky