![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
cluster-magic
Advanced tools
run multi-threaded node.js network applications using the native cluster module
run multi-threaded node.js network applications using the native cluster module
sigterm
sighup
$ npm install cluster-magic --save
$ yarn add cluster-magic
File: application.js
const net = require('net');
function startup(){
const server = net.createServer((socket) => {
// connections never end
});
server.listen(8000);
}
module.exports = {
// init hook
init: startup
};
File: startup.js
const _cluster = require('cluster-magic');
const _app = require('./application.js');
// start the clustered app (8 workers)
_cluster.init(_app, {
numWorkers: 8
});
To hot-restart (zero downtime) an application, just send a SIGHUP to the master process. This spawns new workers and disconnects all current workers from the cluster-proxy
Example
# send SIGHUP to process 12345
kill -HUP 12345
To specify the number of workers you can easily pass the environment variable NUM_WORKERS
to the nodejs process. Default is set to num_cpus*2
cluster-magic is OpenSource and licensed under the Terms of The MIT License (X11) - your're welcome to contribute
1.0.2 ###
FAQs
run multi-threaded node.js network applications using the native cluster module
The npm package cluster-magic receives a total of 2 weekly downloads. As such, cluster-magic popularity was classified as not popular.
We found that cluster-magic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.