apollo-performance-tuning

Featured

Optimize Apollo.io API performance. Use when improving API response times, reducing latency, or optimizing bulk operations. Trigger with phrases like "apollo performance", "optimize apollo", "apollo slow", "apollo latency", "speed up apollo".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Apollo Performance Tuning ## Overview Optimize Apollo.io API performance through response caching, connection pooling, bulk operations, parallel fetching, and result slimming. Key insight: **search is free but slow (~500ms), enrichment costs credits** — cache aggressively and batch enrichment calls. ## Prerequisites - Valid Apollo API key - Node.js 18+ ## Instructions ### Step 1: Connection Pooling Reuse TCP connections to avoid TLS handshake overhead on every request. ```typescript // src/apollo/optimized-client.ts import axios from 'axios'; import https from 'https'; const httpsAgent = new https.Agent({ keepAlive: true, maxSockets: 10, maxFreeSockets: 5, timeout: 30_000, }); export const optimizedClient = axios.create({ baseURL: 'https://api.apollo.io/api/v1', headers: { 'Content-Type': 'application/json', 'x-api-key': process.env.APOLLO_API_KEY! }, httpsAgent, timeout: 15_000, }); ``` ### Step 2: Response Caching with Per-Endpoint TTLs ```typescript // src/apollo/cache.ts import { LRUCache } from 'lru-cache'; // Different TTLs based on data volatility const CACHE_TTLS: Record<string, number> = { '/organizations/enrich': 24 * 60 * 60 * 1000, // 24h — company data rarely changes '/people/match': 4 * 60 * 60 * 1000, // 4h — contact data changes occasionally '/mixed_people/api_search': 15 * 60 * 1000, // 15min — search results are dynamic '/mixed_companies/search': 30 * 60 * 1000, // 30min — company search '/co...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category