1. Global Anycast Architecture and BGP Routing Mechanics
The Anatomy of BGP Path Selection
- Highest Weight (Cisco proprietary, local to the router)
- Highest Local Preference (Preferred path within the local AS)
- Shortest AS_PATH length
- Lowest Origin Type (IGP < EGP < Incomplete)
- Lowest Multi-Exit Discriminator (MED)
| BGP Attribute | Scope | Optimization Strategy for Edge Nodes |
|---|---|---|
| Local Preference | Internal AS | Set higher local-pref on primary transit links to steer outbound traffic. |
| AS_PATH Prepending | Global / External | Artificially lengthen AS_PATH on backup PoPs to gracefully shed load during maintenance. |
| Communities | Global / IXP | Use standard and extended BGP communities to control route propagation boundaries. |
Mitigating Routing Flaps and Sub-Optimal Paths
2. Transport Layer Dynamics: TCP CUBIC vs. TCP BBR
TCP CUBIC: The Loss-Based Paradigm
TCP BBR: The Model-Based Congestion Control
TEXT
+-------------------------------------------------------+
| TCP BBR Control Model |
| |
| [Delivery Rate Tracker] ---> Max Bandwidth (BtLBw) |
| |
| [RTT Propagation Tracker] -> Min RTT (min_rtt) |
| |
| [Pacing Rate] = BtLBw * Pacing Gain |
+-------------------------------------------------------+3. Production Kernel Configuration and Tuning
Applying Sysctl Optimizations
INI
# Increase maximum socket receive and send buffer sizes for high BDP links
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.rmem_default = 33554432
net.core.wmem_default = 33554432
net.core.optmem_max = 65536
# Enable TCP window scaling and auto-tuning memory limits
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_wmem = 4096 65536 33554432
# Increase netdev backlog for high packet arrival rates
net.core.netdev_max_backlog = 250000
# Enable TCP BBR congestion control and fq packet scheduler
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
# Disable slow start after idle to maintain pacing state
net.ipv4.tcp_slow_start_after_idle = 0
# Mitigate SYN floods with syncookies
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 30000BASH
sysctl --systemBASH
sysctl net.ipv4.tcp_congestion_control
# Expected output: net.ipv4.tcp_congestion_control = bbr
lsmod | grep tcp_bbr
# Expected output: tcp_bbr 20480 24. Operational Benchmarking and Troubleshooting
BASH
ss -tin '( dport = :https or sport = :https )'