Spark RPC

2021/03/21 spark 共 697 字,约 2 分钟

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

文档信息

Search

    Table of Contents