siaorg / sia-gateway Goto Github PK
View Code? Open in Web Editor NEW微服务路由网关(zuul-plus)
License: Apache License 2.0
微服务路由网关(zuul-plus)
License: Apache License 2.0
redirectUrl: http://127.0.0.1:9000/ 这个配置是什么服务?
不知道动态加载性能损耗如何考虑的?
准备一大堆各种组件+联调做demo还行,真正上生产好像不是很好
问题如题所示
会考虑采用spring-cloud-alibaba,增加对dubbo协议的支撑
zuul 后期不再更新,建议采用spring cloud gateway,目前多数公司网关用的spring cloud gateway
建议提供一个在线demo
请问有性能压测相关的报告么?
举个例子。在其他模块打印日志的时候 sia-gateway-sink 获取到kafka的event,此时在 sia-gateway-sink 中打印日志,由于appender 的关系,又把日志(“我收到日志啦”)收集到kafka中。这样即使外部系统不再发送日志了,日志收集模块还是一直在产生自己的消息和消费自己的消息。
检测到 siaorg/sia-gateway 一共引入了275个开源组件,存在208个漏洞
漏洞标题:netty 安全漏洞
缺陷组件:io.netty:[email protected]
漏洞编号:CVE-2021-37137
漏洞描述:Netty是Netty社区的一款非阻塞I/O客户端-服务器框架,它主要用于开发Java网络应用程序,如协议服务器和客户端等。
netty存在安全漏洞,该漏洞源于Snappy frame decoder函数不限制块长度,这可能会导致过度内存使用。
影响范围:(∞, 4.1.68.Final)
最小修复版本:4.1.68.Final
缺陷组件引入路径:com.sia:[email protected]>com.sia:[email protected]>org.elasticsearch.client:[email protected]>org.elasticsearch.plugin:[email protected]>io.netty:[email protected]
另外还有208个漏洞,详细报告:https://mofeisec.com/jr?p=ie4b26
com.creditease.gateway.service.impl
包下的StatisticServiceImpl
类的 increament
方法,如下:
/**
* 计数操作
*
* */
@Override
public void increament(String counterName)
{
Integer value = map.get(counterName);
if(value!=null)
{
Integer added = Integer.sum(value.intValue(), 1);
map.put(counterName, added);
}else
{
map.put(counterName, 1);
}
}
该方法会存在线程安全问题:在qps比较高的时候,最后统计出的误差确实比较大。
但是解决方案上,也不能贸然直接 atomicinteger
,否则在qps高的时候,cas自旋也会耗时较久。
表现如何?是否稳定?
OS: mac majave 10.14.6
brower: chrome 76.0.3809.132
other odds and ends are the same with deploy guidance
issue produce:
git clone the sia-gateway project in master branch, prepared the java, node, maven .etc and do the build & package job.
start the gateway in docker
visit the url http://localhost:18086 by chrome and meet the cors issue as follow
Access to XMLHttpRequest at 'http://127.0.0.1:18086/vv1/getMutiGroupNames' from origin 'http://localhost:18086' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
temporary fix the issue and make the sys accessible:
add the following code in sia-gateway/sia-gateway-admin: **.WebMvcConfiguration.java
@Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("*") .allowedMethods("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"); }
× 日志回溯及查看,利用EKK
架构实现日志
√ 日志回溯及查看,利用ELK
架构实现日志
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.