Docker Multi-Containers Orchestration with Live Migration and High-Availability for Microservices in Jelastic
Join the DZone community and get the full member experience.Join For Free
containers have shaken the it world providing a totally new concept of a virtualization solution for cloud paas and iaas due to their lightweight virtualization, increased density, elasticity, and rapid provisioning.
using containers within public, private or hybrid clouds give users a new degree of freedom in placing their workloads and changing their location at any time during load peaks, maintenance windows or data center availability problems. containers are much smaller in size than virtual machines (vms), so moving them from one cloud to another is far easier. this makes applications more mobile in a cloud setup and easily managed saving the time and efforts of the devops teams.
in this three-part blog series we’ll explore the main benefits of the docker template implementation within jelastic platform. we will describe how jelastic have used containers since 2011 and why we believe that our solution provides advanced containers orchestration, probably one of the best on the market at the moment.
the container system in the jelastic cloud goes hand in hand with the microservice architecture pattern. each environment within a large, complex and enterprise-ready application represents a service that can be scaled, configured and monitored separately. and if any change is required in the project, it can be easily made in the specific service without any need to rebuild and redeploy the entire application (as it is demanded in the monolithic apps). with such structure, the application can even be managed by different teams, when each is responsible only for a certain part.
one of the recent technologies underlying microservices is docker, a technology for packaging applications and deploying them in containers. the fact that microservices and docker became a perfect match inspired us to implement docker template support within jelastic .
basically, docker addresses application assembly, delivery and portability, while jelastic provides orchestration and management for hosting applications. and in order to meet the requirements of enterprise production-ready applications, jelastic delivers docker template support on top of highly secure and stable virtuozzo containers.
parallels virtuozzo containers is an operating system-level virtualization product designed for large-scale homogeneous server environments and data centers. parallels virtuozzo containers was first released under parallels’ former parent company swsoft . the linux version was released in 2001 while the windows version was released in 2005.
currently docker uses lxc and libcontainer for creating docker containers by default. these containers work based on namespaces and cgroups. the same kernel isolation mechanisms are used by containers into jelastic. that’s why we can ensure that all required processes of docker standard are covered in a proper “native” way as offered by docker implementation.
with jelastic implementation of docker , users will now have more flexibility and options while installing any stack, application or system using public docker hub registry or their own private registry based on quay enterprise registry. when a new docker is requested for installation, it is placed to a special shared cache storage (to make it easily and quickly available for further installations) and after that, already distributed as independent and isolated virtuozzo containers among hardware nodes. as a result, each docker is provisioned in secure containers virtualization and can be easily managed using full ssh root access or via jelastic dashboard.
in addition, jelastic technology provides improvements and extra functionality in the areas of density, management tools, recovery, etc. let’s cover some benefits of the dockerized applications hosted within jelastic cloud.
in the first part of our blog series we are providing the detailed information about two important benefits gained by using docker in jelastic: high availability and live migration.
jelastic provides high availability for microservices on two levels:
- application topology
- containers virtualization
load balancing within an application ensures high availability through the distribution of workload across multiple components. using multiple components with load balancing, instead of a single component, may increase reliability through redundancy. jelastic uses two types of load balancing: tcp and http.
in addition, jelastic provides an ability to use multi-cast session replication between instances of web-servers. when session replication is enabled in a cluster environment, the entire session data is copied on a replicated instance. session replication provides high reliability, scalability, and perfect failover capabilities.
jelastic cloud lets you easily set up two different types of database replication – master-slave and master-master – in order to solve a number of different problems with performance, to support database backups, to alleviate system failures and much more.
also integrated software defined storage is specifically designed for high availability of containers virtualization in the cluster. the distributed storage with built-in replication and disaster recovery ensures a fast and automatic recovery in case of a hardware node fail. in other words, if any hardware node fails all the containers will be automatically recovered on the other existing hardware nodes.
live migration and offline migration
it is one of the key features that is very important for an enterprise-ready cloud platform. cloud service providers can easily migrate containers with dockerized applications from one physical server to the other with zero downtime and that is a key requirement to maintain overall performance and quality. this increases operational efficiency during the maintenance of the hardware, provides better load balancing and data center utilization and allows moving customers to more powerful nodes, without service interruption.
jelastic’s unique automatic vertical scaling uses live migration to ensure that applications can scale within a server without downtime. as an application scales within a server, other applications can be automatically migrated to another server to make room. live migration allows jelastic to deliver all the needed resources for applications without restarting containers and causing application downtime.
in addition, during maintenance or other planned downtime of hardware the live migration feature can perform automated evacuation of containers from one hardware node to another. this makes jelastic platform the right choice for hosting even stateful applications. during live migration, applications keep working without downtime and get the required resources.
also the ability to migrate containers provide the devops teams with additional different and in many cases more efficient flow of dockerized application lifecycle. in the original version to go through all the steps of delivery lifecycle all pipeline delivery stages should be connected to the hub registry. every time you should recreate containers and sometimes the whole multi-container environment. in other words you repack and rebuild your containers every time during migration dev => test, test => stage, stage => prod. in jelastic with live or offline migration of containers, you can easily migrate the application from one lifecycle stage to the other with no need to rebuild your containers and redeploy the application, and without the need to connect each stage to the hub registry anymore after initial docker provisioning.
these application lifecycle workflows require more deeper analysis and clarification and we are going to write a separate blog post about the different issues related to this topic.
high availability and live migration are just the first two benefits that you get while using a dockerized application on top of jelastic’s platform. in our next publication you’ll find out more about isolation and security, smart distribution of docker containers among physical servers, high density and maximum utilization of server resources and hibernation and memory de-duplication technology that you gain within our system.
have you already tried docker on top of jelastic ? please provide your feedback in the comments below.
Published at DZone with permission of Tetiana Fydorenchyk, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.