Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joseluisq/fastify-cluster-example
A simple example of how to running a Fastify server in multi-threaded mode.
https://github.com/joseluisq/fastify-cluster-example
fastify node-cluster typescript
Last synced: 4 days ago
JSON representation
A simple example of how to running a Fastify server in multi-threaded mode.
- Host: GitHub
- URL: https://github.com/joseluisq/fastify-cluster-example
- Owner: joseluisq
- License: mit
- Created: 2019-06-20T14:51:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-09T08:38:31.000Z (5 months ago)
- Last Synced: 2024-10-29T23:23:27.104Z (14 days ago)
- Topics: fastify, node-cluster, typescript
- Language: TypeScript
- Homepage:
- Size: 30.3 KB
- Stars: 26
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fastify Cluster Example
> A simple example of how to running a [Fastify](https://www.fastify.io/) server in [multi-threaded](https://nodejs.org/api/cluster.html#cluster_cluster) mode.
## Usage
```sh
~> yarn
~> yarn start
yarn run v1.22.4
$ ts-node src/index.ts
Total Number of Cores: 4
Master 14784 is running
Worker 14785 is listening
Worker 14786 is listening
Worker 14787 is listening
Worker 14788 is listening
Worker 14787 started
Worker 14785 started
🚀 Server ready at http://[::]:7300 on worker 2
Worker 14788 started
🚀 Server ready at http://[::]:7300 on worker 0
🚀 Server ready at http://[::]:7300 on worker 3
Worker 14786 started
🚀 Server ready at http://[::]:7300 on worker 1
```## Testing
TODO
## Benchmarks
TODO
## License
MIT license© 2019 [Jose Quintana](https://git.io/joseluisq)