All Projects → Nebo15 → Annon.api

Nebo15 / Annon.api

Licence: mit
Configurable API gateway that acts as a reverse proxy with a plugin system.

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Annon.api

Service Proxy
API gateway for REST and SOAP written in Java.
Stars: ✭ 355 (+16.01%)
Mutual labels:  api, api-gateway, proxy, reverse-proxy
Manba
HTTP API Gateway
Stars: ✭ 3,000 (+880.39%)
Mutual labels:  api, api-gateway, proxy, gateway
Janus
An API Gateway written in Go
Stars: ✭ 2,249 (+634.97%)
Mutual labels:  api, api-gateway, proxy, reverse-proxy
Tree Gateway
This is a full featured and free API Gateway
Stars: ✭ 160 (-47.71%)
Mutual labels:  api, api-gateway, proxy, gateway
Goku Api Gateway
A Powerful HTTP API Gateway in pure golang!Goku API Gateway (中文名:悟空 API 网关)是一个基于 Golang开发的微服务网关,能够实现高性能 HTTP API 转发、服务编排、多租户管理、API 访问权限控制等目的,拥有强大的自定义插件系统可以自行扩展,并且提供友好的图形化配置界面,能够快速帮助企业进行 API 服务治理、提高 API 服务的稳定性和安全性。
Stars: ✭ 2,773 (+806.21%)
Mutual labels:  api, api-gateway, proxy, gateway
Appy Backend
A user system to bootstrap your app.
Stars: ✭ 96 (-68.63%)
Mutual labels:  api, authentication, authorization
Esp V2
A service proxy that provides API management capabilities using Google Service Infrastructure.
Stars: ✭ 120 (-60.78%)
Mutual labels:  api, api-gateway, proxy
Infini Gateway
INFINI-GATEWAY(极限网关), a high performance and lightweight gateway written in golang, for elasticsearch and his friends.
Stars: ✭ 272 (-11.11%)
Mutual labels:  proxy, gateway, reverse-proxy
Tenso
Tenso is an HTTP REST API framework
Stars: ✭ 167 (-45.42%)
Mutual labels:  api, api-gateway, gateway
Jso
Easy to use OAuth 2.0 javascript library for use in your javascript application.
Stars: ✭ 830 (+171.24%)
Mutual labels:  api, authentication, authorization
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (-50%)
Mutual labels:  api, authentication, authorization
Orange
OpenResty/Nginx Gateway for API Monitoring and Management.
Stars: ✭ 2,208 (+621.57%)
Mutual labels:  api, proxy, gateway
Gravitee Gateway
Gravitee.io - API Management - OpenSource API Gateway
Stars: ✭ 1,123 (+266.99%)
Mutual labels:  api, api-gateway, gateway
Apisix Docker
the docker for Apache APISIX
Stars: ✭ 119 (-61.11%)
Mutual labels:  api, api-gateway, reverse-proxy
Altair
Lightweight and Robust API Gateway written in Go
Stars: ✭ 34 (-88.89%)
Mutual labels:  api, api-gateway, reverse-proxy
Securing Restful Apis With Jwt
How to secure a Nodejs RESTful CRUD API using JSON web tokens?
Stars: ✭ 301 (-1.63%)
Mutual labels:  api, authentication, authorization
Aws Lambda Fastify
Insipired by aws-serverless-express to work with Fastify with inject functionality.
Stars: ✭ 190 (-37.91%)
Mutual labels:  api, api-gateway, proxy
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (-29.41%)
Mutual labels:  api, api-gateway, gateway
Pizzly
The simplest, fastest way to integrate your app with an OAuth API 😋
Stars: ✭ 796 (+160.13%)
Mutual labels:  api, proxy, authentication
Github Create Token
Create a Github OAuth access token.
Stars: ✭ 6 (-98.04%)
Mutual labels:  api, authentication, authorization

Annon

Coverage Status Build Status

Annon API Gateway

Annon is a configurable API gateway that acts as a reverse proxy with a plugin system. Plugins are reducing boilerplate that must be done in each service, making overall development faster. Also it stores all requests, responses and key metrics, making it easy to debug your application. Inspired by Kong.

