All Projects → dmhao → Hgw

dmhao / Hgw

Licence: mit
hgw是由gateway网关服务、manager控制服务构成的一套轻量级网关系统。目前支持http/https协议的服务控制

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Hgw

Tenso
Tenso is an HTTP REST API framework
Stars: ✭ 167 (+106.17%)
Mutual labels:  microservices, api-gateway, gateway
Product Apim
Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
Stars: ✭ 508 (+527.16%)
Mutual labels:  microservices, api-gateway, gateway
Dubbo Go Pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: ✭ 124 (+53.09%)
Mutual labels:  microservices, api-gateway, gateway
Go Microservices
Golang Microservices Example
Stars: ✭ 345 (+325.93%)
Mutual labels:  microservices, api-gateway, 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 (+3323.46%)
Mutual labels:  microservices, api-gateway, gateway
Product Microgateway
A cloud native, developer centric and decentralized API gateway for microservices
Stars: ✭ 194 (+139.51%)
Mutual labels:  microservices, api-gateway, gateway
Tree Gateway
This is a full featured and free API Gateway
Stars: ✭ 160 (+97.53%)
Mutual labels:  microservices, api-gateway, gateway
Moleculer Web
🌍 Official API Gateway service for Moleculer framework
Stars: ✭ 198 (+144.44%)
Mutual labels:  microservices, api-gateway, http-server
Armeria
Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
Stars: ✭ 3,392 (+4087.65%)
Mutual labels:  microservices, gateway, http-server
Gravitee Gateway
Gravitee.io - API Management - OpenSource API Gateway
Stars: ✭ 1,123 (+1286.42%)
Mutual labels:  microservices, api-gateway, gateway
Microservices
Microservices from Design to Deployment 中文版 《微服务:从设计到部署》
Stars: ✭ 4,637 (+5624.69%)
Mutual labels:  microservices, api-gateway
Resgate
A Realtime API Gateway used with NATS to build REST, real time, and RPC APIs, where all your clients are synchronized seamlessly.
Stars: ✭ 473 (+483.95%)
Mutual labels:  microservices, api-gateway
Aws Serverless Ecommerce Platform
Serverless Ecommerce Platform is a sample implementation of a serverless backend for an e-commerce website. This sample is not meant to be used as an e-commerce platform as-is, but as an inspiration on how to build event-driven serverless microservices on AWS.
Stars: ✭ 469 (+479.01%)
Mutual labels:  microservices, api-gateway
Reactive Interaction Gateway
Create low-latency, interactive user experiences for stateless microservices.
Stars: ✭ 465 (+474.07%)
Mutual labels:  microservices, api-gateway
Proxy admin free
Proxy是高性能全功能的http代理、https代理、socks5代理、内网穿透、内网穿透p2p、内网穿透代理、内网穿透反向代理、内网穿透服务器、Websocket代理、TCP代理、UDP代理、DNS代理、DNS加密代理,代理API认证,全能跨平台代理服务器。
Stars: ✭ 487 (+501.23%)
Mutual labels:  http-proxy, http-server
Scalecube Services
ScaleCube Services is a high throughput, low latency reactive microservices library built to scale. it features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing. its open and designed to accommodate changes. (no sidecar in a form of broker or any kind)
Stars: ✭ 482 (+495.06%)
Mutual labels:  microservices, api-gateway
Apisix
The Cloud-Native API Gateway
Stars: ✭ 7,920 (+9677.78%)
Mutual labels:  microservices, api-gateway
Vrata
API gateway implemented in PHP and Lumen
Stars: ✭ 421 (+419.75%)
Mutual labels:  microservices, api-gateway
Easy Php
A Faster Lightweight Full-Stack PHP Framework 🚀
Stars: ✭ 754 (+830.86%)
Mutual labels:  api-gateway, gateway
Tyk
Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
Stars: ✭ 6,968 (+8502.47%)
Mutual labels:  microservices, api-gateway

hgw

hgw 是一套支持http/https协议的网关系统,由gateway服务、manager服务构成。

开发初衷

产品开发过程中版本多次迭代,缺乏服务管理,通过网关系统的负载均衡转发Api请求 可以清晰了解到各个模块的请求情况,对接口细节进行细致管理,提高服务的可用性。 有了网关还可以增加一些参数绑定、路径替换、权限验证、copy请求数据等功能,方便我们开发调试。

功能特性

  • 反向代理
  • 黑名单
  • 访问日志
  • 限流
  • 熔断 【错误熔断、超时熔断、强制熔断】
  • 负载均衡 【轮询、随机、权重】
  • 请求路径过滤、路径级私有负载均衡
  • 访问统计 【访问量、访问时长】
  • 支持https, 动态设置https证书 【https证书热加载,动态更新】
  • 访问拷贝 【复制请求数据、返回数据】

测试地址

网关服务:https://test.articlechain.cn/ 控制服务:http://test.articlechain.cn:8080/admin/ 账号:admin 密码:admin

尽量新增数据,请不要删除测试数据

域名配置

hgw

路径配置 请求拦截

hgw-path

强制熔断

hgw-breaker

访问统计

domain-metrics

安装

1. 获取hgw代码

go get github.com/dmhao/hgw

gateway文件夹是网关服务的核心代码

manager文件夹是控制服务的核心代码

2. 编译gateway

go build gateway.go

3. 编译manager

go build manager.go

4. 运行gateway

[[email protected] gateway]# ./gateway -h
usage: gateway --ser-name=SER-NAME --addr=ADDR --etcd=ETCD [<flags>]

Flags:
  -h, --help               Show context-sensitive help (also try --help-long and --help-man).
      --ser-name=SER-NAME  SerName: gateway listen addr
      --addr=ADDR          Addr: gateway listen addr
      --tls-addr=""        Tls-Addr: gateway tls listen addr
      --etcd=ETCD          Addr: etcd server addr
      --u=""               Username: etcd username
      --p=""               Password: etcd password
      --version            Show application version.
参数

--ser-name 【gateway服务的识别名称】

--addr 【gateway http服务的监听地址】

--tls-addr 【gateway https服务的监听地址】

--etcd 【连接etcd服务的地址】

--u 【连接etcd服务的账户】

--p 【连接etcd服务的密码】

./gateway --ser-name=gateway-1 --addr=0.0.0.0:80 --etcd=127.0.0.1:2379

5. 运行manager

[[email protected] manager]# ./manager -h
usage: manager --addr=ADDR --etcd=ETCD [<flags>]

Flags:
  -h, --help       Show context-sensitive help (also try --help-long and --help-man).
      --addr=ADDR  gateway listen addr
      --etcd=ETCD  etcd server addr
      --u=""       Username: etcd username
      --p=""       Password: etcd password
参数

--addr 【manager 服务的监听地址】

--etcd 【连接etcd服务的地址】

--u 【连接etcd服务的账户】

--p 【连接etcd服务的密码】

./manager --addr=0.0.0.0:8080 --etcd=127.0.0.1:2379

6. 使用

访问 manager监听的服务地址+/admin/ 管理gateway服务。

: 自己搭建服务,第一次访问请先访问 /admin/init.html 初始化管理账号密码。

感谢

x-admin 后台管理html模板

gin Golang Web框架

go-chi Golang Router

jwt-go Golang Jwt

logrus Golang Log

hystrix-go Golang CircuitBreaker

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].