当前位置: 首页 > news >正文

DPVS-5: 后端服务监控原理与测试

后端监控原理

被动监测

DPVS自带了被动监控,通过监控后端服务对外部请求的响应情况,判断服务器是否可用。

DPVS的被动监测,并不能获取后端服务器的详细情况,仅仅通过丢包/拒绝情况来发觉后端服务是否可用。

TCP session state transfers from SYN_RECV to CLOSE
TCP session state transfers from SYN_SENT to CLOSE
TCP session expired from SYN_RECV state
TCP session expired from SYN_SENT state
TCP synproxy step 3 received RST when awaiting SYN/ACK from backend
UDP session expired from ONEWAY state

后端服务状态变换

RS服务有4种状态 UP, DOWN, DOWN-WAIT , UP-WARM

UP : 允许访问

DOWN: 不允许访问

DOWN-WAIT:允许访问

UP-WARM:允许访问

整体的状态转换如图

在这里插入图片描述

详细变换逻辑

更细致的状态转换,分为master lcore (控制面worker), slave lcore(数据面 worker) ,下图为官方图

在这里插入图片描述
在这里插入图片描述

后端服务失效的流程

slave 检测服务失败 , 进入DOWN-WAIT, 同时发送Down notice master, master 也进入DOWN-WAIT

当Master接收的Down notice达到阈值(默认为1),进入DOWN, 广播Close notice至所有slave,所有slave进入DOWN。 这样所有lcore中的该后端服务状态都为DOWN了。

后端服务尝试恢复流程

在进入DOWN时,master lcore会启动一个抑制时间的定时器,到期后,广播Open notice至所有slave, 所有slave进入到 UP-WARM状态,此时,外部请求可以分配到这个后端服务。

slave再次检测到该服务不可用,回到后端服务失效逻辑中去,后面的抑制时间会加倍。

后端服务恢复成功流程

当服务器在UP-WARM状态,slave 检测该服务可用,并且已到达可用次数阈值(默认为1),进入UP状态,同时发送Up notice给master, 该后端服务在所有lcore中为UP状态。

后端服务其他情况

slave在UP时, 收到Close notice, 直接进入DOWN状态。 这里的Close notice来自于master, master可以因为外部控制指令等直接DOWN掉后端服务。

这里的消息有

Down notice , slave to master , 单播

Up notice, slave to maser , 单播

Close notice , master to slave, 多播

Open notice, master to slave, 多播

监控测试

未开启后端监测

默认之前的双臂配置
https://blog.csdn.net/jacicson1987/article/details/145803532

# 添加VIP
./dpip addr add 10.0.0.100/32 dev dpdk0# 添加负载均衡服务 ,  轮询模式
./ipvsadm -A -t 10.0.0.100:80 -s rr# 添加 3个RS, FULLNAT 模式
./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.3:80 -b
./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.4:80 -b
./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.5:80 -b# 为负载均衡服务 10.0.0.100:80 添加一个LOCAL IP 在dpdk1上
./ipvsadm --add-laddr -z 192.168.100.200 -t 10.0.0.100:80 -F dpdk1# 添加路由
./dpip route add 10.0.0.0/16 dev dpdk0
./dpip route add 192.168.100.0/24 dev dpdk1

访问正常