"Annon" translates from the Sindarin word for 'Great Door or Gate'. Sindarin is one of the many languages spoken by the immortal Elves.

Annon consist of multiple main parts:

  • Annon API Gateway (you are here).
  • Annon Dashboard - UI that allows to manage Annon settings, review and analyze Requests.
  • annonktl - CLI management utility.
  • Annon Status Pages - UI that renders APIs status pages;
  • EView - hex package that allows to receive and modify client responses from Elixir application to match Nebo #15 API Manifest. So your back-ends will respond in a same way as Annon does.
  • Mithril - authentication and role management service.

Goals of the Project

  • Provide single easy to use API management system for medium-to-large scale applications.
  • Reduce amount of work needed in other components by orchestrating common functionalities.
  • Monitoring - control response time and get answer "what happened" even in a single request perspective. Provide data for in-depth analysis.
  • Authorization - set authentication and authorization requirements for each resource and reject requests that do not satisfy them.
  • Improve platform scalability.

General Features

Caching and Performance

For performance issues Annon has build-in cache manager, it will load data from DB only once, all further work will be based on this cached data.

Whenever a single node receives request that changes cached data, it's responsible to notify all other nodes in cluster about change, and they should reload configurations from DB.

Whenever new node joins to a cluster, all other nodes should drop their cache, to resolve consistency issues.

This feature is done via skycluster package. All gateway nodes is connected via Erlang distribution protocol. It support different discovery strategies:

  • kubernetes - selecting pods via Kubernetes API;
  • gossip - multicast UDP gossip, using a configurable port/multicast address;
  • epmd - using standart Erlang Port Mapper Daemon.

Request ID's

When receiving request gateway will generate unique request_id. It is used to log request and this request is sent to all upstream, so whole back-ends that is affected by a request will create logs with same request id's.

Optionally, you can send X-Request-ID header with your own request id, but you need to make sure that its length not less than 20 characters. Also, if should be unique, or you will receive error response.

Request Logger

Annon stores all requests and responses by their unique Request ID's in a PostgreSQL database. You use this information to query requests and get base analytics via Requests API.

API consumers may provide a custom request ID by sending X-Request-ID: <request_id> header. Thus, your Front-End and upstream back-ends can log information with a single unique ID.

Also, idempotency plug is relying on this logs to provide idempotency guarantees for requests with same X-Idempotency-Key: <idempotency_key> headers.

Monitoring

To monitor services status we will use DogStatsD integration, that will receive following metrics:

  • request.count (counter) - API hit rate.
  • request.size (gauge) - HTTP request size.
  • responses.count (counter) - same as request.count but sent after request dispatch and additionally tagged with http.status.
  • latencies.{client,upstream,gateway} (gauge) - total request latency for a API consumer, additionally tagged with http.status.

All metrics have tags: http.host, http.port, http.method, api.name and api.id (if matches any), request.id. This allows to set different aggregated views on counter data.

We recommend you to try DataDog for collecting and displaying performance metrics. But this is not a hard constraint, instead you can use any StatsD collector.

Requests Idempotency

Annon guarantees that replayed requests with same X-Idempotency-Key: <key> and same request will get permanent response. This is useful in a financial application, where you need good protection from duplicate user actions.

Requests Tracing

Annon supports OpenTracing in Erlang via Otter library. This means that by implementing OpenTracing API in other services you can trace complete request impact for each of your services.

Installation

Annon can be installed by compiling it from sources, but we recommend you to use our pre-build Docker containers:

Our containers are based on Alpine Linux wich is a security-oriented, lightweight Linux distribution based on musl libc and busybox.

Docker Compose

For local environments we provide an example Docker Compose configuration. You can use this one-liner to deploy all Annon components on a local machine:

curl -L http://bit.ly/annon_compose | bash

After Annon is started, open http://localhost:8080/apis for Management UI, http://localhost:4000/ for public API and http://localhost:4001/ for management API.

Kubernetes

You can deploy it to Kubernetes using example configs from Annon's Infra repo.

Documentation

You can find full documentation on official Apiary page.

Also there are auto-generated code documentation available here.

License

See LICENSE.md.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].