Seamless transition of containers

83 views
Skip to first unread message

Arti

unread,
Aug 10, 2015, 9:01:56 PM8/10/15
to CoreOS Dev
Hi:

I would like to understand how would we acheive seamless transition of containers from one machine to another machine.  Also how can we port IP addresses also. E.g. if container1 is moved from machine1 to machine2, we shall checkpoint the image and move to another machine where we can restart it, but then how same IP address is ported from machine1 to machine2?  Would it be a seamless transition or some disruption of service be seen. 

Please share your thoughts.

Cheers!
Arti

Brandon Philips

unread,
Aug 11, 2015, 6:37:55 PM8/11/15
to CoreOS Dev
Hello Arti-

checkpoint and restart of containers is a tricky business and requires coordination with your network fabric to move the IP address of the container around too. If your application is able to be replicated and is stateless you can rely on something like kuberentes's replication controllers and services to run multiple copies of your application and load balance them. That way if a single copy on machine1 is stopped there are additional copies to serve up traffic.

Can you perhaps explain your application further?

Brandon

Arti

unread,
Aug 12, 2015, 12:36:37 AM8/12/15
to CoreOS Dev
Thanks, Brandon. I guess with this solution you proposed, IP addresses shall change. Isnt it?  So in mutli-tenancy environment if IP addresses change that would not be such a clean solution. So actually you are asking to create a HA pair or cluster of containers servicing same request, so if one goes down another one takes up. 

Another way is, having a service as in dstributed DNS in front of containers, so it would resolve IP addresses dynamically for clients, as containers move from one machine to another, so let client service be IP agnostic.

I was thinking of solution as in vMotion provides where hot migration of VMs is provided, can we do with containers?

I am just working on some hobby projects based on cluster of containers with distributed architecture. Hence had a question in mind.

Brandon Philips

unread,
Aug 14, 2015, 6:15:30 PM8/14/15
to CoreOS Dev
Hello Arti-

Something like vMotion is more useful when thinking about full operating systems. When thinking about applications there is often times load balancing and service discovery to help.

In Kubernetes the stable "ip:port" combination is solved orthogonally to the "ip:port" of individual instances of an applications. So, imagine that I have a backend web service running in a container and I have three copies each listening on 10.0.0.1:8010.0.0.2:80, and 10.0.0.3:80. To get traffic to those instances it would be good to have a fault-tolerant load balancer handling traffic to handle health checks and machine failures.

So, in kubernetes you would define a "service" which would load balance across these container instances and if one of the containers fails a new one will be created to replace it, and in general the service remains available in the face of failure or migration.

Here are the relevant docs: http://kubernetes.io/v1.0/docs/user-guide/services.html#services-in-kubernetes

That isn't to say "vMotion" for containers isn't useful. If you have a hot cache you don't want to lose, or a heavily stateful application it can be useful. But, in a large number of cases the kubernetes strategy works.

Brandon

Arti

unread,
Aug 16, 2015, 11:46:03 PM8/16/15
to CoreOS Dev
yes, Brandon. I have been reading about Kubernetes how it helps for this usecase when it is a stateless application; for stateful app vMotion could be more appropriate.  Thanks for detailed information.

Jörn Franke

unread,
Aug 17, 2015, 12:48:19 AM8/17/15
to CoreOS Dev


I would not agree fully with this statement. You can do similar things as in vmotion, but have to do a lot of plumping yourself. Probably a Jira for a.new feature makes sense so one can think it end to end from a coreos perspective. It could be as a start just some verified description of manual work, which could later be translated into an automated solution.

Arti K

unread,
Aug 17, 2015, 3:54:31 AM8/17/15
to CoreOS Dev
hey Jorn:

Could you please tell me which statement are you referring to?  Is it using vMotion to do stateful application transfer when it is containerized? 

I have used vMotion for VM transfer but not containers transfer. Hence I was just going to read some information if I could find it how we can move containers if we have a stateful application running in it as how one can do using vMotion for VM since Brandon mentioned.

I guess it is not yet there, so it could be a new feature request. I would open a Jira ticket for it and work on it.

Please let me know.

Arti
Reply all
Reply to author
Forward
0 new messages