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

Management server - contains a set of internal components for managing resources, processing requests, analyzing user activity and universal support for the Jelastic cluster. Usually, we recommend using a separate dedicated server, as this provides a higher level of stability and uptime. Management server components are responsible for:
Each process mentioned above is serviced by a separate subsystem, a detailed description of which will be presented in subsequent publications.
Jelastic is relatively not picky about basic resources and can be installed both on bare metal 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 split into small isolated virtual containers . A set of such containers with all the stacks necessary for a specific application forms a user environment.
When creating the environment, the requested containers are pulled from the pool with pre-prepared templates. This helps shorten the process of creating and setting up the environment in seconds.
Given that different stacks are located inside isolated containers, different layers of the application topology (load balancer, server, database, etc.) can be scaled absolutely independently. This discards the possibility of one stack affecting the other.

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

As a result, when you create a clustered application, there is a reduced risk that your application will stop working when problems arise with one of the physical servers.
Jelastic provides a unique opportunity to balance a 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, routine maintenance. At the same time, live migration does not affect the performance of applications - they remain active and receive the necessary resources.

Also, unique functionality for automatic vertical scalingIt works well with live migration, allowing applications to scale within the server without delays or compromising productivity. When one application scales (consuming more and more resources on the server), other applications can be automatically migrated to other servers, thereby freeing up resources for an actively growing application. At the same time, there is no need to reload application containers; accordingly, downtime risks of applications are reduced.
A high degree of resource utilization is achieved using a special application hibernation mode . Inactive applications, for example, which have not been accessed in the last two days, are suspended and placed in sleep mode, unloading all RAM to disk. As a result, freed resources are returned to the cluster for later use.
Being in sleep modecontainers do not consume resources (only disk space) and provide an opportunity for end consumers to save. When applications again become 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 consumers to customize the schedule of hibernations and “awakenings”.
To make resource utilization even more rational, Jelastic uses a memory deduplication mechanism . This mechanism collects statistics about the same files, which are most often requested by different containers (system libraries, application server and database files, etc.), and puts such files in the cache. As a result, a container can access the cache directly instead of a disk to receive data. This increases productivity by reducing the number of I / O operations.
Jelastic is useful in its own way for various groups of users - developers of Internet applications, medium and small businesses (who need 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 user has a certain access level and a certain way of interacting with the platform.
There are three levels of access to the Jelastic cluster:

Jelastic provides two administration panels: the Jelastic Cluster Panel (JCA) for cluster administrators (this month it is planned to open public access to a large amount of documentation on this panel), as well as 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.
The administrators of the Jelastic platform are Ops departments of companies that own installed clusters. After installation, the platform passes to their full disposal.
Using the Jelastic Cluster Admin Panel, administrators can configure basic configurations (limits, quotas, tariffs, localization, etc.), as well as perform cluster maintenance during updates or scheduled maintenance.
The four main tasks that administrators perform during the life cycle of a Jelastic cluster are:

Jelastic provides a complete set of tools and detailed instructions for the high-quality implementation of all the above tasks.
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:
In hosting installations, the developer’s activity in the Jelastic system begins with the registration and testing of functionality during the trial period. The main stages of the life cycle are presented in the diagram:

At the end of the trial period, the developers have a choice about switching to the full version, or the environments created during the test period will be automatically deleted over time.
End users are indirectly associated with the Jelastic cluster by using 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.

The external IP address is recommended for production applications, as this significantly reduces the potential risks of some applications affecting others. Also, the use of an external IP address provides access to such features as remote debugging of applications, remote backup, the use of JMX, FTP, the use of custom SSL certificates, and work with web sockets.

In this article, we briefly reviewed the internal architecture of the Jelastic platform. There are many more interesting technical details that we will describe step by step in subsequent publications.
In the meantime, 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
The main task of Jelastic is to simplify complex technical solutions, automate the routine work of administrators and developers. So, for example, today you can easily deploy complex applications written in Java, PHP and Ruby. Multilanguage support was originally built into the Jelastic architecture. In the near future also support for Node.js, Python and .Net.
Let's take a closer look at the architecture features of the Jelastic platform and the opportunities that it opens up for developers and cluster administrators.
general information
Installation Jelastic Platform-as-Infrastructure is an isolated cluster consisting of a group of servers and services that interact as a whole system, providing the ability to conveniently deploy, test, maintain and scale applications in the production.
The Jelastic cluster consists of physical servers that host virtual isolated containers dedicated to user environments and a management server for internal system services.

Management server
Management server - contains a set of internal components for managing resources, processing requests, analyzing user activity and universal support for the Jelastic cluster. Usually, we recommend using a separate dedicated server, as this provides a higher level of stability and uptime. Management server components are responsible for:
- Allocation of necessary resources (provisioning)
- Template customization (clustering, load balancing, etc.)
- Application Lifecycle Management
- Application Deployment
- Application scaling
- Processing user requests through a common resolver
- Logs and statistics
- Billing
- Business Intelligence Tools
- Health 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 metal 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 split into small isolated virtual containers . A set of such containers with all the stacks necessary for a specific application forms a user environment.
When creating the environment, the requested containers are pulled from the pool with pre-prepared templates. This helps shorten the process of creating and setting up the environment in seconds.
Given that different stacks are located inside isolated containers, different layers of the application topology (load balancer, server, database, etc.) can be scaled absolutely independently. This discards the possibility of one stack affecting the other.

Container Virtualization
Jelastic uses Parallels Virtuozzo Containers , which makes it possible to achieve very good density by the number of containers on one physical server. This is achieved through the use of virtualization at the operating system level .
This type of virtualization allows you to divide the physical server into small containers , which as a result are more densely placed within the allocated physical resources. Containers hosted on a physical server are independent Linux machines on CentOS (other versions may also be supported).
Full isolationand a high level of container protection maximizes uptime and prevents unauthorized borrowing of resources from each other. The environment with all installed containers gets complete privacy and becomes inaccessible to other users.
It is worth noting that Jelastic is the first platform that started using full container virtualization from the first days. Our closest competitors, OpenShift and CloudFoundry, have once redesigned their solutions by implementing the cgroups + SElinux and Warden pseudo-container virtualization layer, respectively. In the near future, they are waiting for another stage of architecture redesign, in which they will already be a little closer to the current Jelastic solution - both platforms will migrate to Docker. However, even with this, Jelastic will have a number of important advantages - better isolation of containers with the same efficiency of utilization of resources, the presence of live migration, as well as invaluable three-year experience in 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 using anti-affinity rules that regulate the distribution of containers across the cluster in such a way that containers of the same environment do not get to the same physical server if possible.

As a result, when you create a clustered application, there is a reduced risk that your application will stop working when problems arise with one of the physical servers.
Live migration
Jelastic provides a unique opportunity to balance a 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, routine maintenance. At the same time, live migration does not affect the performance of applications - they remain active and receive the necessary resources.

Also, unique functionality for automatic vertical scalingIt works well with live migration, allowing applications to scale within the server without delays or compromising productivity. When one application scales (consuming more and more resources on the server), other applications can be automatically migrated to other servers, thereby freeing up resources for an actively growing application. At the same time, there is no need to reload application containers; accordingly, downtime risks of applications are reduced.
Hibernation mode (sleep mode)
A high degree of resource utilization is achieved using a special application hibernation mode . Inactive applications, for example, which have not been accessed in the last two days, are suspended and placed in sleep mode, unloading all RAM to disk. As a result, freed resources are returned to the cluster for later use.
Being in sleep modecontainers do not consume resources (only disk space) and provide an opportunity for end consumers to save. When applications again become 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 consumers to customize the schedule of hibernations and “awakenings”.
Container level caching
To make resource utilization even more rational, Jelastic uses a memory deduplication mechanism . This mechanism collects statistics about the same files, which are most often requested by different containers (system libraries, application server and database files, etc.), and puts such files in the cache. As a result, a container can access the cache directly instead of a disk to receive data. This increases productivity by reducing the number of I / O operations.
Access levels
Jelastic is useful in its own way for various groups of users - developers of Internet applications, medium and small businesses (who need 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 user has a certain access level 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: the Jelastic Cluster Panel (JCA) for cluster administrators (this month it is planned to open public access to a large amount of documentation on this panel), as well as 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.
Administrators
The administrators of the Jelastic platform are Ops departments of companies that own installed clusters. After installation, the platform passes to their full disposal.
Using the Jelastic Cluster Admin Panel, administrators can configure basic configurations (limits, quotas, tariffs, localization, etc.), as well as perform cluster maintenance during updates or scheduled maintenance.
The four main tasks that administrators perform 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 high-quality implementation 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
- Deploy applications in various ways without changing code
- changing software stack settings
- vertical and horizontal scaling of applications
- testing and remote debugging applications
- application lifecycle management
- cloning and providing access to environments
- the ability to pause and start environments
- statistics analysis and log processing
- transition to the full version and account replenishment
- And so on.
In hosting installations, the developer’s activity in the Jelastic system begins with the registration and testing of functionality during the trial period. The main stages of the life cycle are presented in the diagram:

At the end of the trial period, the developers have a choice about switching to the full version, or the environments created during the test period will be automatically deleted over time.
End users
End users are indirectly associated with the Jelastic cluster by using 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:
- through a common resolver
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 entry point of the environment (load balancer, application server or database).
The external IP address is recommended for production applications, as this significantly reduces the potential risks of some applications affecting others. Also, the use of an external IP address provides access to such features as remote debugging of applications, remote backup, the use of JMX, FTP, the use of custom SSL certificates, and work with web sockets.

Summary
In this article, we briefly reviewed the internal architecture of the Jelastic platform. There are many more interesting technical details that we will describe step by step in subsequent publications.
In the meantime, 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