{"id":48680707,"url":"https://github.com/2YSP/ship-gate","last_synced_at":"2026-04-26T20:00:41.764Z","repository":{"id":37269624,"uuid":"323933698","full_name":"2YSP/ship-gate","owner":"2YSP","description":"Use SpringWebFlux,Netty and Nacos to build high performance,responsive API gateways.","archived":false,"fork":false,"pushed_at":"2023-06-20T07:58:43.000Z","size":1079,"stargazers_count":156,"open_issues_count":0,"forks_count":102,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-11-07T18:45:16.799Z","etag":null,"topics":["gateway","nacos","netty","springwebflux"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2YSP.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-23T15:13:06.000Z","updated_at":"2023-11-01T10:12:16.000Z","dependencies_parsed_at":"2022-09-04T16:01:23.532Z","dependency_job_id":null,"html_url":"https://github.com/2YSP/ship-gate","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/2YSP/ship-gate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2YSP%2Fship-gate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2YSP%2Fship-gate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2YSP%2Fship-gate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2YSP%2Fship-gate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2YSP","download_url":"https://codeload.github.com/2YSP/ship-gate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2YSP%2Fship-gate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32310804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gateway","nacos","netty","springwebflux"],"created_at":"2026-04-11T01:00:36.055Z","updated_at":"2026-04-26T20:00:41.758Z","avatar_url":"https://github.com/2YSP.png","language":"Java","funding_links":[],"categories":["API网关"],"sub_categories":["Spring Cloud框架"],"readme":"**High Performance,Responsive API Gateways**\n\n![](https://img.shields.io/github/stars/2YSP/ship-gate.svg)\n![](https://img.shields.io/github/forks/2YSP/ship-gate.svg)\n![](https://img.shields.io/github/release/2YSP/ship-gate.svg)\n\n\u003ca href=\"https://github.com/2YSP/ship-gate/blob/master/README_CN.MD\"\u003e中文版\u003c/a\u003e\n# Description\n\nThis is a  high Performance,Responsive API Gateway based on SpringWebFlux and Netty.\n\nNow it only supports HTTP protocol forward,it is for learning communication only.\n\n# Project structure\n\n- Ship-admin: gateway management console,supports config route rule etc.\n- Ship-server: gateway server,core function module.\n- Ship-ship-client-spring-boot-starter: gateway client,automatically register service information to the registration center.\n- Ship-gate-example: an example of how to use the gateway\n- Ship-common: some common codes,like pojo,constants,tools etc.\n\n# Features\n\n- Support custom your own plugins\n- Support A/B test and grayscale publishing\n- Support multiple load balancing strategies\n- Support HTTP protocol,include GET,PUT,POST etc.\n- Support version-based dynamic routing rules\n- Support interface authentication (not implemented)\n- Support cluster deployment\n- Support service rate limit by using Sentinel \n# Usage\n\n## 1.nacos\n\nYou can refer to this(https://nacos.io/en-us/docs/quick-start.html) to install the nacos.\n\n## 2.create db\n\nUse the ship.sql in the project to create database first.\n\n## 3. ship-admin\n\nYou need change some config in application.yml.\n\n| config item                 | Must | Desc                         |\n| --------------------------- | ---- | ---------------------------- |\n| server.port                 | Yes  | Ship-admin start port        |\n| spring.datasource.*         | Yes  | Db config                    |\n| nacos.discovery.server-addr | Yes  | address of nacos             |\n\nthen start the ship-admin,the login address of management backend  is http://localhost:9001/user/login/page ,default account  admin/1234.\n\n## 4. backend project\n\nNew a springboot project and dependency in pom.xml.\n\n```xml\n \u003cdependency\u003e\n            \u003cgroupId\u003ecn.sp\u003c/groupId\u003e\n            \u003cartifactId\u003eship-client-spring-boot-starter\u003c/artifactId\u003e\n            \u003cversion\u003e0.0.1-SNAPSHOT\u003c/version\u003e\n        \u003c/dependency\u003e\n```\n\nNext change some config in application.yml.\n\n| config item                 | Must | Desc                                                         |\n| --------------------------- | ---- | ------------------------------------------------------------ |\n| nacos.discovery.server-addr | Yes  | address of nacos                                             |\n| ship.http.app-name          | Yes  | your app name of backend project,eg: order,the context-path is same with app-name|\n| ship.http.version           | Yes  | version of app,eg:gray_1.0                                   |\n| ship.http.port              | Yes  | the port of project,same with sever.port                     |\n| ship.http.admin-url         | Yes  | the url of ship-admin,eg: 127.0.0.1:9001                     |\n\nIf you think it's trouble,you can just use the ship-gate-example for test.\n\n## 5. ship-server\n\nIt's most important part of ship-gate,similarly you must config some option.\n\n| config item                      | Must | Option value             | Desc                                      |\n| -------------------------------- | ---- | ------------------------ | ----------------------------------------- |\n| nacos.discovery.server-addr      | Yes  |                          | address of nacos                          |\n| ship.gate.load-balance           | No   | random,round,weightRound | load balance algorithm,default round      |\n| ship.gate.time-out-millis        | No   |                          | time out millis of gateway,default 3000ms |\n| ship.gate.cache-refresh-interval | No   |                          | default 10s                               |\n\nFinally start ship-sever and just have fun!\n\n\n\n# Architecture diagram\n\n![网关设计](http://wwww.2ysp.top/gateway.png)\n\n# Prerequisite\n\n- JDK1.8+\n\n- MySQL\n\n- Nacos 1.3+\n\n  \n\nIf you want to know more details or have any question,please [click here](https://www.cnblogs.com/2YSP/p/14223892.html) or contact me in time.\n\n  \n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2YSP%2Fship-gate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2YSP%2Fship-gate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2YSP%2Fship-gate/lists"}