Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/flyio-performance-tuning

@0d57af8
Run it yourself

Analyze and tune Fly.io placement, VM resources, concurrency, autostart behavior, networking, and data locality from measured service objectives. Use when latency or saturation is unacceptable. Trigger with: "speed up Fly app", "tune Fly concurrency", "reduce Fly cold starts".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/flyio-performance-tuning

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈76 tokens for metadata: the name and description. ≈1.1k when used: this file. ≈510 more on demand in 1 file.

Description uses 3.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈304 characters, or 3.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Fly.io Performance and Placement Tuning

Overview

Treat performance as an end-to-end path through Anycast routing, Fly Proxy, Machine placement, process concurrency, VM resources, autostart, and data locality. Optimize from percentiles and saturation evidence rather than assuming more regions or larger VMs always help.

Prerequisites

  • Latency, throughput, error, availability, and cold-start objectives
  • Per-region request, CPU, memory, concurrency, restart, and dependency latency evidence
  • Current image, VM sizes, Machine counts, service concurrency, autostop, and database placement

Instructions

Step 1: Establish a representative baseline

Measure regional latency percentiles, errors, throughput, concurrency, CPU, memory, restarts, health transitions, cold starts, and dependency timing.

Step 2: Locate the bottleneck

Separate network distance, queueing, application work, CPU throttling, memory pressure, startup, connection setup, database latency, and capacity placement.

Step 3: Tune concurrency with capacity

Align service soft and hard limits with measured per-Machine capacity. Preserve headroom so Fly Proxy can route around unhealthy or saturated Machines.

Step 4: Tune lifecycle behavior

Compare always-running, stopped, and suspended behavior. Autostart can reduce idle cost but adds startup delay; set minimum running capacity from the service objective.

Step 5: Align placement with state

Add or remove regions based on user and dependency latency, available capacity, residency, and data topology. Keep region-bound volumes and database writes explicit.

Step 6: Change one variable and verify

Canary a single resource, count, concurrency, lifecycle, or placement adjustment; compare the same observation window and roll back on regression.

Authentication

Use read-only access for metrics, health, state, and placement analysis. Resource or scaling changes require a deploy-capable scoped identity and explicit approval. Performance evidence must not include tokens, request bodies, or sensitive labels.

Tool Discipline

Use Read and Grep to inspect application configuration, deployment evidence, provider documentation, fixtures, logs, schemas, and existing tests before proposing a change. Use Write or Edit only for an approved plan, configuration, implementation, test, or redacted receipt. Do not create, deploy, scale, restart, stop, suspend, destroy, rotate, revoke, expose, or migrate live Fly.io resources without explicit operator approval.

Output

  • Regional performance baseline and bottleneck hypothesis
  • Ranked experiment plan with one variable, expected effect, risk, and rollback per test
  • Before/after service-objective and resource reconciliation

Return the target organization, app, environment, region set, Machine or database identifiers, source-contract fingerprint, evidence, unresolved risks, rollback state, and final decision without exposing tokens, secrets, connection strings, or customer data.

Examples

A globally routed API shows good edge latency but poor database calls outside the primary region. The operator avoids adding more web regions, first tests connection reuse and regional request routing, then measures the same percentile window before deciding on topology changes.

Error Handling

Failure Response
Metrics disagree with user impact Validate time window, region, labels, sampling, and synthetic versus real traffic before tuning.
Autostart causes latency spikes Increase minimum running capacity or revert lifecycle settings while preserving the cost finding.
One region is capacity constrained Choose from current placement options, retain fallback capacity, and do not promise permanent regional availability.

Resources

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides standard instructions for optimizing Fly.io applications through configuration changes and official CLI tools. No malicious patterns or security risks were identified.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
What it can do
Reads files Edits files
Modelinherit
version
2.0.0
argument-hint
[app-slo-and-observation-window]
model
inherit
All 4 allowed tools
ReadGrepWriteEdit
Other metadata
effort
high
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "flyio",
  "performance",
  "concurrency",
  "placement"
]
compatibility
Requires application service objectives, representative traffic, metrics and health evidence, current Machine sizes, regions, and data dependency placement.

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/flyio-performance-tuning