Git Product home page Git Product logo

gateway's Introduction

Gitter Build Status Go Report Card

Gateway

Gateway 是一个基于HTTP协议的restful的API网关。可以作为统一的API接入层。

Features

  • 流量控制
  • 熔断
  • 负载均衡
  • 服务发现
  • 插件机制
  • 路由(分流,复制流量)
  • API 聚合
  • API 参数校验
  • API 访问控制(黑白名单)
  • API 默认返回值
  • API 定制返回值
  • API 结果Cache
  • JWT Authorization
  • API Metric导入Prometheus
  • API 失败重试
  • 后端server的健康检查
  • 开放管理API(GRPC、Restful)
  • 支持websocket

Docker

使用 docker pull fagongzi/gateway 命令下载Docker镜像, 使用 docker run -d fagongzi/gateway 运行镜像. 镜像启动后export 3个端口:

  • 80

    Proxy的http端口,这个端口就是直接为终端用户服务的

  • 9092

    APIServer的对外GRPC的端口

  • 9093

    APIServer的对外HTTP Restful的端口

架构

WebUI

可用的Gateway的WebUI的项目:

组件

Gateway由proxy, apiserver组成

Proxy

Proxy是Gateway对终端用户提供服务的组件,Proxy是一个无状态的节点,可以部署多个来支撑更大的流量,更多

ApiServer

ApiServer对外提供GRPC的接口,用来管理元信息,更多

Gateway中的概念

Server

Server是一个真实的后端服务,更多

Cluster

Cluster是一个逻辑概念,它由一组提供相同服务的Server组成。会依据负载均衡策略选择一个可用的Server,更多

API

API是Gateway的核心概念,我们可以在Gateway的中维护对外的API,以及API的分发规则,聚合规则以及URL匹配规则,更多

Routing

Routing是一个路由策略,根据HTTP Request中的Cookie,Querystring、Header、Path中的一些信息把流量分发到或者复制到指定的Cluster,通过这个功能,我们可以实现AB Test和线上引流,更多

参与开发

更多

交流方式-微信

gateway's People

Contributors

archfish avatar ifnfn avatar wang-kai avatar whaosoft avatar zacharychang avatar zhangxu19830126 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.