perf: Implement 2-stage map routing for faster domain lookup

Split domain routing into two stages for improved performance:
- Stage 1: map_str for exact domains (O(log n) using ebtree)
- Stage 2: map_dom for wildcards only (O(n) but small set)

Wildcards now stored in separate wildcards.map file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kaffa
2026-02-03 11:44:54 +09:00
parent 46c86b62f2
commit 18ce812920
5 changed files with 92 additions and 19 deletions

9
conf/wildcards.map Normal file
View File

@@ -0,0 +1,9 @@
# Wildcard Domain to Backend mapping (for map_dom)
# Format: .domain.com backend_name (matches *.domain.com)
# Uses map_dom for suffix matching
.actions.it.com pool_3
.anvil.it.com pool_4
.bench.inouter.com pool_5
.mcp.inouter.com pool_2
.nas.inouter.com pool_1