All Projects → tietang → ngx-lua-zuul

tietang / ngx-lua-zuul

Licence: other
基于Nginx&Lua 和Netflix Eureka的微服务网关。请看看:https://github.com/tietang/zebra

Programming Languages

lua
6591 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to ngx-lua-zuul

Sample Spring Microservices Advanced
More advanced samples of spring boot and spring cloud microservices showing usage of such tools like api Swagger2 on Zuul, integraction with MongoDB, configuration server, testing with Spring Cloud Contract or Hoverfly
Stars: ✭ 112 (+19.15%)
Mutual labels:  api-gateway, zuul
Microservices Sample
Sample project to create an application using microservices architecture
Stars: ✭ 167 (+77.66%)
Mutual labels:  api-gateway, zuul
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 (+31.91%)
Mutual labels:  api-gateway, gateway
Gravitee Gateway
Gravitee.io - API Management - OpenSource API Gateway
Stars: ✭ 1,123 (+1094.68%)
Mutual labels:  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 (+2850%)
Mutual labels:  api-gateway, gateway
Hgw
hgw是由gateway网关服务、manager控制服务构成的一套轻量级网关系统。目前支持http/https协议的服务控制
Stars: ✭ 81 (-13.83%)
Mutual labels:  api-gateway, gateway
Tenso
Tenso is an HTTP REST API framework
Stars: ✭ 167 (+77.66%)
Mutual labels:  api-gateway, gateway
Shop
spring cloud最佳实践项目实例,使用了spring cloud全家桶,TCC事务管理,EDA事务最终一致性等技术的下单示例
Stars: ✭ 418 (+344.68%)
Mutual labels:  api-gateway, zuul
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (+129.79%)
Mutual labels:  api-gateway, gateway
Sample Zuul Filters
Samples of custom Zuul 1 filters for use in Spring Cloud Netflix
Stars: ✭ 201 (+113.83%)
Mutual labels:  api-gateway, zuul
Spring Thrift Api Gateway
Gateway for Apache Thrift requests processing that is built on Spring Cloud stack
Stars: ✭ 38 (-59.57%)
Mutual labels:  api-gateway, gateway
api-gateway
Node.js API gateway that works as single entry point for all clients in a MicroService architecture pattern.
Stars: ✭ 26 (-72.34%)
Mutual labels:  api-gateway, gateway
Easy Php
A Faster Lightweight Full-Stack PHP Framework 🚀
Stars: ✭ 754 (+702.13%)
Mutual labels:  api-gateway, gateway
Ngr
A high-performance & enterprise-class edge gateway middleware
Stars: ✭ 89 (-5.32%)
Mutual labels:  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 (+440.43%)
Mutual labels:  api-gateway, gateway
Tree Gateway
This is a full featured and free API Gateway
Stars: ✭ 160 (+70.21%)
Mutual labels:  api-gateway, gateway
Apioak
Full Lifecycle Management API Gateway.
Stars: ✭ 335 (+256.38%)
Mutual labels:  api-gateway, gateway
Go Microservices
Golang Microservices Example
Stars: ✭ 345 (+267.02%)
Mutual labels:  api-gateway, gateway
Product Microgateway
A cloud native, developer centric and decentralized API gateway for microservices
Stars: ✭ 194 (+106.38%)
Mutual labels:  api-gateway, gateway
gateway
A high-performance API Gateway with middlewares, supporting HTTP and gRPC protocols.
Stars: ✭ 520 (+453.19%)
Mutual labels:  api-gateway, gateway

请看看zebra项目:https://github.com/tietang/zebra

依赖:lua-resty-http

基于Nginx&Lua 和Netflix Eureka的微服务网关。

重新架构了内部组件,采用插件模式。

  • 服务发现
    • Eureka Discovery
    • 抽象discovery,用来支持多种服务发现?规划中...
  • 动态路由
  • 负载均衡
    • 加权轮询
    • 基于响应时间的动态权重轮询?开发中...
  • 简单监控
  • 隔离降级
  • 限流
  • metrics
  • 认证安全?规划中。。。
  • 监控页面?开发中...

架构图:

使用方法

基于Nginx和Lua module。需要安装Nginx Lua环境或者直接下载openresty编译安装。

安装和配置ngx-lua-zuul

下载代码到/path/to/nginx/lua/lib/

git clone http://github.com/tietang/ngx-lua-zuul --depth=1

例子Eureka 服务

如果没有Eureka环境,也可以编译安装本例子中的EurekaDemo服务,参考编译和运行eureka-demo服务中的相关内容。

部署dicovery例子服务:

下载代码后:

cd /path/to/ngx_lua-zuul/demo/java mvn clean install

将下载的代码中的lua文件夹放到部署目录/path/to/nginx,修改/path/to/nginx/lua/ngx_conf/lua.ngx_conf文件中的lua_package_path为你的真实路径: lua_package_path "/path/to/nginx/lua/lib/?.lua;;";

修改/path/to/nginx/conf/nginx.conf文件

http 节点中添加

include "/path/to/lua/ngx_conf/ngx_inlude_http.conf";

server节点中添加

include "/path/to/nginx/lua/ngx_conf/ngx_inlude_server.conf";

参考配置

 #user  nobody;
worker_processes  2;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
    include "/Users/tietang/nginx/nginx/lua/ngx_conf/ngx_inlude_http.conf";


    server {

        include "/Users/tietang/nginx/nginx/lua/ngx_conf/ngx_inlude_server.conf";
        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #

        location = / {
            set $dir $document_root;
            root   $dir/html;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        
    }


   

}

运行测试

启动所有的demo服务:discovery,api,zuul;

启动nginx;

打开浏览器:http://127.0.0.1:8000/api/test/0/0

其测试api参考编译和运行eureka-demo服务中的相关内容。

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