- 博客(14)
- 资源 (12)
- 收藏
- 关注
原创 Redis5.0详细配置
配置说明#多网卡环境下,绑定指定网卡ip,只允许该网卡流量访问redis服务器bind 0.0.0.0#保护模式,默认yes开启,只允许bind设置的网卡流量访问服务器protected-mode yes#服务通讯端口port 7000#tcp连接ESTABLISHED状态的最大队列,不能大于Linux的somaxconn值。tcp-backlog 511#tcp连接空闲时间,达到空闲时间断开连接,0表示不断开。timeout 0#开启tcp长连接最大时间,单位秒,0表示不开启长连
2020-09-23 18:42:47 813
原创 Spring boot Redis客户端无法刷新redis集群(默认lettuce)
场景当redis集群master节点宕机后,对应的slaver节点变为master提供服务,但是Lettuce客户端还是会出现无法连接异常。Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.0.0.1:7001Caused by: java.net.ConnectException: finishConn
2020-09-21 18:09:28 2483
原创 The stack size specified is too small, Specify at least 228k
场景java启动程序是报错The stack size specified is too small, Specify at least 228kError: Could not create the Java Virtual Machine.Error: A fatal exception has occurred. Program will exit.原因直面意思指定的堆栈大小太小,请至少指定228k。我的启动命令是,因为设置了-Xss为128k(线程堆栈大小,jdk8默认为1
2020-09-18 18:25:42 3488
原创 ab(ApacheBench)和wrk压测工具性能效果对比
先写结论wrk比ab要快一倍以上测试环境压测服务器:阿里云抢占式8c16g服务 压测java服务:Spring Cloud Gateway-2.2.5.RELEASE 压测接口代码@RestController@RequestMapping(value = "bm")public class BenchmarkController { @RequestMapping("/nothing/{str}") public String nothing(@PathVa
2020-09-18 15:30:22 1460
原创 压测工具之ab(ApacheBench)安装及使用
安装yum -y install httpd-tools基本用法100w请求,400并发测试。$ b -c 400 -n 1000000 http://localhost:8888/bm/redis/put/100This is ApacheBench, Version 2.3 <$Revision: 1430300 $>Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/Lice
2020-09-17 18:50:00 753
原创 linux压缩zip和解压unzip
zip将/opt/lizz目录下所有文件压缩到lizz.zipzip -rq lizz.zip /opt/lizz将当前目录下所有文件压缩到lizz.zipzip -q -r lizz.zip *unzip解压lizz.zip到当前文件zip语法zip [-AcdDfFghjJKlLmoqrSTuvVwXyz$][-b <工作目录>][-ll][-n <字尾字符串>][-t <日期时间>][-<压缩效率>][压缩文件..
2020-09-17 16:54:01 437
原创 yum安装shell命令rz/sz/netstat/java/git/zip/unzip/gcc等
netstat yum install net-tools 查看网络
2020-09-17 10:34:35 365
原创 linux系统netstat命令大全
用途netstat命令用于显示与IP、TCP、UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况。netstat是在内核中访问网络及相关信息的程序,它能提供TCP连接,TCP和UDP监听,进程内存管理的相关报告。信息$ netstatActive Internet connections (w/o servers)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp.
2020-09-16 16:59:20 1174
原创 Gateway返回数据中文乱码问题
现象使用浏览器访问返回的中文乱码解决方案在header增加Content-Type类型,前端即可识别格式及字符集。HttpHeaders httpHeaders = response.getHeaders();//返回数据格式httpHeaders.setContentType(MediaType.APPLICATION_JSON);效果...
2020-09-11 15:41:49 3839 4
原创 Spring Cloud Gateway灰度发布(预发/金丝雀)
SCG中支持简单的灰度功能,可以根据配置分配流量。配置关键配置项目:- Weight={group}, {weigth}application:需要分流的组名 weigth:流量百分比,最大值100.spring: application: name: fw-gateway cloud: gateway: routes: - id: r_hi uri: lb://hi predicates: -
2020-09-10 16:57:21 2301
原创 Spring Cloud Gateway中多规则限流(RequestRateLimiter覆盖问题)
场景在SCG中配置多个RequestRateLimiter时,只能支持一个速率。源码分析跟踪源码发现package org.springframework.cloud.gateway.route;...public class RouteDefinitionRouteLocator implements RouteLocator, BeanFactoryAware, ApplicationEventPublisherAware {... //定时刷新所有gatew.
2020-09-09 13:37:50 4747
原创 Method breakpoint reached日志问题
现象日志中突然出现很多Method breakpoint reached日志原因debug模式下,某些断点导致处理办法将debug断点删掉即可
2020-09-09 11:06:26 670
原创 DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
/现象线上spring cloud gateway时,偶尔出现几DataBufferLimitException异常,堆栈信息如下:org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144 at org.springframework.core.io.buffer.LimitedDataBufferList.raiseLimitExc...
2020-09-04 11:08:15 13822 2
微服务网关入门.zip
2020-05-30
solarized.zip
2020-04-30
敏捷开发中如何编写设计文档,大到系统,小到功能
2023-06-09
TA创建的收藏夹 TA关注的收藏夹
TA关注的人