colo-proxy in qemu
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to cache and compare net packets.This module is one of the important components of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.
## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service) project is a high availability solution. Both Primary VM (PVM) and Secondary VM (SVM) run in parallel. They receive the same request from client, and generate responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand) is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLO
By the needs of capturing response packets from PVM and SVM and finding out whether they are identical, we introduce a new module to qemu networking called colo-proxy.
This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on
SN - Secondary Node, the host which SVM runs on
## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.
== Workflow ==
+--+ +--+
|PN| |SN|
+-----------------------+ +-----------------------+
| +-------------------+ | | +-------------------+ |
| | | | | | | |
| | PVM | | | | SVM | |
| | | | | | | |
| +--+-^--------------+ | | +-------------^----++ |
| | | | | | | |
| | | +------------+ | | +-----------+ | | |
| | | | COLO | | (socket) | | COLO | | | |
| | | | CheckPoint +---------------------> CheckPoint| | | |
| | | | | | (6) | | | | | |
| | | +-----^------+ | | +-----------+ | | |
| | | (5) | | | | | |
| | | | | | | | |
| +--v-+--------------+ | Forward(socket) | +-------------+----v+ |
| |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | |
| | +-----+------+ | | +-----------------+ | |
| | | Compare(4) <-------+(3)+---------+ COLO Proxy | |
| +-------------------+ | Forward(socket) | +-------------------+ |
++Qemu+-----------------+ ++Qemu+-----------------+
| ^
| |
| |
+--------v-+--------+
| |
| Client |
| |
+-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy. (4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to client and drop SVM's packets, otherwise, just send PVM's packets to client and drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint
### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking into QEMU, we found that SLIRP
http://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can help use to handle the packet written to/read from backend(tap) device which is just like a link layer(L2) packet.
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and SVM on Primary QEMU, and then compare the packet payload for each connection.
Quoted 117 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on
SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.
Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.
Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
- What if application generate packet based on hwrng device? This will produce always different packets.
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.
Thanks
Quoted 127 lines · Jason Wang
Quoted 117 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.
Quoted 8 lines
Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
We will do most of the setup works automatically in qemu as possible as we can. Compared with kernel proxy scheme, it is not a big deal. :)
Quoted 4 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
- What if application generate packet based on hwrng device? This will produce always different packets.
Yes, that is really a big problem, actually, we have discussed it for many times, it seems that there is no perfect way to solve it. :( We have a compromise approach, when we find there are too many continuous checkpoint requests, we switch COLO from normal mode to periodic mode which SVM will stop running.
(Dave have realized this before, which called Hybrid mode. The patches is "[RFC/COLO: 0/3] Hybrid mode and parameterisation")
Quoted 3 lines
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
Hmm, it seems to be a good idea, maybe we can add a checkpoint request command in COLO to support more packets comparing scheme ...
Thanks,
zhanghailiang
Quoted 7 lines
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.
Thanks
.
Quoted 136 lines · zhanghailiang
Quoted 135 lines · Jason Wang
Quoted 120 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send
adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then
compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed (6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
Quoted 7 lines
Quoted 3 lines
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
We will do most of the setup works automatically in qemu as possible as we can.
Compared with kernel proxy scheme, it is not a big deal. :)
Yes, but what I mean is for host. E.g setting up network like bridge or others.
Quoted 6 lines
Quoted 5 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
- What if application generate packet based on hwrng device? This will produce always different packets.
Quoted 8 lines
Yes, that is really a big problem, actually, we have discussed it for many
times, it seems that there is no perfect way to solve it. :( We have a compromise approach, when we find there are too many continuous checkpoint requests, we switch COLO from normal mode to periodic mode which SVM will stop running.
(Dave have realized this before, which called Hybrid mode. The patches is "[RFC/COLO: 0/3] Hybrid mode and parameterisation")
Aha, I see. Thanks for the pointer.
Quoted 9 lines
Quoted 4 lines
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
Hmm, it seems to be a good idea, maybe we can add a checkpoint request command
in COLO to support more packets comparing scheme ...
Yes, then when to synchronize could be determined by external program. (Just an idea FYI).
Quoted 13 lines
Thanks,
zhanghailiangQuoted 7 lines
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.
Thanks
.
Quoted 115 lines · Jason Wang
Quoted 114 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.
Quoted 6 lines
Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.
Thanks for review ~
Quoted 8 lines
Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
-We don't need to run as privileged user, colo-proxy just run like filter-buffer. usage: primary: -netdev tap,id=bn0 -device e1000,netdev=bn0 -object colo-proxy,id=f0,netdev=bn0,queue=all,side=primary,host=3.3.3.8,port=xxx secondary: -netdev tap,id=bn0 -device e1000,netdev=bn0 -object colo-proxy,id=f0,netdev=bn0,queue=all,side=secondary,server=tcp:xxxx:port
Quoted 2 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
colo-proxy in qemu space don't support vhost. people who want to use colo must disable vhost, but virtio-net is another choice which is enough in most case.
Quoted 2 lines
- What if application generate packet based on hwrng device? This will produce always different packets.
just like hailiang said.
Quoted 3 lines
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
-we just need the some capabilities(such as IP frag/defrag) of SLIRP。 We have investigated some open source userspace stack,but not find one better to SLIRP. if you know,please tell me.
Quoted 2 lines
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.
-We think preventDOS from guest is out of our focus,it should be firewall to concerned.
Quoted 3 lines
Thanks
.
Quoted 136 lines · Tkid
Quoted 118 lines · Jason Wang
Quoted 117 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send
adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then
compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed (6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.Quoted 6 lines
Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.Thanks for review ~
Quoted 8 lines
Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
Quoted 6 lines
-We don't need to run as privileged user, colo-proxy just run like filter-buffer. usage: primary: -netdev tap,id=bn0 -device e1000,netdev=bn0 -object colo-proxy,id=f0,netdev=bn0,queue=all,side=primary,host=3.3.3.8,port=xxx
secondary: -netdev tap,id=bn0 -device e1000,netdev=bn0 -object colo-proxy,id=f0,netdev=bn0,queue=all,side=secondary,server=tcp:xxxx:port
Ok.
Quoted 5 lines
Quoted 2 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
colo-proxy in qemu space don't support vhost. people who want to use colo must disable vhost, but virtio-net is another choice which is enough in most case.
Ok for function but not for performance :) There're lots of users that cares about performance.
Quoted 9 lines
Quoted 2 lines
- What if application generate packet based on hwrng device? This will produce always different packets.
just like hailiang said.
Quoted 3 lines
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
-we just need the some capabilities(such as IP frag/defrag) of SLIRP。 We have investigated some open source userspace stack,but not find one better to SLIRP. if you know,please tell me.
I think it's ok to use SLIRP. But it has some drawbacks:
- Lacking ipv6 support. Which means you need implement this (there're rfc posted in the list) even if you may only want the (de)fragmentation.
- Not used in any production environment AFAIK, so maybe buggy and you need to fix the bugs.
So if possible choosing an certified ip stack which may save lots of attentions.
For userspace IP implementation, not very familiar, google gives me this something like uip, lwip and libuinet.
Quoted 5 lines
Quoted 2 lines
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.
-We think preventDOS from guest is out of our focus,it should be firewall to concerned.
Maybe net clear for the question. I mean e.g if you need to track the state of each connection, is there a limitation of the maximum connections that is accepted?
If yes, what if guest have more connections than this, switch to periodic mode?
If no, guest could exhaust the host memory by faking connections in guest.
Quoted 5 lines
Quoted 4 lines
Thanks
.
Quoted 127 lines · * Jason Wang ([email protected]) wrote:
Quoted 117 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on
SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.
Quoted 8 lines
Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
It's certainly easier than the current COLO code that relies on a very complex set of bridges, extra network interfaces and kernel modules. UMU (cc'd) have been working on a libvirt set that starts COLO up, although one bit that's very messy is the curretn kernel based network comparison code.
Quoted 4 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
- What if application generate packet based on hwrng device? This will produce always different packets.
Yes, there are cases this happens - COLO's worst case is similar to simple checkpointing (because it has a limit to the smallest checkpoint), but it's best case is much better, on a compute heavy load, it ends up taking a checkpoint very rarely.
Actually the big problem is where randomness occurs in unexpected places, e.g. where things like Perl's hash randomisation means that the two hosts produce the same data in different orders.
Quoted 5 lines
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.
The guest can only break it's own networking; so shooting itself in the foot is no big deal.
Dave
Quoted 2 lines
Thanks
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 131 lines · Dr. David Alan Gilbert
Quoted 130 lines · * Jason Wang ([email protected]) wrote:
Quoted 117 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on
SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
Quoted 8 lines
Quoted 3 lines
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
It's certainly easier than the current COLO code that relies on a very complex set of bridges, extra network interfaces and kernel modules. UMU (cc'd) have been working on a libvirt set that starts COLO up, although one bit that's very messy is the curretn kernel based network comparison code.
Ok.
Quoted 11 lines
Quoted 4 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
- What if application generate packet based on hwrng device? This will produce always different packets.Yes, there are cases this happens - COLO's worst case is similar to simple checkpointing (because it has a limit to the smallest checkpoint), but it's best case is much better, on a compute heavy load, it ends up taking a checkpoint very rarely.
Actually the big problem is where randomness occurs in unexpected places, e.g. where things like Perl's hash randomisation means that the two hosts produce the same data in different orders.
Not familiar with this, but unlike the hwrng, if the random data was computed by software, after a synchronization, it still has the possibility to produce the same result for a while.
Quoted 10 lines
Quoted 6 lines
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.The guest can only break it's own networking; so shooting itself in the foot is no big deal.
Dave
The question is for the packet comparing, if the number of connections in guest exceed the maximum connections it could track, what will it do?
Quoted 5 lines
Quoted 2 lines
Thanks
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 157 lines · * Jason Wang ([email protected]) wrote:
Quoted 131 lines · Dr. David Alan Gilbert
Quoted 130 lines · * Jason Wang ([email protected]) wrote:
Quoted 117 lines · Tkid
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to
cache and compare net packets.This module is one of the important components
of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out
whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on
SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for
qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to
SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPhttp://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.Quoted 6 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.Hi:
Just have the following questions in my mind (some has been raised in the previous rounds of discussion without a conclusion):
Quoted 8 lines
Quoted 3 lines
- What's the plan for management layer? The setup seems complicated so we could not simply depend on user to do each step. (And for security reason, qemu was usually run as unprivileged user)
It's certainly easier than the current COLO code that relies on a very complex set of bridges, extra network interfaces and kernel modules. UMU (cc'd) have been working on a libvirt set that starts COLO up, although one bit that's very messy is the curretn kernel based network comparison code.
Ok.
Quoted 11 lines
Quoted 4 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
- What if application generate packet based on hwrng device? This will produce always different packets.Yes, there are cases this happens - COLO's worst case is similar to simple checkpointing (because it has a limit to the smallest checkpoint), but it's best case is much better, on a compute heavy load, it ends up taking a checkpoint very rarely.
Actually the big problem is where randomness occurs in unexpected places, e.g. where things like Perl's hash randomisation means that the two hosts produce the same data in different orders.
Quoted 3 lines
Not familiar with this, but unlike the hwrng, if the random data was computed by software, after a synchronization, it still has the possibility to produce the same result for a while.
The hwrng, variation in tsc or anything else that feeds the entropy pool can do cause the divergence.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
- Not sure SLIRP is perfect matched for this task. As has been raised, another method is to decouple the packet comparing from qemu. In this way, lots of open source userspace stack could be used.
- Haven't read the code of packet comparing, but if it needs to keep track the state of each connection, it could be easily DOS from guest.
Quoted 7 lines
Quoted 4 lines
The guest can only break it's own networking; so shooting itself in the foot is no big deal.
Dave
The question is for the packet comparing, if the number of connections in guest exceed the maximum connections it could track, what will it do?
The slow case choice is to just force simple checkpointing mode. However, I don't think this case is any different from the kernel's stateful connection tracking used in iptables for firewalling.
Dave
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Thanks
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 2 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
[Dong, Eddie] Hi Jason:
How about we take staging approach? In general, COLO opens a door of high performance HA solution, but it will take very long time to make everything perfect. As for the network virtualization, I think we may start from usage with moderate network bandwidth, like 1Gbps. Otherwise, the performance of COLO may be not that good (of course, like David mentioned, the worst case is same with periodic checkpoint). At the moment, how about we start from in Qemu virtio network, and enhance for vhost case in future?
The good thing is that we get more people working on the patch series, and glad to see UMU also joined the effort. Thanks and welcome...
Thx Eddie
Quoted 4 lines · Eddie
Quoted 2 lines
- What's the plan for vhost? Userspace network in qemu is rather slow, most user will choose vhost.
[Dong, Eddie] Hi Jason:
How about we take staging approach? In general, COLO opens a door of high performance HA solution, but it will take very long time to make everything perfect. As for the network virtualization, I think we may start from usage with moderate network bandwidth, like 1Gbps. Otherwise, the performance of COLO may be not that good (of course, like David mentioned, the worst case is same with periodic checkpoint). At the moment, how about we start from in Qemu virtio network, and enhance for vhost case in future?
Yes, of course and it makes sense.
Mentioning vhost here is to avoid re-inventing or abandoning some exist infrastructures. For example, thinking how netfiler can work with vhost from the beginning does not harm ...
Quoted 4 lines
The good thing is that we get more people working on the patch series, and glad to see UMU also joined the effort. Thanks and welcome...
Thx Eddie
Thanks
Quoted 80 lines · * Tkid ([email protected]) wrote:
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to cache and compare net packets.This module is one of the important components of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.
## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on
SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+
Quoted 6 lines
(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
What protocol are you using for the data carried over the Forward(socket)? I'm just wondering if there's an existing layer2 tunneling protocol that it would be best to use.
Quoted 16 lines
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRP
Quoted 7 lines
http://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.
I still think SLIRP might be painful; but it might be an easy one to start with.
Quoted 5 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.
Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 87 lines · Dr. David Alan Gilbert
Quoted 80 lines · * Tkid ([email protected]) wrote:
Hi,all
We are planning to reimplement colo proxy in userspace (Here is in qemu) to cache and compare net packets.This module is one of the important components of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed,thanks in advance.
## Background
COLO FT/HA (COarse-grain LOck-stepping Virtual Machines for Non-stop Service)
project is a high availability solution. Both Primary VM (PVM) and Secondary VM
(SVM) run in parallel. They receive the same request from client, and generate
responses in parallel too. If the response packets from PVM and SVM are identical, they are released immediately. Otherwise, a VM checkpoint (on demand)
is conducted.
Paper:
http://www.socc2013.org/home/program/a3-dong.pdf?attredirects=0
COLO on Xen:
http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping
COLO on Qemu/KVM:
http://wiki.qemu.org/Features/COLOBy the needs of capturing response packets from PVM and SVM and finding out whether they are identical, we introduce a new module to qemu networking called
colo-proxy.This document describes the design of the colo-proxy module
## Glossary
PVM - Primary VM, which provides services to clients. SVM - Secondary VM, a hot standby and replication of PVM. PN - Primary Node, the host which PVM runs on SN - Secondary Node, the host which SVM runs on## Our Idea ##
COLO-Proxy
COLO-Proxy is a part of COLO,based on qemu net filter and it's a plugin for qemu net filter.the function keep SVM connect normal to PVM and compare PVM's packets to SVM's packets.if difference,notify COLO do checkpoint.== Workflow ==
+--+ +--+ |PN| |SN| +-----------------------+ +-----------------------+ | +-------------------+ | | +-------------------+ | | | | | | | | | | | PVM | | | | SVM | | | | | | | | | | | +--+-^--------------+ | | +-------------^----++ | | | | | | | | | | | | +------------+ | | +-----------+ | | | | | | | COLO | | (socket) | | COLO | | | | | | | | CheckPoint +---------------------> CheckPoint| | | | | | | | | | (6) | | | | | | | | | +-----^------+ | | +-----------+ | | | | | | (5) | | | | | | | | | | | | | | | | +--v-+--------------+ | Forward(socket) | +-------------+----v+ | | |COLO Proxy | +-------+(1)+--------->seq&ack adjust(2)| | | | | +-----+------+ | | +-----------------+ | | | | | Compare(4) <-------+(3)+---------+ COLO Proxy | | | +-------------------+ | Forward(socket) | +-------------------+ | ++Qemu+-----------------+ ++Qemu+-----------------+ | ^ | | | | +--------v-+--------+ | | | Client | | | +-------------------+Quoted 6 lines
(1)When PN receive client packets,PN COLO-Proxy copy and forward packets to SN COLO-Proxy.
(2)SN COLO-Proxy record PVM's packet inital seq & adjust client's ack,send adjusted packets to SVM
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
Quoted 3 lines
What protocol are you using for the data carried over the Forward(socket)? I'm just wondering if there's an existing layer2 tunneling protocol that it would be best to use.
Currently,we will use raw tcp socket send a packet's length then send the packet.
Quoted 37 lines
Quoted 16 lines
(4)PN Qemu COLO-Proxy enqueue SVM's packets and enqueue PVM's packets,then compare PVM's packets data with SVM's packets data. If packets is different, compare
module notify COLO CheckPoint module to do a checkpoint then send PVM's packets to
client and drop SVM's packets, otherwise, just send PVM's packets to client and
drop SVM's packets.
(5)notify COLO-Checkpoint module checkpoint is needed
(6)Do COLO-Checkpoint### QEMU space TCP/IP stack(Based on SLIRP) ###
We need a QEMU space TCP/IP stack to help us to analysis packet. After looking
into QEMU, we found that SLIRPQuoted 7 lines
http://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
is a good choice for us. SLIRP proivdes a full TCP/IP stack within QEMU, it can
help use to handle the packet written to/read from backend(tap) device which is
just like a link layer(L2) packet.I still think SLIRP might be painful; but it might be an easy one to start with.
Quoted 5 lines
### Packet enqueue and compare ###
Together with QEMU space TCP/IP stack, we enqueue all packets sent by PVM and
SVM on Primary QEMU, and then compare the packet payload for each connection.Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK .
Quoted 6 lines · * Zhang Chen ([email protected]) wrote:
Quoted 1 line · Dr. David Alan Gilbert
* Tkid ([email protected]) wrote:
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
(3)SN Qemu COLO-Proxy recieve SVM's packets and forward to PN Qemu COLO-Proxy.
What protocol are you using for the data carried over the Forward(socket)? I'm just wondering if there's an existing layer2 tunneling protocol that it would be best to use.
Currently,we will use raw tcp socket send a packet's length then send the packet.
Yes OK (I think there's a qemu -net socket option that does something similar).
Dave
Quoted 1 line
Quoted 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK