Skip to content
This repository
100644 171 lines (134 sloc) 6.656 kb
0b8aa412 »
2010-09-21 merged virga1 and master
1 ==========
2 Lantorrent
3 ==========
5 Lantorrent is a file distribution protocol integrated into the Nimbus
6 IaaS toolkit. It works as a means to multi-cast virtual machine images
7 to many backend nodes. The protocol is optimized for propagating
8 virtual machine images (typically large files) from a central repository
9 across a LAN to many virtual machine monitor nodes.
11 Lantorrent works best for the following scenarios:
13 1) large file transfers (VM images are typically measured in gigabytes)
14 2) local area switched network (typical for data center computer racks)
15 3) file recipients are willing peers.
16 4) many endpoints request the same file at roughly the same time
18 -----------------
19 Protocol overview
20 -----------------
22 When an endpoint wants a file it submits a request to a central agent.
23 This agent aggregates request for files so that they can be sent out in
24 an efficient single multi-cast session. Each request for a source file
25 is stored until either N request on that file have been made or N'
26 seconds have passed since the last request on that source file has been
27 made. This allows for a user to request a single file in several
28 unrelated session yet still have the file transfered in an efficient
29 multi-cast session.
31 Once N requests for a given source file have been made or N' seconds
32 have passed the destination set for the source file is determined. A
33 chain of destination endpoints is formed such that each node receives
34 from and sends to one other node. The first node receives from the
35 repository and send to a peer node, that peer node sends to another,
36 and so on until all receive the file. In this way all links of the
37 switch are utilized to send directly to another endpoint in the switch.
38 This results in the most efficient transfer on a LAN switched network.
40 Often times in a IaaS system a single network endpoint (VMM) will want
41 multiple copies of the same file. Each file is booted as a virtual
42 machine and that virtual machine will make distinct changes to that file
43 as it runs, thus it needs it own copy of the file. However that file
44 does not need to be transfered across the network more than once.
45 Lantorrent will send the file to each endpoint once and instruct that
46 endpoint to write it to multiple files if needed.
48 -----------------------------
49 Enabling Lantorrent in Nimbus
50 -----------------------------
aa6a4177 »
2010-10-30 Improve LANTorrent docs, and sync HTML and README
52 Lan torrent is part of the Nimbus distribution as of Nimbus 2.6.
53 However, due to system administrative overhead it is not enabled by
54 default. To enable Lantorrent in Nimbus there are a few configurations
0b8aa412 »
2010-09-21 merged virga1 and master
55 changes that must be made.
aa6a4177 »
2010-10-30 Improve LANTorrent docs, and sync HTML and README
57 The following software is required on both service and VMM nodes:
58 - python 2.4
59 - python simplejson
eed27d22 »
2010-10-07 Add a note about dependencies
aa6a4177 »
2010-10-30 Improve LANTorrent docs, and sync HTML and README
61 Lantorrent is run out of xinetd thus it must also be installed on all VMMs.
63 To install LANTorrent you must take the following steps:
65 1) edit $NIMBUS_HOME/nimbus-setup.conf
0b8aa412 »
2010-09-21 merged virga1 and master
66 change lantorrent.enabled: False -> lantorrent.enabled: True
aa6a4177 »
2010-10-30 Improve LANTorrent docs, and sync HTML and README
68 2) edit $NIMBUS_HOME/services/etc/nimbus/workspace-service/other/common.conf
0b8aa412 »
2010-09-21 merged virga1 and master
69 change the value of propagate.extraargs:
70 propagate.extraargs=$NIMBUS_HOME/lantorrent/bin/lt-request
72 be sure to expand $NIMBUS_HOME to its full and actual path.
aa6a4177 »
2010-10-30 Improve LANTorrent docs, and sync HTML and README
74 3) install lantorrent on VMM
0b8aa412 »
2010-09-21 merged virga1 and master
75 - recursively copy $NIMBUS_HOME/lantorrent to /opt/nimbus/lantorrent.
76 - run ./ on each node
77 either run it as your workspace control user or specify the workspace
78 control user as the first and only argument to the script.
aa6a4177 »
2010-10-30 Improve LANTorrent docs, and sync HTML and README
80 4) install lantorrent into xinetd
81 - the script creates the file lantorrent. This
0b8aa412 »
2010-09-21 merged virga1 and master
82 file is ready to be copied into /etc/xinetd.d/. Once this is done
83 restart xinetd (/etc/init.d/xinetd restart).
495ba905 »
2010-10-06 lantorrent patches so it will work with older versions of python
85 5) change the propagation method.
86 - edit the file:
87 $NIMBUS_HOME/services/etc/nimbus/workspace-service/other/authz-callout-ACTIVE.xml
89 and change:
90 <property name="repoScheme" value="scp" />
91 to:
92 <property name="repoScheme" value="lantorrent" />
aa6a4177 »
2010-10-30 Improve LANTorrent docs, and sync HTML and README
94 6) restart the service: $NIMBUS_HOME/bin/nimbusctl restart
96 7) [optional] if the path to Nimbus on the workspace control nodes (VMMs)
0b8aa412 »
2010-09-21 merged virga1 and master
97 is not /opt/nimbus you will also need to edit a configuration file on
98 all backends.
100 In the file:
101 <workspace control path>/control/etc/workspace-control/propagation.conf
103 make sure the value of:
105 lantorrentexe: /opt/nimbus/bin/
3eb657a3 »
2010-10-10 Fix typo
107 points to the proper location of you script. This should
0b8aa412 »
2010-09-21 merged virga1 and master
108 be a simple matter of changing /opt/nimbus to the path where you chose
109 to install workspace control.
111 ----------------
112 Protocol details
113 ----------------
115 requests
116 --------
118 transfer
119 --------
121 A transfer from one peer to another is performed for forming a TCP
122 connection. A json header is first sent down the socket describing the
123 transfer. It describes the files where data must be written, and the
124 other endpoints where the data must be sent. As data comes in the
125 server will store it to one or more files and forward it on to another
126 endpoint. All of this information is contained in the header. The
127 header has the following format:
129 {
130 host
131 port
132 length
133 requests = [ {filename, id, rename}, ]
134 destinations =
135 [ {
136 host
137 port
138 requests = [ { filename, id, rename } ]
139 block_size
140 }, ]
141 }
143 When the server forms a connection with the next endpoint it will form
144 another header by removing the first entry of the destination list and
145 using the values contained in it as root level values in the header
146 described above. If the destination list is empty then the server is the
147 last in the chain and no forwarding is needed.
149 After the header is sent the binary payload (the contents of the file)
150 is sent down the socket.
152 The 'requests' value of the json header contains destination
153 information. Each filename in the list is a file where data should be
154 written. The value of id is the id of the request for that file. The
155 value of rename is a boolean which determines if the file should be
156 first written to a temporary location and then moved to the final
157 location once all of the data is received. This feature is helpful in
158 monitoring file completion.
160 security
161 --------
163 Each connection to a lantorrent peer comes with a json header. Directly
164 following that header is a line of text in the following format:
165 EOH : <signature>
167 The value of signature is the hmac signature of everything that came
168 before the literal EOH. The password for that signature is found in the
169 lt.ini file. Every endpoint and the master repo must have the same
170 value for that password.
Something went wrong with that request. Please try again.