Cloning Running Servers with Docker and CRIU by Ross Boucher
Docker
4,938 views
31 slides
Jun 24, 2016
Slide 1 of 31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
About This Presentation
Docker containers encapsulate everything you need to describe and run a process, but the lifecycle of a process remains the same: it starts, it runs for a while, and then it ends. This talk will demonstrate how to combine Docker with a tool called CRIU to “roll-back” running processes to an earl...
Docker containers encapsulate everything you need to describe and run a process, but the lifecycle of a process remains the same: it starts, it runs for a while, and then it ends. This talk will demonstrate how to combine Docker with a tool called CRIU to “roll-back” running processes to an earlier state. CRIU, which stands for Checkpoint & Restore in User Space, creates a complete snapshot of the state of a process, including things like memory contents, file descriptors, and even open tcp connections. It can be used for suspending and resuming processes, or live migrating them from one machine to another. Our developer tool, Tonic, uses it to allow developers to change their code in the middle of a program without restarting from the beginning. We’ll show how we use the Docker Remote API to do this in production thousands of times a day.
Size: 663.9 KB
Language: en
Added: Jun 24, 2016
Slides: 31 pages
Slide Content
Cloning Running Servers
Ross
Boucher
@boucher
$ node
>> 2 + 2
4
>>
Browser Server
2 + 2
4
x = 1
1
++x
2
x == 2
true
[1]
[2]
[3]
x = 1
1
++x
2
x == 2
true
[4]
[2]
[3]
(Checkpoint Restore In Userspace)
CRIU
CRIU
+
Application
Server
Evaluation
Controller
Public Internet Internal Network Isolated Network
Container PoolUser’s Browser
Primary Docker Eval Docker
2 + 2
4
(and other potential use cases)
Container Migration
!Pre-compiled Release (based on Docker 1.10)
!Checkpoint/Restore Pull Request
!Saied Kazemi’s Linux Plumber’s Talk
!CRIU Homepage
!DockerCon Doom Demo
!Tonic Blog on checkpoint/restore
!DockWorker on Github
!Using P.Haul with Docker
!DockerScript is a cool tool we use to manage our images
Further Reading