AGENT SKILL
latency-optimization
Network latency optimization techniques
- License 许可
- MIT
- 最近更新
- 2026-03-01
- Stars
- ★ 3
- Forks
- 2
01 前言 Front Matter
- name
- latency-optimization
- license
- MIT
- metadata
- { "audience": "web-developers", "category": "networking" }
- description
- Network latency optimization techniques
- compatibility
- opencode
02 资源文件 1
- 参考文档references/wireless-lab-rules.md181 B
03 SKILL.md 正文
What I do
- Identify and eliminate latency bottlenecks
- Optimize TCP/UDP connections
- Implement connection pooling
- Use CDNs and edge computing
- Optimize TLS handshakes
- Reduce DNS lookup times
- Implement HTTP/2 and HTTP/3
- Design for geographic distribution
When to use me
Use me when:
- Applications require low latency
- Global user base with performance issues
- Real-time features (gaming, trading, chat)
- Page load times exceed targets
- Optimizing API response times
- Reducing time to first byte (TTFB)
Key Concepts
Latency Sources
| Source | Typical Time | Optimization |
|---|---|---|
| DNS | 20-200ms | Caching, prefetch |
| TCP Connect | 30-100ms | Keep-alive, HTTP/2 |
| TLS | 50-200ms | TLS 1.3, session tickets |
| TTFB | 50-500ms | Caching, CDN |
| Transfer | Varies | Compression, HTTP/2 |
Connection Optimization
// Connection pooling (Node.js)
const pool = new Pool({
max: 20,
idleTimeoutMillis: 30000,
connectionTimeoutMillis: 2000
});
// HTTP/2 multiplexing
const http2 = require('http2');
const client = http2.connect('https://api.example.com');
const req = client.request({ ':path': '/data' });
req.on('response', handleResponse);
// Prefetch DNS
<link rel="dns-prefetch" href="//api.example.com">
CDN Strategies
- Static asset caching at edge
- Geographic routing to nearest POP
- Image optimization and format conversion
- API request acceleration
- Origin shielding
Real-time Optimizations
- WebSocket over polling
- Server-Sent Events for one-way
- QUIC/HTTP/3 for reduced latency
- Binary protocols (gRPC, MessagePack)
- Edge computing for computation
04 同仓库更多 Skills
xamarin
Xamarin cross-platform development
★ 3
wrangling
Data wrangling fundamentals
★ 3
windows
Windows operating system administration and scripting
★ 3
wide-column
Wide-column data model
★ 3
wide-column-stores
Wide-column database stores
★ 3
websockets
WebSocket implementation and best practices
★ 3