一键导入
dns-optimization
Optimize PowerDNS performance for ISUCON competitions where DNS resolution is a component
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Optimize PowerDNS performance for ISUCON competitions where DNS resolution is a component
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
MCP tool reference — exec, benchmark_start, benchmark_status, note_write, etc. Use when: executing commands on VMs, running benchmarks, or recording findings
ISUCON13 contest manual — server topology, service management, benchmark execution, and rules. Use when: checking environment setup, running benchmarks, or understanding contest constraints
ISUPipe application manual — features, terms, constraints, and API specs. Use when: understanding the app domain, checking API behavior or MUST/MAY requirements
General strategy for identifying and adding missing database indexes in ISUCON web applications
General techniques for optimizing user icon/avatar image serving in ISUCON web applications
General techniques for identifying and fixing N+1 query problems in ISUCON web applications
| name | dns-optimization |
| description | Optimize PowerDNS performance for ISUCON competitions where DNS resolution is a component |
ISUCON では PowerDNS + MySQL バックエンドが使われることがある。ベンチマーカーが大量の DNS クエリを発行する場合、DNS がボトルネックになりうる。
PowerDNS の records テーブルにインデックスがない場合がある:
SHOW INDEX FROM records;
ALTER TABLE records ADD INDEX idx_name_type (name, type);
ALTER TABLE records ADD INDEX idx_domain_id (domain_id);
/etc/powerdns/pdns.conf にキャッシュ設定を追加:
query-cache-ttl=60
negquery-cache-ttl=60
cache-ttl=60
query-cache-ttl: クエリ結果のキャッシュ秒数negquery-cache-ttl: NXDOMAIN のキャッシュ秒数(水責め対策に効果的)設定変更後:
sudo systemctl restart pdns
PowerDNS を完全にバイパスして、Go アプリで DNS を処理する:
ベンチマーカーが TTL に従ってキャッシュする場合、適切な TTL を設定することでクエリ数を削減:
# 現在の DNS 設定を確認
dig pipe.u.isucon.dev @127.0.0.1 +short
# TTL を確認
dig pipe.u.isucon.dev @127.0.0.1 | grep -A1 'ANSWER SECTION'
# DNS 解決速度のベンチマーク
time for i in $(seq 1 100); do dig +short test$i.u.isucon.dev @127.0.0.1 > /dev/null; done