A high performance authority-only dns server implemented with DPDK
NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
Memory: 64GB
OS: Ubuntu 16.04.1 LTS
Kernel: 4.4.0-81-generic
one 10G port
pls note when test with 5 cores, shuke actually processed 12.43M and 11.39M requests per second, but the client reports 10.7M and 9.46M, this is because the NIC doesn't have enough bandwidth.
two 10G port
if you use vagrant, it is very simple to try shuke
install virtualbox and vagrant
run cd vagrant && vagrant up
ssh to the guest machine, then run the following command:
cd /shuke
sudo build/shuke-server -c vagrant/test.toml
in the host machine, run dig www1.example.com. @172.28.128.10 -p 19899 -t A
tips: vagrant/setup.sh
is a good place to figure out how to build this project
and prepare the running environment.
clone source code: git clone --recursive https://github.com/yuyang0/shuke.git
build dpdk, shuke is only tested on dpdk-17.05.2. if you use linux x86-64,
you can run bash 3rd/dpdk/usertools/dpdk-setup.sh
,
then perform the following instructions.
[12]
to compile dpdk for linux x86-64 target.[15]
to insert UIO[17]
to insert KNI[19]
([18]
for non-NUMA systems) to setup huge pages,
since shuke uses huge page heavily, so allocate as large as possible[21]
to bind NIC device[32]
to quitinstall autoconf and libtool
run make
at the top of source tree, then you will get a binary file named build/shuke-server
.
bash ./bootstrap.sh
to build shukemake DEBUG=1
make V=1
make IP_FRAG=1
.just run build/shuke-server -c conf/shuke.toml
,
you may need to change the config in the config file.
every zone should have a collection in mongodb. you can use
tools/zone2mongo.py
to convert zone data from zone file to mongodb
this collection used to track the RR of a zone, the collection name is the domain of the zone, since mongodb's collection name can't end with dot, so the domain should be the absolute domain name except the last dot. the collection should contain the following fields
{
name: "the absulute owner name,
ttl: 1234567,
type: "DNS type",
rdata: "rdata"
}
the meaning of fields is clear. just like the zone file.
SHUKE has a tcp server used to execute admin operations,
tools/admin.py
is the client. it supports several commands:
zone
: this command used to manipulate the zone data in memory, it has many subcommands.
get
: get a zonegetall
: get all zonesreload
: reload multiple zonereloadall
: reload all zoneget_numzones
: return the number of zones in memory cache.config
: this command is used to manipulate the config of server.version
: return version of shukedebug
: mainly for debug
segfault
: cause a segement faultoom
: trigger a OOM error.info
: print information of server, including statistics. subcommands
all
or default
or empty: return all informationserver
: return the server informationmemory
: return memory usage informationcpu
: return cpu usage informationstats
: statistics information此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。