3.1.7 • Published 5 years ago

tree-gateway v3.1.7

Weekly downloads
235
License
MIT
Repository
github
Last release
5 years ago

npm version Build Status Coverage Status Known Vulnerabilities

Why do I need an API Gateway?

An API gateway provides a single, unified entry point across one or more internal APIs. It is an important element in any microservice architecture.

Why Tree Gateway?

Tree Gateway is a free and open source solution writen in Node JS that has a complete and customizable pipeline to handle your requests. It provides:

  • Authentication: More than 480 strategies available through an easy passportjs integration, including support to JWT tokens, Oauth, Basic and many others.
  • A flexible and robust Routing system that allows any kind of customized request pipeline.
  • Rate limits - To control quotas for your customers and to define actions to be taken when any quota is exceeded.
  • Caching system - Allow you to easily inject and control caching behavior for your APIs. Tree Gateway provides two kinds of cache:
    • At browser level - Intercepting the responses and controling how the HTTP cache headers are used.
    • At a server level - Caching responses for your APIs in memory (using the redis database).
  • Easy Service Discovery, using your preffered registry.
  • Integrated CircuitBreaker - A fast circuitbreaker to fast fail your responses when your API is having problems to work. It support custom handlers for events like "open" or "close" circuit.
  • Real Time Monitoring and Analytics -
    • Collect statistics about any access to your APIs. Capture any event, like a cache hit on a cache entrance, a circuitbreaker open circuit or an authentication attempt.
    • A very flexible and powerfull log system, that can be integrated with any service like logstash, timescale, loggly or new relic.
  • Easy Administration - The gateway can be configured remotelly. And no restart is needed. Any API configuration can be "hot" changed and all configurations are propagated to other tree-gateway cluster nodes with no pain. The gateway can be configured through:
    • Admin API - A REST API that can be invoked through HTTP;
    • SDK - A Node JS SDK that can be used to configure the Gateway (or a cluster of gateways) programmatically;
    • CLI - A command line tool can be used to configure using shell commands or scripts.
  • Focused on Performance and High Availability - Turn easy the creation of big clusters.
    • Support clusters of redis to share configurations, circuitbreaker states, cached content and so on.
    • Automatically propagate events to all cluster nodes.
    • Auto discovery for cluster nodes.
    • Very low resources footprint.
  • Everything can be extended or customized using only Javascript. All plugins can be written in pure Javascript.

Watch the Quickstart video

Quick Start

Install the gateway:

npm install -g tree-gateway

Run it:

treeGateway

Then map your first API. Just create an YML file (my-api.yaml):

---
name: Test
version: 1.0.0
path: "/test"
proxy:
  target:
    host: http://httpbin.org
  timeout: five seconds

And use the Tree Gateway CLI to configure it into the gateway:

treeGatewayConfig apis --add ./my-api.yaml

And its done. You can test it accessing in your browser: http://localhost:8000/test/get

Gateway Configuration Reference

Check the Docs.

Migrating from previous versions

Check our migration guide.

3.1.7

5 years ago

3.1.6

5 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.0

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.6.0

6 years ago

1.5.7

6 years ago

1.5.6

6 years ago

1.5.5

6 years ago

1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.17

6 years ago

1.1.16

6 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago