netanelcyber / netanelcyber/AdPentestAI-Python
Performance: DNS query batching and caching
Open
@tenten48tenten is already working on this.
Since Sep 16, 2026.
dns
help-wanted
optimization
performance
v1.1.0
- Dominant language
- Python
- Stars
- 5
- Forks
- 2
- Avg merge
- 22h 25m
- Merged PRs (30d)
- 7
Description
Description
Implement DNS query batching and response caching to reduce DNS query latency and server load during discovery.
Current Behavior
- Sequential DNS queries (1 at a time)
- No caching of results
- Repeated queries for same domain
- High latency for bulk operations (SRV, A, MX queries)
Proposed Implementation
-
DNS Query Batching
- Batch queries by type (A, AAAA, SRV, MX, PTR)
- ThreadPoolExecutor with 32 workers for parallel queries
- Concurrent resolution of multiple domains
-
Response Caching
- In-memory cache (LRU, max 1000 entries)
- TTL-aware expiration
- Persistent optional cache (SQLite)
- Cache invalidation on manual request
-
Query Optimization
- Deduplicate identical queries
- Batch reverse DNS lookups (PTR)
- Parallel SRV record queries
- Fallback chain optimization
Requirements
- 20-30x speedup on bulk DNS queries (100+ lookups)
- Memory usage < 50MB for cached data
- Configurable cache size and TTL
- Per-tool DNS query metrics
Files to Update
adpentest/core.py- Integrate batching- Update:
GLOBAL_DNS_CONFIGclass - Add: DNS cache class
Success Criteria
- 100 domain queries: < 2 seconds (vs ~30s sequential)
- Cache hit rate > 70% on repeated queries
- No cache invalidation issues under race conditions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.