Spark RPC
Protocal
Dispatcher
Threads
Metrics
Netty
Thread Models
I/O Models
Pipeline
Frame Decoding
Zero Copy
NIO
BIO
AIO
Netty
Unified API for various transport types
Flexible and extensible event model
Zero-Copy-Capable Rich Byte Buffer
Common Protocol Support
High Performance
Throughput,Latency
Less resource consumption
Minimized unnecessary memory copy
Why Netty
Why not use JDK NIO directly
MORE
Frame Decoding
Idle Detection
BETTER
Fix JDK NIO Bugs(more active and faster, provides workaround if not fixable)
More powerful and friendly API (ByteBuffer -> ByteBuf:auto resizing, memory pool)
Easily switching to another i/o model
Why Spark 2.0 replace Akka with Netty SPARK-5293
Avoid version conflicts between Spark and User Application
The usage of Akka in Spark is limited, which can be easily replaced
文档信息
- 本文作者:Jessica
- 本文链接:https://jessica0530.github.io/2021/03/21/Spark-RPC/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)