[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F6473TCHHTRQH1N4BYK6BZ":3,"skill-same:01M6F6473TCHHTRQH1N4BYK6BZ":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6F6473TCHHTRQH1N4BYK6BZ","customerio-load-scale",null,"Implement Customer.io load testing and scaling.\nUse when preparing for high traffic, load testing,\nor scaling integrations for enterprise workloads.\nTrigger with phrases like \"customer.io load test\", \"customer.io scale\",\n\"customer.io high volume\", \"customer.io performance test\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fcustomerio-pack\u002Fskills\u002Fcustomerio-load-scale\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"load","customerio load scale","scale","use","when","for","traffic","performance test","with","trigger","io","scaling","volume","testing","edit","write","read","integrations","Bash","kubectl","Enterprise","load testing","customer","implement","performance","2026-11-10 10:12:30",false,"---\nname: customerio-load-scale\ndescription: |\n  Implement Customer.io load testing and scaling.\n  Use when preparing for high traffic, load testing,\n  or scaling integrations for enterprise workloads.\n  Trigger with phrases like \"customer.io load test\", \"customer.io scale\",\n  \"customer.io high volume\", \"customer.io performance test\".\nallowed-tools: Read, Write, Edit, Bash(kubectl:*), Bash(curl:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Customer.io Load & Scale\n\n## Overview\nLoad testing and scaling strategies for high-volume Customer.io integrations.\n\n## Prerequisites\n- Customer.io integration working\n- Load testing tools (k6, Artillery)\n- Staging environment with test workspace\n\n## Capacity Planning\n\n### Customer.io Rate Limits\n| Endpoint | Limit | Notes |\n|----------|-------|-------|\n| Track API (identify\u002Ftrack) | 100 req\u002Fsec | Per workspace |\n| App API (transactional) | 100 req\u002Fsec | Per workspace |\n| Webhooks (outbound) | Varies | Based on plan |\n\n### Scaling Targets\n| Volume | Architecture | Notes |\n|--------|--------------|-------|\n| \u003C 1M events\u002Fday | Single service | Direct API calls |\n| 1-10M events\u002Fday | Queue-based | Message queue buffer |\n| > 10M events\u002Fday | Distributed | Multiple workers |\n\n## Instructions\n\n### Step 1: Load Test Script (k6)\n```javascript\n\u002F\u002F load-tests\u002Fcustomerio.js\nimport http from 'k6\u002Fhttp';\nimport { check, sleep } from 'k6';\nimport { Rate, Trend } from 'k6\u002Fmetrics';\n\nconst errorRate = new Rate('errors');\nconst identifyDuration = new Trend('identify_duration');\nconst trackDuration = new Trend('track_duration');\n\nconst BASE_URL = 'https:\u002F\u002Ftrack.customer.io\u002Fapi\u002Fv1';\nconst AUTH = __ENV.CUSTOMERIO_AUTH; \u002F\u002F base64(site_id:api_key)\n\nexport const options = {\n  scenarios: {\n    identify_load: {\n      executor: 'ramping-rate',\n      startRate: 10,\n      timeUnit: '1s',\n      preAllocatedVUs: 50,\n      stages: [\n        { target: 50, duration: '1m' },\n        { target: 100, duration: '2m' },\n        { target: 100, duration: '5m' },\n        { target: 0, duration: '1m' },\n      ],\n      exec: 'identifyScenario',\n    },\n    track_load: {\n      executor: 'ramping-rate',\n      startRate: 10,\n      timeUnit: '1s',\n      preAllocatedVUs: 50,\n      stages: [\n        { target: 50, duration: '1m' },\n        { target: 100, duration: '2m' },\n        { target: 100, duration: '5m' },\n        { target: 0, duration: '1m' },\n      ],\n      exec: 'trackScenario',\n    },\n  },\n  thresholds: {\n    'errors': ['rate\u003C0.01'],\n    'identify_duration': ['p95\u003C500'],\n    'track_duration': ['p95\u003C500'],\n  },\n};\n\nexport function identifyScenario() {\n  const userId = `load-test-${__VU}-${__ITER}`;\n  const payload = JSON.stringify({\n    email: `${userId}@loadtest.com`,\n    _load_test: true,\n    created_at: Math.floor(Date.now() \u002F 1000),\n  });\n\n  const start = new Date();\n  const res = http.post(\n    `${BASE_URL}\u002Fcustomers\u002F${userId}`,\n    payload,\n    {\n      headers: {\n        'Authorization': `Basic ${AUTH}`,\n        'Content-Type': 'application\u002Fjson',\n      },\n    }\n  );\n  identifyDuration.add(new Date() - start);\n\n  const success = check(res, {\n    'identify status is 200': (r) => r.status === 200,\n  });\n  errorRate.add(!success);\n\n  sleep(0.1);\n}\n\nexport function trackScenario() {\n  const userId = `load-test-${__VU}-${__ITER}`;\n  const payload = JSON.stringify({\n    name: 'load_test_event',\n    data: {\n      source: 'k6',\n      timestamp: new Date().toISOString(),\n    },\n  });\n\n  const start = new Date();\n  const res = http.post(\n    `${BASE_URL}\u002Fcustomers\u002F${userId}\u002Fevents`,\n    payload,\n    {\n      headers: {\n        'Authorization': `Basic ${AUTH}`,\n        'Content-Type': 'application\u002Fjson',\n      },\n    }\n  );\n  trackDuration.add(new Date() - start);\n\n  const success = check(res, {\n    'track status is 200': (r) => r.status === 200,\n  });\n  errorRate.add(!success);\n\n  sleep(0.1);\n}\n```\n\n### Step 2: Horizontal Scaling\n```yaml\n# k8s\u002Fscaled-deployment.yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: customerio-worker\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: customerio-worker\n  template:\n    metadata:\n      labels:\n        app: customerio-worker\n    spec:\n      containers:\n        - name: worker\n          image: customerio-worker:latest\n          resources:\n            requests:\n              cpu: \"500m\"\n              memory: \"256Mi\"\n            limits:\n              cpu: \"1000m\"\n              memory: \"512Mi\"\n          env:\n            - name: CONCURRENCY\n              value: \"10\"\n---\napiVersion: autoscaling\u002Fv2\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: customerio-worker-hpa\nspec:\n  scaleTargetRef:\n    apiVersion: apps\u002Fv1\n    kind: Deployment\n    name: customerio-worker\n  minReplicas: 3\n  maxReplicas: 20\n  metrics:\n    - type: Resource\n      resource:\n        name: cpu\n        target:\n          type: Utilization\n          averageUtilization: 70\n    - type: External\n      external:\n        metric:\n          name: pubsub.googleapis.com|subscription|num_undelivered_messages\n          selector:\n            matchLabels:\n              resource.labels.subscription_id: customerio-events\n        target:\n          type: AverageValue\n          averageValue: 1000\n```\n\n### Step 3: Message Queue Architecture\n```typescript\n\u002F\u002F lib\u002Fscaled-processor.ts\nimport { Kafka, Consumer, EachMessagePayload } from 'kafkajs';\nimport { TrackClient, RegionUS } from '@customerio\u002Ftrack';\n\nconst kafka = new Kafka({\n  clientId: 'customerio-worker',\n  brokers: process.env.KAFKA_BROKERS!.split(',')\n});\n\nconst consumer = kafka.consumer({\n  groupId: 'customerio-workers',\n  sessionTimeout: 30000,\n  heartbeatInterval: 3000\n});\n\nconst client = new TrackClient(\n  process.env.CUSTOMERIO_SITE_ID!,\n  process.env.CUSTOMERIO_API_KEY!,\n  { region: RegionUS }\n);\n\ninterface CustomerIOEvent {\n  type: 'identify' | 'track';\n  userId: string;\n  payload: any;\n}\n\nasync function processMessage(message: EachMessagePayload): Promise\u003Cvoid> {\n  const event: CustomerIOEvent = JSON.parse(message.message.value!.toString());\n\n  if (event.type === 'identify') {\n    await client.identify(event.userId, event.payload);\n  } else if (event.type === 'track') {\n    await client.track(event.userId, {\n      name: event.payload.event,\n      data: event.payload.properties\n    });\n  }\n}\n\nasync function start(): Promise\u003Cvoid> {\n  await consumer.connect();\n  await consumer.subscribe({ topic: 'customerio-events', fromBeginning: false });\n\n  await consumer.run({\n    partitionsConsumedConcurrently: 10,\n    eachMessage: async (payload) => {\n      try {\n        await processMessage(payload);\n      } catch (error) {\n        console.error('Processing error:', error);\n        \u002F\u002F Dead letter or retry logic\n      }\n    }\n  });\n}\n\nstart().catch(console.error);\n```\n\n### Step 4: Rate Limiter for Fair Usage\n```typescript\n\u002F\u002F lib\u002Frate-limiter.ts\nimport Bottleneck from 'bottleneck';\n\n\u002F\u002F Respect Customer.io's 100 req\u002Fsec limit\n\u002F\u002F Leave headroom for other services\nconst limiter = new Bottleneck({\n  reservoir: 80, \u002F\u002F 80 tokens\n  reservoirRefreshAmount: 80,\n  reservoirRefreshInterval: 1000, \u002F\u002F per second\n  maxConcurrent: 20,\n  minTime: 10 \u002F\u002F Minimum 10ms between requests\n});\n\n\u002F\u002F Track rate limit events\nlimiter.on('depleted', () => {\n  console.warn('Rate limiter depleted, requests queued');\n});\n\nlimiter.on('error', (error) => {\n  console.error('Rate limiter error:', error);\n});\n\nexport async function rateLimitedIdentify(\n  client: TrackClient,\n  userId: string,\n  attributes: Record\u003Cstring, any>\n): Promise\u003Cvoid> {\n  return limiter.schedule(() => client.identify(userId, attributes));\n}\n\nexport async function rateLimitedTrack(\n  client: TrackClient,\n  userId: string,\n  event: string,\n  data?: Record\u003Cstring, any>\n): Promise\u003Cvoid> {\n  return limiter.schedule(() =>\n    client.track(userId, { name: event, data })\n  );\n}\n\n\u002F\u002F Get limiter stats\nexport function getLimiterStats() {\n  return {\n    running: limiter.running(),\n    queued: limiter.queued(),\n    done: limiter.done(),\n    reservoir: limiter.reservoir\n  };\n}\n```\n\n### Step 5: Batch Processing\n```typescript\n\u002F\u002F lib\u002Fbatch-sender.ts\ninterface BatchConfig {\n  maxBatchSize: number;\n  maxWaitMs: number;\n  concurrency: number;\n}\n\nclass BatchSender {\n  private batch: Array\u003C{ userId: string; operation: 'identify' | 'track'; data: any }> = [];\n  private timer: NodeJS.Timer | null = null;\n  private processing = false;\n\n  constructor(\n    private client: TrackClient,\n    private config: BatchConfig = { maxBatchSize: 100, maxWaitMs: 1000, concurrency: 10 }\n  ) {}\n\n  add(userId: string, operation: 'identify' | 'track', data: any): void {\n    this.batch.push({ userId, operation, data });\n\n    if (this.batch.length >= this.config.maxBatchSize) {\n      this.flush();\n    } else if (!this.timer) {\n      this.timer = setTimeout(() => this.flush(), this.config.maxWaitMs);\n    }\n  }\n\n  async flush(): Promise\u003Cvoid> {\n    if (this.processing || this.batch.length === 0) return;\n\n    if (this.timer) {\n      clearTimeout(this.timer);\n      this.timer = null;\n    }\n\n    this.processing = true;\n    const items = this.batch.splice(0, this.config.maxBatchSize);\n\n    \u002F\u002F Process in parallel with limited concurrency\n    for (let i = 0; i \u003C items.length; i += this.config.concurrency) {\n      const chunk = items.slice(i, i + this.config.concurrency);\n      await Promise.allSettled(chunk.map(item => this.processItem(item)));\n    }\n\n    this.processing = false;\n  }\n\n  private async processItem(item: { userId: string; operation: string; data: any }): Promise\u003Cvoid> {\n    if (item.operation === 'identify') {\n      await this.client.identify(item.userId, item.data);\n    } else {\n      await this.client.track(item.userId, {\n        name: item.data.event,\n        data: item.data.properties\n      });\n    }\n  }\n}\n```\n\n### Step 6: Load Test Execution\n```bash\n#!\u002Fbin\u002Fbash\n# scripts\u002Frun-load-test.sh\n\n# Set credentials\nexport CUSTOMERIO_AUTH=$(echo -n \"$CIO_SITE_ID:$CIO_API_KEY\" | base64)\n\n# Run k6 load test\nk6 run \\\n  --out json=results.json \\\n  --out influxdb=http:\u002F\u002Flocalhost:8086\u002Fk6 \\\n  load-tests\u002Fcustomerio.js\n\n# Generate report\nk6 run --summary-export=summary.json load-tests\u002Fcustomerio.js\n\necho \"Load test complete. Results in results.json\"\n```\n\n## Scaling Checklist\n\n- [ ] Rate limits understood\n- [ ] Load tests written\n- [ ] Horizontal scaling configured\n- [ ] Message queue buffering\n- [ ] Rate limiting implemented\n- [ ] Batch processing enabled\n- [ ] Monitoring during tests\n\n## Error Handling\n| Issue | Solution |\n|-------|----------|\n| Rate limited (429) | Reduce concurrency |\n| Timeout errors | Increase timeout |\n| Queue backlog | Scale workers |\n\n## Resources\n- [k6 Documentation](https:\u002F\u002Fk6.io\u002Fdocs\u002F)\n- [Customer.io Rate Limits](https:\u002F\u002Fcustomer.io\u002Fdocs\u002Fapi\u002Ftrack\u002F#section\u002FLimits)\n\n## Next Steps\nAfter load testing, proceed to `customerio-known-pitfalls` for anti-patterns.\n","# Customer.io Load & Scale\n\n## Overview\nLoad testing and scaling strategies for high-volume Customer.io integrations.\n\n## Prerequisites\n- Customer.io integration working\n- Load testing tools (k6, Artillery)\n- Staging environment with test workspace\n\n## Capacity Planning\n\n### Customer.io Rate Limits\n| Endpoint | Limit | Notes |\n|----------|-------|-------|\n| Track API (identify\u002Ftrack) | 100 req\u002Fsec | Per workspace |\n| App API (transactional) | 100 req\u002Fsec | Per workspace |\n| Webhooks (outbound) | Varies | Based on plan |\n\n### Scaling Targets\n| Volume | Architecture | Notes |\n|--------|--------------|-------|\n| \u003C 1M events\u002Fday | Single service | Direct API calls |\n| 1-10M events\u002Fday | Queue-based | Message queue buffer |\n| > 10M events\u002Fday | Distributed | Multiple workers |\n\n## Instructions\n\n### Step 1: Load Test Script (k6)\n```javascript\n\u002F\u002F load-tests\u002Fcustomerio.js\nimport http from 'k6\u002Fhttp';\nimport { check, sleep } from 'k6';\nimport { Rate, Trend } from 'k6\u002Fmetrics';\n\nconst errorRate = new Rate('errors');\nconst identifyDuration = new Trend('identify_duration');\nconst trackDuration = new Trend('track_duration');\n\nconst BASE_URL = 'https:\u002F\u002Ftrack.customer.io\u002Fapi\u002Fv1';\nconst AUTH = __ENV.CUSTOMERIO_AUTH; \u002F\u002F base64(site_id:api_key)\n\nexport const options = {\n  scenarios: {\n    identify_load: {\n      executor: 'ramping-rate',\n      startRate: 10,\n      timeUnit: '1s',\n      preAllocatedVUs: 50,\n      stages: [\n        { target: 50, duration: '1m' },\n        { target: 100, duration: '2m' },\n        { target: 100, duration: '5m' },\n        { target: 0, duration: '1m' },\n      ],\n      exec: 'identifyScenario',\n    },\n    track_load: {\n      executor: 'ramping-rate',\n      startRate: 10,\n      timeUnit: '1s',\n      preAllocatedVUs: 50,\n      stages: [\n        { target: 50, duration: '1m' },\n        { target: 100, duration: '2m' },\n        { target: 100, duration: '5m' },\n        { target: 0, duration: '1m' },\n      ],\n      exec: 'trackScenario',\n    },\n  },\n  thresholds: {\n    'errors': ['rate\u003C0.01'],\n    'identify_duration': ['p95\u003C500'],\n    'track_duration': ['p95\u003C500'],\n  },\n};\n\nexport function identifyScenario() {\n  const userId = `load-test-${__VU}-${__ITER}`;\n  const payload = JSON.stringify({\n    email: `${userId}@loadtest.com`,\n    _load_test: true,\n    created_at: Math.floor(Date.now() \u002F 1000),\n  });\n\n  const start = new Date();\n  const res = http.post(\n    `${BASE_URL}\u002Fcustomers\u002F${userId}`,\n    payload,\n    {\n      headers: {\n        'Authorization': `Basic ${AUTH}`,\n        'Content-Type': 'application\u002Fjson',\n      },\n    }\n  );\n  identifyDuration.add(new Date() - start);\n\n  const success = check(res, {\n    'identify status is 200': (r) => r.status === 200,\n  });\n  errorRate.add(!success);\n\n  sleep(0.1);\n}\n\nexport function trackScenario() {\n  const userId = `load-test-${__VU}-${__ITER}`;\n  const payload = JSON.stringify({\n    name: 'load_test_event',\n    data: {\n      source: 'k6',\n      timestamp: new Date().toISOString(),\n    },\n  });\n\n  const start = new Date();\n  const res = http.post(\n    `${BASE_URL}\u002Fcustomers\u002F${userId}\u002Fevents`,\n    payload,\n    {\n      headers: {\n        'Authorization': `Basic ${AUTH}`,\n        'Content-Type': 'application\u002Fjson',\n      },\n    }\n  );\n  trackDuration.add(new Date() - start);\n\n  const success = check(res, {\n    'track status is 200': (r) => r.status === 200,\n  });\n  errorRate.add(!success);\n\n  sleep(0.1);\n}\n```\n\n### Step 2: Horizontal Scaling\n```yaml\n# k8s\u002Fscaled-deployment.yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: customerio-worker\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: customerio-worker\n  template:\n    metadata:\n      labels:\n        app: customerio-worker\n    spec:\n      containers:\n        - name: worker\n          image: customerio-worker:latest\n          resources:\n            requests:\n              cpu: \"500m\"\n              memory: \"256Mi\"\n            limits:\n              cpu: \"1000m\"\n              memory: \"512Mi\"\n          env:\n            - name: CONCURRENCY\n              value: \"10\"\n---\napiVersion: autoscaling\u002Fv2\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: customerio-worker-hpa\nspec:\n  scaleTargetRef:\n    apiVersion: apps\u002Fv1\n    kind: Deployment\n    name: customerio-worker\n  minReplicas: 3\n  maxReplicas: 20\n  metrics:\n    - type: Resource\n      resource:\n        name: cpu\n        target:\n          type: Utilization\n          averageUtilization: 70\n    - type: External\n      external:\n        metric:\n          name: pubsub.googleapis.com|subscription|num_undelivered_messages\n          selector:\n            matchLabels:\n              resource.labels.subscription_id: customerio-events\n        target:\n          type: AverageValue\n          averageValue: 1000\n```\n\n### Step 3: Message Queue Architecture\n```typescript\n\u002F\u002F lib\u002Fscaled-processor.ts\nimport { Kafka, Consumer, EachMessagePayload } from 'kafkajs';\nimport { TrackClient, RegionUS } from '@customerio\u002Ftrack';\n\nconst kafka = new Kafka({\n  clientId: 'customerio-worker',\n  brokers: process.env.KAFKA_BROKERS!.split(',')\n});\n\nconst consumer = kafka.consumer({\n  groupId: 'customerio-workers',\n  sessionTimeout: 30000,\n  heartbeatInterval: 3000\n});\n\nconst client = new TrackClient(\n  process.env.CUSTOMERIO_SITE_ID!,\n  process.env.CUSTOMERIO_API_KEY!,\n  { region: RegionUS }\n);\n\ninterface CustomerIOEvent {\n  type: 'identify' | 'track';\n  userId: string;\n  payload: any;\n}\n\nasync function processMessage(message: EachMessagePayload): Promise\u003Cvoid> {\n  const event: CustomerIOEvent = JSON.parse(message.message.value!.toString());\n\n  if (event.type === 'identify') {\n    await client.identify(event.userId, event.payload);\n  } else if (event.type === 'track') {\n    await client.track(event.userId, {\n      name: event.payload.event,\n      data: event.payload.properties\n    });\n  }\n}\n\nasync function start(): Promise\u003Cvoid> {\n  await consumer.connect();\n  await consumer.subscribe({ topic: 'customerio-events', fromBeginning: false });\n\n  await consumer.run({\n    partitionsConsumedConcurrently: 10,\n    eachMessage: async (payload) => {\n      try {\n        await processMessage(payload);\n      } catch (error) {\n        console.error('Processing error:', error);\n        \u002F\u002F Dead letter or retry logic\n      }\n    }\n  });\n}\n\nstart().catch(console.error);\n```\n\n### Step 4: Rate Limiter for Fair Usage\n```typescript\n\u002F\u002F lib\u002Frate-limiter.ts\nimport Bottleneck from 'bottleneck';\n\n\u002F\u002F Respect Customer.io's 100 req\u002Fsec limit\n\u002F\u002F Leave headroom for other services\nconst limiter = new Bottleneck({\n  reservoir: 80, \u002F\u002F 80 tokens\n  reservoirRefreshAmount: 80,\n  reservoirRefreshInterval: 1000, \u002F\u002F per second\n  maxConcurrent: 20,\n  minTime: 10 \u002F\u002F Minimum 10ms between requests\n});\n\n\u002F\u002F Track rate limit events\nlimiter.on('depleted', () => {\n  console.warn('Rate limiter depleted, requests queued');\n});\n\nlimiter.on('error', (error) => {\n  console.error('Rate limiter error:', error);\n});\n\nexport async function rateLimitedIdentify(\n  client: TrackClient,\n  userId: string,\n  attributes: Record\u003Cstring, any>\n): Promise\u003Cvoid> {\n  return limiter.schedule(() => client.identify(userId, attributes));\n}\n\nexport async function rateLimitedTrack(\n  client: TrackClient,\n  userId: string,\n  event: string,\n  data?: Record\u003Cstring, any>\n): Promise\u003Cvoid> {\n  return limiter.schedule(() =>\n    client.track(userId, { name: event, data })\n  );\n}\n\n\u002F\u002F Get limiter stats\nexport function getLimiterStats() {\n  return {\n    running: limiter.running(),\n    queued: limiter.queued(),\n    done: limiter.done(),\n    reservoir: limiter.reservoir\n  };\n}\n```\n\n### Step 5: Batch Processing\n```typescript\n\u002F\u002F lib\u002Fbatch-sender.ts\ninterface BatchConfig {\n  maxBatchSize: number;\n  maxWaitMs: number;\n  concurrency: number;\n}\n\nclass BatchSender {\n  private batch: Array\u003C{ userId: string; operation: 'identify' | 'track'; data: any }> = [];\n  private timer: NodeJS.Timer | null = null;\n  private processing = false;\n\n  constructor(\n    private client: TrackClient,\n    private config: BatchConfig = { maxBatchSize: 100, maxWaitMs: 1000, concurrency: 10 }\n  ) {}\n\n  add(userId: string, operation: 'identify' | 'track', data: any): void {\n    this.batch.push({ userId, operation, data });\n\n    if (this.batch.length >= this.config.maxBatchSize) {\n      this.flush();\n    } else if (!this.timer) {\n      this.timer = setTimeout(() => this.flush(), this.config.maxWaitMs);\n    }\n  }\n\n  async flush(): Promise\u003Cvoid> {\n    if (this.processing || this.batch.length === 0) return;\n\n    if (this.timer) {\n      clearTimeout(this.timer);\n      this.timer = null;\n    }\n\n    this.processing = true;\n    const items = this.batch.splice(0, this.config.maxBatchSize);\n\n    \u002F\u002F Process in parallel with limited concurrency\n    for (let i = 0; i \u003C items.length; i += this.config.concurrency) {\n      const chunk = items.slice(i, i + this.config.concurrency);\n      await Promise.allSettled(chunk.map(item => this.processItem(item)));\n    }\n\n    this.processing = false;\n  }\n\n  private async processItem(item: { userId: string; operation: string; data: any }): Promise\u003Cvoid> {\n    if (item.operation === 'identify') {\n      await this.client.identify(item.userId, item.data);\n    } else {\n      await this.client.track(item.userId, {\n        name: item.data.event,\n        data: item.data.properties\n      });\n    }\n  }\n}\n```\n\n### Step 6: Load Test Execution\n```bash\n#!\u002Fbin\u002Fbash\n# scripts\u002Frun-load-test.sh\n\n# Set credentials\nexport CUSTOMERIO_AUTH=$(echo -n \"$CIO_SITE_ID:$CIO_API_KEY\" | base64)\n\n# Run k6 load test\nk6 run \\\n  --out json=results.json \\\n  --out influxdb=http:\u002F\u002Flocalhost:8086\u002Fk6 \\\n  load-tests\u002Fcustomerio.js\n\n# Generate report\nk6 run --summary-export=summary.json load-tests\u002Fcustomerio.js\n\necho \"Load test complete. Results in results.json\"\n```\n\n## Scaling Checklist\n\n- [ ] Rate limits understood\n- [ ] Load tests written\n- [ ] Horizontal scaling configured\n- [ ] Message queue buffering\n- [ ] Rate limiting implemented\n- [ ] Batch processing enabled\n- [ ] Monitoring during tests\n\n## Error Handling\n| Issue | Solution |\n|-------|----------|\n| Rate limited (429) | Reduce concurrency |\n| Timeout errors | Increase timeout |\n| Queue backlog | Scale workers |\n\n## Resources\n- [k6 Documentation](https:\u002F\u002Fk6.io\u002Fdocs\u002F)\n- [Customer.io Rate Limits](https:\u002F\u002Fcustomer.io\u002Fdocs\u002Fapi\u002Ftrack\u002F#section\u002FLimits)\n\n## Next Steps\nAfter load testing, proceed to `customerio-known-pitfalls` for anti-patterns.\n",{"name":5,"author":49,"license":15,"version":50,"description":51,"allowed-tools":52},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Implement Customer.io load testing and scaling.\nUse when preparing for high traffic, load testing,\nor scaling integrations for enterprise workloads.\nTrigger with phrases like \"customer.io load test\", \"customer.io scale\",\n\"customer.io high volume\", \"customer.io performance test\".\n","Read, Write, Edit, Bash(kubectl:*), Bash(curl:*)","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fcustomerio-pack\u002Fskills\u002Fcustomerio-load-scale",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill customerio-load-scale",{"tool":68,"command":69},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill customerio-load-scale",{"tool":71,"command":72},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill customerio-load-scale","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fcustomerio-pack\u002Fskills\u002Fcustomerio-load-scale\u002FSKILL.md",true,[],[77,105,136,154,179,202],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":104},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[],[86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,27,102,103],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","you","fonts","2026-11-11 15:11:14",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":44},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[],[113,114,92,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,22,97,130,131,132,133,24,134,135],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","single-file","simple","ui components","multi","jsx","suite",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":140,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":44},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[],[32,144,145,117,146,147,114,148,90,149,127,150,151,152,153,27,24],"webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":158,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":44},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[162,163,164,165,166,167,168,169,22,170,171,172,173,174,175,176,27,177,178,19,24,23],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":183,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":44},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[],[187,188,189,190,191,192,193,194,36,195,196,197,198,199,27,24,200,23,201],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":206,"sourceHtmlUrl":207,"categories":208,"keywords":209,"publishedAt":44},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[],[204,210,211,212,213,214,215,149,216,217,22,218,219,220,221,24,222],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]