2 unstable releases

0.2.0 Jun 26, 2019
0.1.3 Apr 1, 2019
0.1.2 Feb 17, 2019
0.1.1 Feb 17, 2019
0.1.0 Feb 17, 2019

#23 in #round-robin

28 downloads per month

MIT license

130KB
3K SLoC

Katalyst API Gateway

Crate 0.2.0 Build Status Documentation MIT License Maintenance

Katalyst is a high performance and low memory API Gateway. It can be used as either an appliance through Docker or it can be used as a library. This project is currently under heavy development and will likely experience many changes and issues as we work towards the 1.0 release.

Features

  • Configuration via YAML files
  • Configuration design done using templating and modular 'expressions' for dynamic route handling
  • Request routing with either regex or custom route builders
  • Modular design for customization of the gateway, internal modules can be overridden
  • Load balance hosts using Round Robin, Least Connection, or Random algorithms
  • SSL/TLS Termination
  • Highly performant, with at least some use cases and loads outperforming nginx
    • Built on the tokio runtime with Hyper, leveraging async I/O where possible
  • Does not require rust nightly, despite the heavy async I/O
  • Usable as a rust library, standalone application, or lightweight docker container

Library usage

For library usage, refer to the official rust documentation.

Install

Current installation of the binary requires Cargo, though other package formats may be coming soon.

# Add --force if you need to overwrite an already installed version
cargo install katalyst

Usage

Once installed, starting Katalyst is easy. Use the -c option to specify the config file. {{version}}

 katalyst -c config.yml
2019-06-25 19:44:03,103 INFO  [katalyst::config::parsers] Loading file from: config.yml
2019-06-25 19:44:03,105 INFO  [katalyst::server] Listening on http://0.0.0.0:8080
2019-06-25 19:44:03,105 INFO  [katalyst::server] Listening on https://0.0.0.0:8443
...

Run with the help command or flags to get all CLI options

 katalyst help
katalyst 0.2.0
Phil Proctor <philliptproctor@gmail.com>
High performance, modular API Gateway

USAGE:
    katalyst [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --config <config>          Config file [default: katalyst.yaml]
    -l, --log-level <log-level>    Logging level to use [default: info]

SUBCOMMANDS:
    help    Prints this message or the help of the given subcommand(s)
    run     Start the API Gateway (default)

Configuration

Refer to the documentation here

Dependencies

~30MB
~634K SLoC