<!-- .slide: style="font-size: 20px;" --> # 以 Linux XDP (eXpress Data Path) 為基礎的高效率網路負載平衡器 ----- ## COSCUP 2020 ### 馮會鈞 --- ### Agenda - What is XDP - A load balancer based on XDP - XDP playground --- ### What is XDP? - a subset of eBPF program - early network packet processing - attached to the network device driver ---- ## Execution mode ![](https://i.imgur.com/cdSJJQ5.png) ---- ## Action - XDP_DROP - XDP_ABORTED - XDP_PASS - XDP_TX - XDP_REDIRECT --- ## Layer 4 load balancer ---- ![](https://i.imgur.com/u6nm34N.png) ---- ## Benefits of XDP based LB - fewer resources spent on each packet - higher availability - higher capacity --- <!-- .slide: style="font-size: 30px;" --> ## How XDP load balancer works ![](https://i.imgur.com/4P9xCvK.jpg) --- ## Routing decision algorithm - Modulo division - [Consistent hashing](https://en.wikipedia.org/wiki/Consistent_hashing) - [Maglev](https://research.google/pubs/pub44824/) (used by Facebook katran) --- ## [XLB](https://github.com/foxhoundsk/xlb) ---- ![](https://i.imgur.com/9anYiGU.png) ---- ## Reference - [XDP tutorial](https://github.com/xdp-project/xdp-tutorial/) - [Facebook katran](https://github.com/facebookincubator/katran) --- ## Thank you! --------------- ## Q&A
{"metaMigratedAt":"2023-06-15T10:50:19.798Z","metaMigratedFrom":"Content","title":"以 Linux XDP (eXpress Data Path) 為基礎的高效率網路負載平衡器","breaks":true,"contributors":"[{\"id\":\"ef1cd805-3567-49f2-b1fc-2b3f29033272\",\"add\":6531,\"del\":5274}]"}
    3239 views