GitHub - tigcode/jupiter: Jupiter is a high-performance 4-layer network load bal...
source link: https://github.com/tigcode/jupiter
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Jupiter
Introduction
Jupiter is a high-performance 4-layer network load balance service based on DPDK. It supports TCP and UDP packet forwarding in FULLNAT mode. The load balancing algorithms supported by jupiter include consistent hashing, rr, lc.
- Support TCP, UDP protocol
- Support session maintenance for application
- Support load balance service scale out
- Support million QPS for visitors
How to use
1. Compilation
Required OS release: Centos-7.2 or Centos-7.4
tar -xf jupiter.tar.gz
cd jupiter
make rpm-pkg
rpm -i rpmbuild/RPMS/x86_64/jupiter-0.1-1.x86_64.rpm
2. Startup
The default configuration path for jupiter-service is /etc/jupiter/jupiter.cfg. An example for jupiter.cfg as follows :
EAL configuration reference DPDK document.
[DPDK]
argv = -c 0xf -n 4
[DEVICE0]
name = jupiter0
ipv4 = 1.1.1.2
netmask = 255.255.0.0
gw = 1.1.1.254
rxqsize = 256
txqsize = 512
local-ipv4 = 10.0.2.1/32, 10.0.2.2/32
pci = 00:00.0
Reserve huge pages memory:
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 4096 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
Load igb_uio module:
modprobe uio
insmod /usr/share/jupiter/kmod/igb_uio.ko
/usr/share/jupiter/tools/dpdk-devbind.py --bind=igb_uio eth1
Load rte_kni module:
insmod /usr/share/jupiter/kmod/rte_kni.ko
Start up jupier-service:
jupiter-service --daemon
Simple Test
1. Test network diagram
2. ab-client configuration
ifconfig eth0 1.1.1.1/24 up
route add -net 10.0.1.0 netmask 255.255.255.0 gw 1.1.1.2
3. nginx-server configuration
ifconfig eth0 1.1.1.3/24 up
route add -net 10.0.2.0 netmask 255.255.255.0 gw 1.1.1.2
4. jupiter-service configuration
Add a TCP virtual service 10.0.1.1:8888 and two nginx service 1.1.1.3:80, 1.1.1.4:80. More information about command details.
ifconfig jupiter0 1.1.1.2/24 up
jupiter-ctl vs/add 10.0.1.1:8888 tcp rr
jupiter-ctl rs/add 10.0.1.1:8888 tcp 1.1.1.3:80
jupiter-ctl rs/add 10.0.1.1:8888 tcp 1.1.1.4:80
5. ab-client request VIP service
ab http://10.0.1.1:8888/
Scale out
Performance
CPU model: Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz
NIC model: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
Jmeter version: apache-jmeter-3.1
Nginx version: nginx-1.10.2
Bind version: bind-9.9.4
Jupiter-service configuration: 8 lcore and 4G memory
protocol | schedule | TPS | ERROR | jupiter rx-pps | jupiter rx-bps |
---|---|---|---|---|---|
TCP | ipport | 2064789.7 | 0 | 4.78M | 8.41G |
TCP | rr | 2060283.5 | 0 | 4.78M | 8.41G |
TCP | lc | 777078.5 | 0 | - | - |
UDP | ipport | 4212952 | 0 | 8.28M | 7.75G |
UDP | rr | 4272837.6 | 0 | 8.28M | 7.75G |
UDP | lc | 812356.2 | 0 | - | - |
Recommend
-
9
Strings in Oracle RDBMS network layer27-Jul-2011: Strings in Oracle RDBMS network layer Not sure if it's worth blogging... All strings in Oracle RDBMS network layer are usual C-strings terminated by zero byte, but often, str...
-
9
2021 and Layer-2 Blockchain Solutions: XDAI Vs. Tenet Vs. Loopring Vs. Matic NetworkJanuary 11th 2021 615 reads
-
6
TRANSCRIPTDisclaimer: The transcript that follows has been generated using artificial intelligence. We strive to be as accurate as possible, but minor errors and slightly off timestamps may be present due to platfor...
-
2
Physical Layer in OSI ModelPhysical Layer in OSI Model | Computer NetworkHello everyone, welcome to Geeks for geeks....
-
2
Layer 1 blockchain network Elrond, a Ethereum competitor, shifts focus to the metaverse after rebrands Layer 1 blockchain network Elrond, a Ethereum competitor, shifts focus to the metaverse after rebrands November...
-
2
Swift Swift Generics: How to build a clean network layer Codable, URLRequest, Result type. These are the main te...
-
1
Flare Launches Layer 1 Oracle Network January 10, 2023
-
1
这节课开始进入了网络层的学习,讲述了网络层提供的功能,还有路由器内部是什么样子的,以及virtual circuit网络和datagram网络的一点比较。 网络层有什么作用呢?用一句话来说,就是需要负责将传输层的报文段从发送端传输到接收...
-
8
Layer 3 Foundation Announces Testnet of Its P2P Yellow Clearing Network for Counterparty Risk Mitigation
-
3
This website uses cookiesWe use cookies to personalise content and ads, to provide social media features and to...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK