一、Redis 集群原理 1,基本介绍 在 Redis 集群中,所有的 Redis 节点彼此互联,节点内部使用二进制协议优化速度和带宽。当一个节点挂掉后,集群中超过半数的节点检测失效时才认为该节点已失效。 不同于 Tomcat 集群需要使用反向代理服务器,Redis 集群中的任意节点都可以直接和 J ...
分类:
其他好文 时间:
2021-07-05 18:04:15
阅读次数:
0
既然是依据优先级运行线程,那我们就来看看优先级在线程中是怎么存在的 1 struct thread 2 { 3 /* Owned by thread.c. */ 4 tid_t tid; /* Thread identifier. */ 5 enum thread_status status; /* ...
分类:
其他好文 时间:
2021-07-05 17:24:12
阅读次数:
0
writedby 张艳涛 长连接是HTTP/1.1的特征之一,1.1出现的原因是因为一个客户请求一个网页,这是一个http请求,这个网页中如果有图片,那么也会变为一个http请求,对于java客户端,一个http请求 是通过socket.getinputstream.cast(PrintWriter ...
分类:
Web程序 时间:
2021-07-05 16:48:32
阅读次数:
0
检测Tomcat日志关键字异常 日常工作中经常会遇到Tomcat日志报特定的错误导致 Linux 服务器CPU暴涨,这时候需要重启应用才可以降下来 所以就需要写一个shell脚本,报出特定的错误就重启应用 shell脚本如下: [root@Mike-VM-Node-10_10_0_188 ~]# v ...
分类:
其他好文 时间:
2021-07-02 16:18:28
阅读次数:
0
背景 参考了狂神老师的 Docker 教程,非常棒! https://www.bilibili.com/video/BV1og4y1q7M4?p=15 直接运行容器 本地找不到镜像会自动下载 --rm Automatically remove the container when it exits ...
分类:
其他好文 时间:
2021-07-01 16:48:43
阅读次数:
0
Linux常用命令 1、系统命令 runlevel # 查看当前的运行级别 systemctl status firewalld # 开启网络服务功能 stop # 关闭 restart # 重启 reload # 重载 reboot # 重启 halt # 关机 poweroff # 关机 2、查 ...
分类:
系统相关 时间:
2021-07-01 16:41:50
阅读次数:
0
1、当前集群状态 [kingbase@ECOLABAPP37 bin]$ ./repmgr cluster show ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string + ...
分类:
其他好文 时间:
2021-07-01 16:27:49
阅读次数:
0
current status: We have a remote repository and a local project repository with no git configured. We want to push to remote and create new branch. Pr ...
分类:
其他好文 时间:
2021-07-01 16:24:13
阅读次数:
0
(一)单字符串 1, grep -o "查找字符串" 文件名 | wc -l 2, awk -v RS="@#$j" '{print gsub(/targetStr/,"&")}' filename awk '{s+=gsub(/targetStr/,"&")}END{print s}' filen ...
分类:
系统相关 时间:
2021-06-30 17:41:59
阅读次数:
0
1.设置集合中全部元素的某一个属性的值 Integer status = NoticeReadStatusEnum.READED.getCode(); List<NoticeSendRecord> collect = noticeSendRecordList.stream().map(record ...
分类:
编程语言 时间:
2021-06-29 16:11:07
阅读次数:
0