惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
P
Proofpoint News Feed
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
罗磊的独立博客
J
Java Code Geeks
月光博客
月光博客
F
Full Disclosure
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
U
Unit 42
WordPress大学
WordPress大学
A
About on SuperTechFans
C
Cyber Attacks, Cyber Crime and Cyber Security
SecWiki News
SecWiki News
Security Latest
Security Latest
C
Check Point Blog
C
CERT Recently Published Vulnerability Notes
小众软件
小众软件
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
V
Visual Studio Blog
博客园_首页
NISL@THU
NISL@THU
I
Intezer
Spread Privacy
Spread Privacy
AWS News Blog
AWS News Blog
The Register - Security
The Register - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Latest news
Latest news
Project Zero
Project Zero
博客园 - 叶小钗
C
Cybersecurity and Infrastructure Security Agency CISA
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
博客园 - 【当耐特】
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threat Research - Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
T
Tor Project blog
V
Vulnerabilities – Threatpost
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网

Plugins on CoreDNS: DNS and Service Discovery

kubernetes log proxyproto rewrite forward clouddns errors grpc_server https https3 template auto geoip nomad dnstap import view ready etcd header loadbalance bind grpc file prometheus quic timeouts autopath dnssec root tls bufsize k8s_external reload acl cache health trace tsig route53 dns64 transfer secondary loop minimal sign azure local any cancel debug erratic metadata nsid pprof hosts chaos whoami
multisocket
2025-12-11 · via Plugins on CoreDNS: DNS and Service Discovery

Description

With multisocket, you can define the number of servers that will listen on the same port. The SO_REUSEPORT socket option allows to open multiple listening sockets at the same address and port. In this case, kernel distributes incoming connections between sockets.

Enabling this option allows to start multiple servers, which increases the throughput of CoreDNS in environments with a large number of CPU cores.

Syntax

multisocket [NUM_SOCKETS]
  • NUM_SOCKETS - the number of servers that will listen on one port. Default value is equal to GOMAXPROCS. Maximum value is 1024.

Examples

Start 5 TCP/UDP servers on the same port.

. {
	multisocket 5
	forward . /etc/resolv.conf
}

Do not define NUM_SOCKETS, in this case it will take a value equal to GOMAXPROCS.

. {
	multisocket
	forward . /etc/resolv.conf
}

Recommendations

The tests of the multisocket plugin, which were conducted for NUM_SOCKETS from 1 to 10, did not reveal any side effects or performance degradation.

This means that the multisocket plugin can be used with a default value that is equal to GOMAXPROCS.

However, to achieve the best results, it is recommended to consider the specific environment and plugins used in CoreDNS. To determine the optimal configuration, it is advisable to conduct performance tests with different NUM_SOCKETS, measuring Queries Per Second (QPS) and system load.

If conducting such tests is difficult, follow these recommendations:

  1. Determine the maximum CPU consumption of CoreDNS server without multisocket plugin. Estimate how much CPU CoreDNS actually consumes in specific environment under maximum load.
  2. Align NUM_SOCKETS with the estimated CPU usage and CPU limits or system’s available resources. Examples:
    • If CoreDNS consumes 4 CPUs and 8 CPUs are available, set NUM_SOCKETS to 2.
    • If CoreDNS consumes 8 CPUs and 64 CPUs are available, set NUM_SOCKETS to 8.

Limitations

The multisocket value used for a given listen address is taken from the first server block that binds to that address in the Corefile. Subsequent server blocks using the same address will not change it. Different addresses may use different values.

The SO_REUSEPORT socket option is not available for some operating systems. It is available since Linux Kernel 3.9 and not available for Windows at all.

Using this plugin with a system that does not support SO_REUSEPORT will cause an address already in use error.