UNPKG

886 BMarkdownView Raw
1# Diversion
2
3Diversion is an API versioning proxy based on
4[bouncy](http://github.com/substack/bouncy) and
5[semver](http://github.com/isaacs/node-semver), with an optional REST management
6API made with [Lazorse](http://github.com/BetSmartMedia/Lazorse). It interprets
7the `X-Version` header of incoming requests as version range, then uses semvers
8maxSatisfying algorithm to choose a backend. This means you have all the power
9of npm's version ranges (including ~0.2.1 style matching) in your X-Version
10headers.
11
12Diversion can automatically remove failed backends and retry requests, but
13currently the algorithm is a bit overzealous and has no health checking, so it's
14quite possible to end up with no live backends due to transient failure.
15
16Also included is a management API that listens on a different port and allows
17backends to register themselves with the proxy.
18
19## License
20
21MIT