Bun Start a Cluster of HTTP Servers

Run multiple HTTP servers concurrently via the "reusePort" option to share the same port across multiple processes

9 stars 1 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add jarle/bun-skills --skill Bun Start a cluster of HTTP servers
Manual install
git clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-guides-http-cluster ~/.claude/skills/Bun-Start-a-cluster-of-HTTP-servers

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Start a cluster of HTTP servers

> Run multiple HTTP servers concurrently via the "reusePort" option to share the same port across multiple processes

To run multiple HTTP servers concurrently, use the `reusePort` option in `Bun.serve()` which shares the same port across multiple processes.

This automatically load balances incoming requests across multiple instances of Bun.

```ts server.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { serve } from "bun";

const id = Math.random().toString(36).slice(2);

serve({
  port: process.env.PORT || 8080,
  development: false,

  // Share the same port across multiple processes
  // This is the important part!
  reusePort: true,

  async fetch(request) {
    return new Response("Hello from Bun #" + id + "!\n");
  },
});
```

***

<Note>
  **Linux only** — Windows and macOS ignore the `reusePort` option. This is an operating system limitation with
  `SO_REUSEPORT`, unfortunately.
</Note>

After saving the file, start your servers on the same port.

Under the hood, this uses the Linux `SO_REUSEPORT` and `SO_REUSEADDR` socket options to ensure fair load balancing across multiple processes. [Learn more about `SO_REUSEPORT` and `SO_REUSEADDR`](https://lwn.net/Articles/542629/)
Read the full skill on GitHub

Details

Skill name
Bun Start a cluster of HTTP servers
Path
skills/bun-guides-http-cluster/SKILL.md
License
MIT
Repo updated
24 February 2026

FAQ

What does the Bun Start a Cluster of HTTP Servers skill do?

Run multiple HTTP servers concurrently via the "reusePort" option to share the same port across multiple processes

How do I install the Bun Start a Cluster of HTTP Servers skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Start a cluster of HTTP servers. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Bun Start a Cluster of HTTP Servers popular?

It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.