crossover
zero-downtime deployments
Last updated 2 years ago by ddollar .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install crossover 
SYNC missed versions from official npm registry.

Crossover

Zero-downtime Node.js deployments

WARNING: Crossover is an experiment in progress and is not recommended for production use.

Purpose

  • Push new versions of an app into production with zero errors and zero dropped requests
  • Push new versions using HTTP
  • Incrementally roll requests onto the new version, falling back if errors or crashes are encountered

Installation

$ npm install -g crossover

Usage

The example app tarball URLs in these examples actually exist. Feel free to use them for testing.

$ crossover http://crossover-example.s3.amazonaws.com/app1.tgz
[master] preparing worker: http://crossover-example.s3.amazonaws.com/app1.tgz
[master] resolving dependencies
[master] forked worker 51500
[master] forked worker 51501
[worker:51500] starting app
[worker:51501] starting app
[worker:51500] listening on port: 3000
[worker:51501] listening on port: 3000

Packaging

Create a tarball that contains your app.

$ cd ~/Code/myapp
$ tar czvf ~/Slugs/myapp.tgz .

Deploying New Code

$ curl -X POST https://localhost:3000/crossover/release \
    -d "url=http%3A%2F%2Fcrossover-example.s3.amazonaws.com%2Fapp2.tgz"
ok

# meanwhile on the server
[master] releasing: http://crossover-example.s3.amazonaws.com/app2.tgz
[master] preparing worker: http://crossover-example.s3.amazonaws.com/app2.tgz
[master] resolving dependencies
[worker:51500] turning off new connections to app
[worker:51501] turning off new connections to app
[worker:51500] requests completed, exiting
[worker:51501] requests completed, exiting
[master] worker 51500 died
[master] forked worker 52000
[master] worker 51501 died
[master] forked worker 52001

Advanced Usage

Usage: crossover [options] <slug url>

Options:

	-h, --help               output usage information
	-V, --version            output the version number
	-a, --auth <password>    admin password
	-c, --concurrency <num>  number of workers
	-e, --env <url>          environment file
	-p, --port <port>        port on which to listen

Current Tags

  • 0.9.0                                ...           latest (2 years ago)

22 Versions

  • 0.9.0                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.0                                ...           5 years ago
  • 0.5.2                                ...           8 years ago
  • 0.5.1                                ...           8 years ago
  • 0.5.0                                ...           8 years ago
  • 0.4.2                                ...           8 years ago
  • 0.4.1                                ...           8 years ago
  • 0.3.2                                ...           8 years ago
  • 0.3.1                                ...           8 years ago
  • 0.3.0                                ...           8 years ago
  • 0.2.0                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
  • 0.0.8                                ...           8 years ago
  • 0.0.7                                ...           8 years ago
  • 0.0.6                                ...           8 years ago
  • 0.0.5                                ...           8 years ago
  • 0.0.4                                ...           8 years ago
  • 0.0.3                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (7)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |