bedkillerspacex-boop/codex-skill-library/python-scale-out

Claude Code and agent skill by bedkillerspacex-boop/codex-skill-library

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Scale-out architecture notes for Python services: horizontal workers, shared-nothing vs shared state, session stickiness avoidance, queue-based fan-out, connection pools, and cache/data partitioning. Use when capacity planning or refactoring monoliths for horizontal scale on owned infrastructure.

Install

npx vskill@latest install bedkillerspacex-boop/codex-skill-library/python-scale-out

SKILL.md

The same SKILL.md was published earlier as bedkillerspacex-boop/codex-skill-library/python-scale-out.

Python Scale-Out

Scope And Authorization

  • In scope: design and load tests for systems you operate.
  • Out of scope: load testing third-party production without permission.
  • Prefer staging capacity tests; production experiments with flags and abort criteria.
  • Pair implementation changes with code-quality-standards.

When To Use

  • API/worker CPU-bound or connection-bound bottlenecks.
  • Moving from single VM to multi-instance Kubernetes/ECS.
  • Introducing read replicas, shards, or cache tiers for Python apps.
  • Celery/RQ/arq worker autoscaling design.

Do Not Use As Primary

NeedSkill instead
Shard rebalance opspython-shard-rebalance
Scheduler/distributed jobspython-scheduler
Caching strategiescaching-strategies
Backpressurebackpressure-patterns
Implementation quality baselinecode-quality-standards

Domain Focus

AreaGuidance
Stateless appPush session to Redis/DB; JWT carefully; sticky only if temporary
WorkersHorizontal consumers; prefetch limits; idempotent tasks
PoolsDB/HTTP pools sized per instance x instances < DB max
DataPartition keys; avoid global locks; saga for multi-partition
GILMulti-process for CPU; async for IO; native ext awareness
PitfallsIn-memory-only caches per node; unbounded task fan-out; thundering herd

Workflow

1. Measure bottleneck
  1. Profile: CPU, GIL wait, DB, external IO, lock contention.
  2. Define SLI and target capacity (RPS, lag).
  3. Success: scale-out path that linearly helps the true bottleneck.
2. Make instances fungible
  1. Externalize sessions/files/uploads.
  2. Config via env; no local snowflake state.
  3. Health/readiness probes independent per instance.
3. Scale the right tier
  1. Web replicas behind LB for stateless HTTP.
  2. Workers scale on queue depth with max caps.
  3. DB: pool math + read replicas or cache before premature shards.
4. Protect dependencies
  1. Timeouts, bulkheads, circuit breakers.
  2. Load-shed when overloaded; prioritize critical traffic.
  3. Connection limits and retries with jitter.
5. Validate
  1. Load test with production-like data shape.
  2. Watch error budget and dependency saturation.
  3. Document scale playbook for on-call.
Verify with evidence
bash
# Pool math sketch
python - <<'PY'
instances = 10
pool_per = 20
print('max db conns from app', instances * pool_per)
PY
# Locust/k6 against staging only
# k6 run load.js
python -m pytest -q tests/idempotency
# Celery inspect (owned)
# celery -A app inspect active_queues
  1. Keep command output redacted (keys, tokens, customer IDs).
  2. Attach before/after evidence to the change or review ticket.
  3. Prefer automated tests or CI gates where regressions are likely.

Good / Bad

TopicGoodBad
SessionsRedis/DB storeLocal memory sticky forever
WorkersPrefetch + idempotencyAck late + duplicate side effects
DBPool budgetDefault pool x 100 pods
TestsStaging load with abortBlind prod hammer

Scale levers

LeverWhen
More web podsCPU/RPS bound stateless
More workersQueue lag
CacheHot reads
Read replicaRead-heavy SQL
ShardSingle primary write limit
Rewrite hot pathAlgorithmic bottleneck

Output Checklist

  • [ ] Bottleneck identified with evidence
  • [ ] Instances share no critical local state
  • [ ] Pool/connection budgets documented
  • [ ] Workers idempotent and capped
  • [ ] Load test results attached
  • [ ] On-call scale playbook updated

Rules

  • Only load-test authorized environments.
  • Horizontal scale is not a fix for O(n^2) queries - fix hotspots too.
  • Keep security controls when adding nodes (mTLS, network policy).

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bedkillerspacex-boop/codex-skill-library/python-scale-out/badge)](https://verified-skill.com/skills/bedkillerspacex-boop/codex-skill-library/python-scale-out)

Something wrong with this skill or its page? Tell us.