Bun Start a Cluster of HTTP Servers
Run multiple HTTP servers concurrently via the "reusePort" option to share the same port across multiple processes
Install
npx skills add jarle/bun-skills --skill Bun Start a cluster of HTTP serversgit 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-serversPersonal 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/)Details
- Skill name
Bun Start a cluster of HTTP servers- Repository
- jarle/bun-skills
- 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
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Bun Utils
9jarle/bun-skills
Use Bun's utility functions to work with the runtime
Bun Standalone HTML
9jarle/bun-skills
Bundle a single-page app into a single self-contained .html file with no external dependencies
Bun Watch Mode
9jarle/bun-skills
Automatic reloading in Bun with --watch and --hot modes
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.