15. 图解 零拷贝
Application
Buffer
Read buffer
Socket buffer
NIC buffer
Application
Context
Kernel
Context
Figure1.Traditional data copying approach
DMA copy
CPU copy
Figure2.Traditional Context Switches
context switching
before read
before write
Syscall read
Syscall write
U
U
U
K
K
U User context Kernel context
next cycle
K
16. 图解 零拷贝
Read buffer
Socket buffer
NIC buffer
Figure3.Data copy with transferTo()
Appliacation
Context
Kernel
Context
TransferTo()
before transfer to()
Syscall read and send
U
K
context switching
Next cycle
U
Figure4.Context switching with transferTo()
17. 图解 零拷贝
Figure5.Data copies when transferTo(and) gather operations are used
Application
Context
Kernel
Context
TransferTo()
Read buffer
Descriptor
NIC buffer
40. Replication Design –High Level
1. How to assign replicas of a partition to broker servers evenly?
2. For a given partition, how to propagate every message to all replicas?
45. BrokerFailover
Controller Broker State Affected BrokersBroker Path
watch fired
read
available brokers
determine set_p
read
ISR for partition in set_p
determine new leader and
ISR for partition in set_p
write new ISR and Leader
RPC: ISR/Leader assignment
46. 创建/删除Topic
Controller Broker Path Affected BrokersTopic Path
watch fired
read
created/deleted
topics
determine set_p
read
available broker list
set AR as ISR,
one replication in AR as Leader
write new ISR and Leader
RPC: ISR/Leader assignment
LeaderAndISRRequest
LeaderAndISRResponse
Broker State