[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 2 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 1 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 2 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 0 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 1 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 2 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 1 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 0 !
[root@dkdp192 ~]# 

关闭Server 0

root@ubuntu22:~# systemctl stop nginx 
root@ubuntu22:~# 

再测试, 发现请求还是会按照原有的轮询分配到已经disable的 Server 0上去,导致拒绝连接。

[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 2 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 2 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 1 !
[root@dkdp192 ~]# curl 10.0.0.100:80
curl: (7) Failed to connect to 10.0.0.100 port 80: Connection refused
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 1 !
[root@dkdp192 ~]# curl 10.0.0.100:80
curl: (7) Failed to connect to 10.0.0.100 port 80: Connection refused
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 2 !
[root@dkdp192 ~]# curl 10.0.0.100:80
This is Server 2 !

开启后端被动监测

配置如下

./dpip addr add 10.0.0.100/32 dev dpdk0# 添加负载均衡功能服务时,开启被动监测
./ipvsadm -A -t 10.0.0.100:80 -s rr --dest-check default./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.3:80 -b
./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.4:80 -b
./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.5:80 -b
./ipvsadm --add-laddr -z 192.168.100.200 -t 10.0.0.100:80 -F dpdk1./dpip route add 10.0.0.0/16 dev dpdk0
./dpip route add 192.168.100.0/24 dev dpdk1

RS已配置

root@r750-132:~/dpvs/bin# ./ipvsadm  -ln
IP Virtual Server version 1.9.8 (size=0)
Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.0.0.100:80 rr dest-check internal:default-> 192.168.100.3:80             FullNat 1      0          0         -> 192.168.100.4:80             FullNat 1      0          0         -> 192.168.100.5:80             FullNat 1      0          0   

测试脚本

1秒发一次请求,打印响应,如果没有打印,说明访问失败

#!/bin/bashURL="http://10.0.0.100:80"for i in {1..200}
doecho -n "$i: "response=$(curl -s $URL)  # 将 curl 的输出保存到变量 response 中if [ -z "$response" ]; then  # 判断 response 是否为空echo  # 如果为空,输出换行符elseecho "$response"  # 如果不为空,输出 responsefisleep 1
done
失效测试

先开启测试脚本, 在关闭Server 0的 nginx。

第10秒的时候,访问 Server 0 失败

第16秒(+6s),访问Server 0 失败

第26秒(+10s), 访问Server 0 失败

第47秒(+21s). 访问Server 0 失败

第89秒(+42s), 访问Server 0 失败

由此可见,对于DOWN的服务器抑制时间是指数增加的。 (实际是用5s开始,最大3600s)

这里的后端服务状态 在 DOWN – UP-WARM – DOWN-WAIT 之间一直循环。

[root@dkdp192 ~]# ./long_curl.sh 
1: This is Server 0 !
2: This is Server 0 !
3: This is Server 1 !
4: This is Server 0 !
5: This is Server 1 !
6: This is Server 2 !
7: This is Server 2 !
8: This is Server 1 !
9: This is Server 1 !
10: 
11: This is Server 2 !
12: This is Server 2 !
13: This is Server 2 !
14: This is Server 2 !
15: This is Server 2 !
16: 
17: This is Server 2 !
18: This is Server 2 !
19: This is Server 1 !
20: This is Server 1 !
21: This is Server 1 !
22: This is Server 1 !
23: This is Server 1 !
24: This is Server 2 !
25: This is Server 2 !
26: 
27: This is Server 2 !
28: This is Server 1 !
29: This is Server 2 !
30: This is Server 2 !
31: This is Server 1 !
32: This is Server 1 !
33: This is Server 1 !
34: This is Server 2 !
35: This is Server 1 !
36: This is Server 2 !
37: This is Server 1 !
38: This is Server 1 !
39: This is Server 2 !
40: This is Server 1 !
41: This is Server 2 !
42: This is Server 2 !
43: This is Server 1 !
44: This is Server 2 !
45: This is Server 1 !
46: This is Server 2 !
47: 
48: This is Server 2 !
49: This is Server 1 !
50: This is Server 1 !
51: This is Server 2 !
52: This is Server 1 !
53: This is Server 2 !
54: This is Server 1 !
55: This is Server 2 !
56: This is Server 1 !
57: This is Server 1 !
58: This is Server 2 !
59: This is Server 1 !
60: This is Server 2 !
61: This is Server 2 !
62: This is Server 1 !
63: This is Server 2 !
64: This is Server 2 !
65: This is Server 2 !
66: This is Server 1 !
67: This is Server 2 !
68: This is Server 1 !
69: This is Server 1 !
70: This is Server 2 !
71: This is Server 1 !
72: This is Server 2 !
73: This is Server 2 !
74: This is Server 1 !
75: This is Server 2 !
76: This is Server 1 !
77: This is Server 1 !
78: This is Server 1 !
79: This is Server 2 !
80: This is Server 1 !
81: This is Server 1 !
82: This is Server 2 !
83: This is Server 1 !
84: This is Server 2 !
85: This is Server 2 !
86: This is Server 2 !
87: This is Server 1 !
88: This is Server 1 !
89: 
90: This is Server 1 !
91: This is Server 2 !
92: This is Server 1 !
93: This is Server 1 !
94: This is Server 2 !
95: This is Server 2 !
96: This is Server 2 !
97: This is Server 2 !
98: This is Server 2 !
99: This is Server 1 !
100: This is Server 2 !
101: This is Server 2 !
服务器状态

Server 0是抑制状态inhibited.

root@r750-132:~/dpvs/bin# ./ipvsadm  -ln
IP Virtual Server version 1.9.8 (size=0)
Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.0.0.100:80 rr dest-check internal:default-> 192.168.100.3:80             FullNat 0      0          0          inhibited-> 192.168.100.4:80             FullNat 1      0          4         -> 192.168.100.5:80             FullNat 1      0          4   
查看日志

与测试结果完全对应,失效的后端服务,抑制时间也是 5s, 10s, 20s , 40s …


SERVICE: [cid 07, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited no, warm_up_count 0] detect dest DOWN
SERVICE: [cid 00, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited yes, down_notice_recvd 1, inhibit_duration 5s, origin_weight 0] notify slaves DOWN
SERVICE: [cid 00, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 0, inhibited yes, down_notice_recvd 1, inhibit_duration 10s, origin_weight 1] notify slaves UP
SERVICE: [cid 06, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited no, warm_up_count 1] detect dest DOWN
SERVICE: [cid 00, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited yes, down_notice_recvd 1, inhibit_duration 10s, origin_weight 0] notify slaves DOWN
SERVICE: [cid 00, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 0, inhibited yes, down_notice_recvd 1, inhibit_duration 20s, origin_weight 1] notify slaves UP
SERVICE: [cid 04, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited no, warm_up_count 1] detect dest DOWN
SERVICE: [cid 00, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited yes, down_notice_recvd 1, inhibit_duration 20s, origin_weight 0] notify slaves DOWN
SERVICE: [cid 00, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 0, inhibited yes, down_notice_recvd 1, inhibit_duration 40s, origin_weight 1] notify slaves UP
恢复测试

开启Server 0 nginx

[root@dkdp192 ~]# ./long_curl.sh 
1: This is Server 2 !
2: This is Server 2 !
3: 
4: This is Server 2 !
5: This is Server 2 !
6: This is Server 1 !
7: This is Server 2 !
8: This is Server 2 !
9: This is Server 1 !
10: This is Server 1 !
11: This is Server 2 !
12: This is Server 2 !
13: This is Server 1 !
14: This is Server 1 !
15: This is Server 1 !
16: This is Server 2 !
17: This is Server 2 !
18: This is Server 1 !
19: This is Server 1 !
20: This is Server 1 !
21: This is Server 2 !
22: This is Server 2 !
23: This is Server 2 !
24: This is Server 1 !
25: This is Server 1 !
26: This is Server 0 !
27: This is Server 2 !
28: This is Server 0 !
29: This is Server 0 !
30: This is Server 1 !
31: This is Server 1 !
32: This is Server 1 !
33: This is Server 0 !
服务器状态

Server 0 在连通后,恢复状态

root@r750-132:~/dpvs/bin# ./ipvsadm  -ln
IP Virtual Server version 1.9.8 (size=0)
Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.0.0.100:80 rr dest-check internal:default-> 192.168.100.3:80             FullNat 1      0          3         -> 192.168.100.4:80             FullNat 1      0          3         -> 192.168.100.5:80             FullNat 1      0          1 
查看日志

多个slave worker检测到后端恢复

SERVICE: [cid 06, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited no, warm_up_count 1] detect dest UP
SERVICE: [cid 04, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited no, warm_up_count 1] detect dest UP
SERVICE: [cid 07, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited no, warm_up_count 1] detect dest UP
SERVICE: [cid 08, tcp, svc 10.0.0.100:80, rs 192.168.100.3:80, weight 1, inhibited no, warm_up_count 1] detect dest UP

相关文章:

DPVS-5: 后端服务监控原理与测试

后端监控原理 被动监测 DPVS自带了被动监控,通过监控后端服务对外部请求的响应情况,判断服务器是否可用。 DPVS的被动监测,并不能获取后端服务器的详细情况,仅仅通过丢包/拒绝情况来发觉后端服务是否可用。 TCP session state…...

前端基础知识

1. 变量和常量 1.1 变量 // 变量let name Jacklet age 20name lisiage 18 1.2 常量 // 常量const PI 3.14// PI 3.1415926 // error,常量不可重新赋值const articleList []const user {name: vue3,age: 10} 1.3 const 声明的数组和对象 因为数组和对象在…...

从零到一学习c++(基础篇--筑基期十一-类)

从零到一学习C(基础篇) 作者:羡鱼肘子 温馨提示1:本篇是记录我的学习经历,会有不少片面的认知,万分期待您的指正。 温馨提示2:本篇会尽量用更加通俗的语言介绍c的基础,用通俗的语言去…...

Linux 第三次脚本作业

源码编译安装httpd 2.4,提供系统服务管理脚本并测试(建议两种方法实现) 一、第一种方法 1、把 httpd-2.4.63.tar.gz 这个安装包上传到你的试验机上 2、 安装编译工具 (俺之前已经装好了) 3、解压httpd包 4、解压后的httpd包的文…...

C#与AI的交互(以DeepSeek为例)

C#与ai的交互 与AI的交互使用的Http请求的方式,通过发送请求,服务器响应ai生成的文本 下面是完整的代码,我这里使用的是Ollama本地部署的deepseek,在联网调用api时,则url会有不同 public class OllamaRequester {[Se…...

Sky Hackathon 清水湾的水 AI美食助手

这里写自定义目录标题 视频 视频 video...

基于SpringBoot的校园消费点评管理系统

作者:计算机学姐 开发技术:SpringBoot、SSM、Vue、MySQL、JSP、ElementUI、Python、小程序等,“文末源码”。 专栏推荐:前后端分离项目源码、SpringBoot项目源码、Vue项目源码、SSM项目源码、微信小程序源码 精品专栏:…...

企业财务数据分析-投资回报指标ROA

上一篇文章主要介绍了关于投资回报的核心指标ROE,其实还有一个比较关键的指标资产回报率指标(ROA),资产收益率是用来衡量企业盈利能力的重要财务分析指标。资产收益率越高,说明企业资产的利用效率越高,利用…...

PostgreSQL 支持字段类型

PostgreSQL 支持多种字段类型,以下是常见的主要类别和具体类型的简要概述: 数值类型 SMALLINT:2字节整数,范围 -32768 到 32767 INTEGER:4字节整数,范围 -2147483648 到 2147483647 BIGINT:8字节…...

Deepseek引爆AI热潮 防静电地板如何守护数据中心安全

近期,Deepseek的爆火将人工智能推向了新的高度,也引发了人们对AI背后基础设施的关注。作为AI运行的“大脑”,数据中心承载着海量数据的存储、处理和传输,其安全稳定运行至关重要。而在这背后,防静电地板扮演着不可或缺…...

【ARM】MDK如何生成指定大小的bin文件,并指定空区域的填充数据

1、 文档目标 解决MDK如何生成指定大小的bin文件,并指定空区域的填充数据 2、 问题场景 客户有这样的需求,客户本身的工程编译生成bin文件后,bin文件大小为200k。整体芯片的内存有512k。客户想要最终生成的bin文件可以达到512k的一个情况&a…...

开源基准测试模拟器:BlueROV2 水下机器人的控制

拜读An Open-Source Benchmark Simulator: Control of a BlueROV2 Underwater Robot 非常感谢Esben Uth的帮助。 本文介绍了在 Simulink™ 中实现的常用且低成本的遥控潜水器 (ROV) BlueROV2 的仿真模型环境,该环境已针对水下航行器的基准控…...

Nginx 请求超时

Nginx 请求超时详解 在现代 Web 服务中,Nginx 作为一个高效的 Web 服务器和反向代理服务器,广泛应用于处理大量的 HTTP 请求。随着 Web 应用和服务的复杂性增加,Nginx 在处理客户端请求时,可能会出现超时问题。请求超时是指当客户…...

2022 年学习 Spring Boot 开发的最佳书籍

在我们之前的文章中,我们查看了学习 Java 编程的必读书籍我们在其中探索了一些您可以利用的资源来加快 Java 开发的速度。在此基础上,在用 vanilla Java 编写一段时间后,您将意识到组织文件和其他内容(例如设置 getter 和 setter、…...

JavaScript 前端面试 5()

十:new操作符 1:new操作符是什么 在JavaScript中new操作符是用于创建一个给定构造函数的实例对象 function Person(name,age){ this.name name; this.age age; } Person.protoype.sayName function (){ console,log(this.name) } cost person1 new…...

【Jenkins】显示 HTML 标签

需求 在 Jenkins 中显示 HTML 标签内容(例如格式化的文本、颜色、图标等)是一个常见的需求,如下,编译工程显示当前编译的分支: 但 Jenkins 默认会出于安全考虑(防止 XSS 攻击)转义 HTML 标签&a…...

DeepSeek R1模型提示语技巧:如何高效引导AI生成优质内容

文章目录 明确任务目标提供上下文使用结构化提示指定输出格式控制输出长度调整语气和风格提供示例迭代优化提示语避免歧义结合多轮对话总结 DeepSeek R1是一款基于大规模语言模型的AI工具,能够生成高质量的自然语言内容。为了充分发挥其潜力,用户需要掌握…...

UE5从入门到精通之多人游戏编程常用函数

文章目录 前言一、权限与身份判断函数1. 服务器/客户端判断2. 网络角色判断二、网络同步与复制函数1. 变量同步2. RPC调用三、连接与会话管理函数1. 玩家连接控制2. 网络模式判断四、实用工具函数前言 UE5给我们提供了非常强大的多人网路系统,让我们可以很方便的开发多人游戏…...

NGINX配置TCP负载均衡

前言 之前本人做项目需要用到nginx的tcp负载均衡,这里是当时配置做的笔记;欢迎收藏 关注,本人将会持续更新 文章目录 配置Nginx的负载均衡 配置Nginx的负载均衡 nginx编译安装需要先安装pcre、openssl、zlib等库,也可以直接编译…...

PyTorch torch.logsumexp 详解:数学原理、应用场景与性能优化(中英双语)

PyTorch torch.logsumexp 详解:数学原理、应用场景与性能优化 在深度学习和概率模型中,我们经常需要计算数值稳定的对数概率操作,特别是在处理 softmax 归一化、对数似然计算、损失函数优化 等任务时,直接求和再取对数可能会导致…...

【多模态大模型】端侧语音大模型minicpm-o:手机上的 GPT-4o 级多模态大模型

MiniCPM-o ,它是一款 开源、轻量级 的多模态大语言模型,目标是在手机等资源受限的环境中实现 GPT-4o 级别的多模态能力! 1. MiniCPM-o:小身材,大能量! MiniCPM-o 的名字已经暗示了它的核心特点:Mini (小巧) 和 CPM (中文预训练模型),最后的 “o” 则代表 Omnimodal …...

【Java 优选算法】模拟

欢迎关注个人主页:逸狼 创造不易,可以点点赞吗~ 如有错误,欢迎指出~ 模拟算法的思路比较简单,根据题目描述列出流程,找出规律,将流程转化为代码 替换所有的问号 题目链接 解法 直接根据题目给出条件模拟 示例,找出规律 1.先找出字符?,再…...

计算机网络复习

目录 1. 前言 2.五层模型 1.应用层 2 传输层 3.网络层 4. 数据链路层 ​编辑5. 物理层 3.UDP/TCP协议 UDP协议 TCP协议 4. HTTP/HTTPS协议 1. 前言 博主目前大四, 备战春招, 复习一下计网, 大家也可以看看我的文章. 共同学习, 如有不足之处欢迎指正. 2.五层模型 在计…...

应用层的协议-http/https的状态码

1xx:表示临时响应,需要操作者继续操作 2xx:成功,操作被成功接受并处理 3xx:一般是重定向问题 4xx:客户端的问题 5xx:服务端的问题 1xx: 100: 表示服务器收到客户端的第一部分请…...

文字语音相互转换

目录 1.介绍 2.思路 3.安装python包 3.程序: 4.运行结果 1.介绍 当我们使用一些本地部署的语言模型的时候,往往只能进行文字对话,这一片博客教大家如何实现语音转文字和文字转语音,之后接入ollama的模型就能进行语音对话了。…...

C++之类型转换

目录 C语言中的类型转换 隐式类型转换 强制类型转换 C中的类型转换 static_cast reinterpret_cast const_cast dynamic_cast 本期我们将学习C中类型转换的相关知识点。 C语言中的类型转换 在C语言中,也有过类型转换的情景。 隐式类型转换 隐式类型转换…...

【WSL2】 Ubuntu20.04 GUI图形化界面 VcXsrv ROS noetic Vscode 主机代理 配置

【WSL2】 Ubuntu20.04 GUI图形化界面 VcXsrv ROS noetic Vscode 主机代理 配置 前言整体思路安装 WSL2Windows 环境升级为 WIN11 专业版启用window子系统及虚拟化 安装WSL2通过 Windows 命令提示符安装 WSL安装所需的 Linux 发行版(如 Ubuntu 20.04)查看…...

【数据库】【MySQL】索引

MySQL中索引的概念 索引(MySQL中也叫做"键(key)")是一种数据结构,用于存储引擎快速定找到记录。 简单来说,它类似于书籍的目录,通过索引可以快速找到对应的数据行,而无需…...

大语言模型(LLM)提示词(Prompt)高阶撰写指南

——结构化思维与工程化实践 一、LLM提示词设计的核心逻辑 1. 本质认知 LLM是「超强模式识别器概率生成器」,提示词的本质是构建数据分布约束,通过语义信号引导模型激活特定知识路径。优秀提示词需实现: 精准性:消除歧义&#…...

LabVIEW C编译支持工具库CCompileSupp.llb

路径:C:\Program Files (x86)\National Instruments\LabVIEW 2019\vi.lib\Platform\CCompileSupp.llb ​ 1. 工具库概述 定位:LabVIEW内置的C语言编译支持工具库,用于处理LabVIEW与C/C代码的混合编程接口,涵盖编译器配置、代码生成…...

【安装及调试旧版Chrome + 多版本环境测试全攻略】

👨💻 安装及调试旧版Chrome 多版本环境测试全攻略 🌐 (新手友好版 | 覆盖安装/运行/调试全流程) 🕰️ 【背景篇】为什么我们需要旧版浏览器测试? 🌍 🌐 浏览器世界的“…...

整数二分算法

例题: 给定一个按照升序排列的长度为 n 的整数数组,以及 q个查询。 对于每个查询,返回一个元素 k 的起始位置和终止位置(位置从 0开始计数)。 如果数组中不存在该元素,则返回 -1 -1。 输入格式 第一行…...

【java】this关键字

在 Java 中,this 是一个特殊的关键字,它代表当前对象的引用。简单来说,this 指向当前正在调用方法或构造函数的对象。this 关键字的主要作用是解决变量名冲突、访问当前对象的成员变量或方法,以及在构造函数中调用其他构造函数。 …...

LD_PRELOAD 绕过 disable_function 学习

借助这位师傅的文章来学习通过LD_PRELOAD来绕过disable_function的原理 【PHP绕过】LD_PRELOAD bypass disable_functions_phpid绕过-CSDN博客 感谢这位师傅的贡献 介绍 静态链接: (1)举个情景来帮助理解: 假设你要搬家&#x…...

计算机毕业设计Hadoop+Spark+DeepSeek-R1大模型民宿推荐系统 hive民宿可视化 民宿爬虫 大数据毕业设计(源码+文档+PPT+讲解)

温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 作者简介:Java领…...

MySQL后端返回给前端的时间变了(时区问题)

问题:MySQL里的时间例如为2025-01-10 21:19:30,但是返回到前端就变成了2025-01-10 13:19:30,会出现小时不一样或日期变成隔日的问题 一般来说设计字段时会使用datetime字段类型,这是一种用于时间的字段类型,而这个类型…...

Apache Doris:一款高性能的实时数据仓库

Apache Doris 是一款基于 MPP 架构的高性能、实时分析型数据库。它以高效、简单和统一的特性著称,能够在亚秒级的时间内返回海量数据的查询结果。Doris 既能支持高并发的点查询场景,也能支持高吞吐的复杂分析场景。 Apache Doris 最初是百度广告报表业务…...

【量化-什么是信息?怎么有效的学习?关键字摘取】

到底什么是信息呢?我们怎么衡量信息的价值与多少呢?今天,我们就来说说这个问题。 怎么量化信息? 信息,只有量化了才能被准确地讨论,而量化的方法就和事件发生的概率密切相关。或者说得直白一些&#xff0…...

Java之异常体系

异常:异常就是代表程序出现问题 异常的继承体系: Error:严重异常,内存溢出等 其他异常:编译时异常:编译阶段就要进行处理的异常(提醒程序员检查本地信息) RuntimeException&#…...

网络运维学习笔记(DeepSeek优化版)002网工初级(HCIA-Datacom与CCNA-EI)子网划分与协议解析

文章目录 子网划分与协议解析1. VLSM与CIDR技术解析1.1 VLSM(Variable Length Subnetwork Mask,可变长子网掩码)1.2 CIDR(Classless Inter-Domain Routing,无类域间路由) 2. 子网划分方法与计算2.1 常规划分…...

【Linux知识】Linux上从源码编译到软件安装全过程详细说明

文章目录 **1. 下载源码****(1) 使用 wget 或 curl 下载****(2) 解压源码** **2. 配置编译环境****(1) 执行 ./configure 脚本**常见参数说明: **3. 编译源码****(1) 执行 make** **4. 安装软件****(1) 执行 make install****(2) 自定义安装路径** **5. 验证安装***…...

【尝试使用python调用Seismic unix】

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 前言一、代码总结 前言 提示:这里可以添加本文要记录的大概内容: 使用seismic unix尝试建立界面,首先想到使用pyqt&#xff0c…...

JSON Web Token在登陆中的使用

JWT(JSON Web Token)是一种开放标准(RFC 7519),用于在网络应用环境间安全地传递声明。它的主要用途是身份验证和信息交换。在微服务架构中,JWT 作为认证机制非常常见,特别是与 API 网关结合使用…...

CSS滚动条原理与自定义样式指南,CSS滚动条样式失效,滚动条样式无效,-webkit-scrollbar无效,overflow不显示滚动条

滚动内容形成的必要条件 CSS Overflow属性解析 MDN官方文档-Overflow属性 菜鸟教程-Overflow属性 overflow 属性控制内容溢出元素框时在对应的元素区间内是否添加滚动条。 值描述visible默认值。内容不会被修剪,会呈现在元素框之外。hidden内容会被修剪&#xf…...

陀螺匠·企业助手v1.8 产品介绍

陀螺匠企业助手是一套采用Laravel 9框架结合Swoole高性能协程服务与Vue.js前端技术栈构建的新型智慧企业管理与运营系统。该系统深度融合了客户管理、项目管理、审批流程自动化以及低代码开发平台,旨在为企业提供一站式、数字化转型的全方位解决方案,助力…...

【数据结构】(11) Map 和 Set

一、Map 和 Set 的简介 1、Set 和 Map Map 和 Set 是集合类框架学习的最后一部分。Map 和 Set 都是接口,需要通过 TreeSet、HashSet 和 TreeMap、HashMap 实例化。注意,Set 实现了 Collection,Map 并没有。 Set 存放的是键(Key&a…...

DeepSeek 提示词:高效的提示词设计

🧑 博主简介:CSDN博客专家,历代文学网(PC端可以访问:https://literature.sinhy.com/#/?__c1000,移动端可微信小程序搜索“历代文学”)总架构师,15年工作经验,精通Java编…...

【Redis】在Java中以及Spring环境下操作Redis

Java环境下&#xff1a; 1.创建maven 项目 2.导入依赖 <!-- redis --><dependency><groupId>redis.clients</groupId><artifactId>jedis</artifactId><version>4.3.2</version></dependency> 此处使用的是Jedis&…...

Linux红帽:RHCSA认证知识讲解(二)配置网络与登录本地远程Linux主机

Linux红帽&#xff1a;RHCSA认证知识讲解&#xff08;二&#xff09;配置网络与登录本地远程Linux主机 前言一、使用命令行&#xff08;nmcli 命令&#xff09;配置网络&#xff0c;配置主机名第一步第二步修改主机名称 二、使用图形化界面&#xff08;nmtui 命令&#xff09;配…...

新数据结构(13)——I/O

字符流 字符输入流&#xff08;Reader&#xff09; 字符输入流用于从数据源&#xff08;如文件、字符串等&#xff09;读取字符数据。Reader 是所有字符输入流的抽象基类。 常用实现类 FileReader 用于从文件中读取字符数据。 InputStreamReader 将字节流转换为字符流&…...