kong 网关和spring cloud gateway网关性能测试对比
该测试只是简单在同一台机器设备对spring cloud gateway网关和kong网关进行对比,受限于笔者所拥有的资源,此处仅做简单评测。
一、使用spring boot 的auth-service作为服务提供者
该服务提供了一个/health接口,接口返回"OK",运行的地址为:192.168.188.108:8174
二、使用kong 网关代理该服务
2.1、创建service
curl -i -s -X POST http://localhost:8001/services --data name=auth-service --data url='http://192.168.188.108:8174'
2.2. 给服务绑定route
curl -i -X POST http://localhost:8001/services/auth-service/routes --data 'paths[]=/auth-service' --data name=auth-service_route
2.3、测试通过kong网关来进行访问
[root@localhost ~]# curl -X GET http://192.168.188.101:8000/auth-service/health
ok
2.4、使用upstream来进行负载均衡
- 创建upstream
curl -X POST http://localhost:8001/upstreams --data name=auth_upstream
- 给upstream绑定目标服务
curl -X POST http://localhost:8001/upstreams/auth_upstream/targets --data target='192.168.188.108:8174'
curl -X POST http://localhost:8001/upstreams/auth_upstream/targets --data target='192.168.188.108:8176'
- 更新service指定的url地址
curl -X PATCH http://localhost:8001/services/auth-service --data host='auth_upstream'
三、搭建spring cloud 的gateway网关环境
<?xml version="1.0" encoding="UTF-8"?>
<!--suppress MavenPropertyInParent -->
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>api-module-gateways</artifactId><groupId>com.api</groupId><version>${env.project.version}</version></parent><modelVersion>4.0.0</modelVersion><artifactId>manager-gateway</artifactId><packaging>jar</packaging><description>后台管理网关</description><properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target></properties><!-- 具体的jar包依赖 --><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId><exclusions><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-logging</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-gateway</artifactId></dependency><!-- 注册中心与配置中心 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-openfeign-core</artifactId></dependency><dependency><groupId>io.github.openfeign</groupId><artifactId>feign-okhttp</artifactId></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><scope>provided</scope></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>2.1.0.RELEASE</version><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build></project>
bootstrap.yaml
server:port: 8171
spring:cloud:gateway:discovery:locator:enabled: true routes:- id: auth-serviceuri: lb://auth-servicepredicates:- Path=/auth-service/**filters:- RewritePath=/auth-service/(?<path>.*), /$\{path}
feign:client:config:default:connectTimeout: 10000readTimeout: 10000
open:gateway:excludes: skipUrl:- /config/all/content- /auth/manager/captcha- /auth/manager/login- /auth/manager/isAlreadylogin- /config/dick/selectAllDick- /config/menu/selectTreeDick- /health
测试接口能否正常使用:
curl -X GET http://192.168.188.108:8171/auth-service/health
四、性能测试对比
4.1、1000个请求、100并发场景
-
kong 网关
[root@localhost wrk-4.2.0]# ab -n 1000 -c 100 http://192.168.188.101:8000/auth-service/health This is ApacheBench, Version 2.3 <$Revision: 1430300 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.188.101 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests Finished 1000 requestsServer Software: kong/3.9.0.0-enterprise-edition Server Hostname: 192.168.188.101 Server Port: 8000Document Path: /auth-service/health Document Length: 2 bytesConcurrency Level: 100 Time taken for tests: 0.321 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 325331 bytes HTML transferred: 2000 bytes Requests per second: 3112.66 [#/sec] (mean) Time per request: 32.127 [ms] (mean) Time per request: 0.321 [ms] (mean, across all concurrent requests) Transfer rate: 988.91 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max Connect: 1 8 3.9 8 17 Processing: 3 21 9.9 18 67 Waiting: 3 19 9.3 15 62 Total: 10 29 10.8 28 79Percentage of the requests served within a certain time (ms)50% 2866% 3075% 3380% 3690% 4495% 4898% 6299% 70100% 79 (longest request)
-
spring cloud gateway
[root@localhost wrk-4.2.0]# ab -n 1000 -c 100 http://192.168.188.108:8171/auth-service/health
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.188.108 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requestsServer Software:
Server Hostname: 192.168.188.108
Server Port: 8171Document Path: /auth-service/health
Document Length: 2 bytesConcurrency Level: 100
Time taken for tests: 0.676 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 182000 bytes
HTML transferred: 2000 bytes
Requests per second: 1478.79 [#/sec] (mean)
Time per request: 67.623 [ms] (mean)
Time per request: 0.676 [ms] (mean, across all concurrent requests)
Transfer rate: 262.83 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max
Connect: 0 9 7.2 7 32
Processing: 13 55 19.6 50 108
Waiting: 12 53 18.5 50 104
Total: 24 63 18.4 57 113Percentage of the requests served within a certain time (ms)50% 5766% 6975% 7880% 8290% 9095% 9898% 10599% 111100% 113 (longest request)
4.2、10000个请求、100并发场景
-
kong网关
[root@localhost wrk-4.2.0]# ab -n 10000 -c 100 http://192.168.188.101:8000/auth-service/health This is ApacheBench, Version 2.3 <$Revision: 1430300 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.188.101 (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Completed 10000 requests Finished 10000 requestsServer Software: kong/3.9.0.0-enterprise-edition Server Hostname: 192.168.188.101 Server Port: 8000Document Path: /auth-service/health Document Length: 2 bytesConcurrency Level: 100 Time taken for tests: 1.549 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Total transferred: 3250520 bytes HTML transferred: 20000 bytes Requests per second: 6455.87 [#/sec] (mean) Time per request: 15.490 [ms] (mean) Time per request: 0.155 [ms] (mean, across all concurrent requests) Transfer rate: 2049.31 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max Connect: 1 5 2.0 5 13 Processing: 2 10 4.4 10 44 Waiting: 2 10 4.0 9 42 Total: 4 15 5.0 14 49Percentage of the requests served within a certain time (ms)50% 1466% 1675% 1880% 1990% 2395% 2598% 2899% 31100% 49 (longest request)
-
spring cloud gateway
[root@localhost wrk-4.2.0]# ab -n 10000 -c 100 http://192.168.188.108:8171/auth-service/health
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.188.108 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requestsServer Software:
Server Hostname: 192.168.188.108
Server Port: 8171Document Path: /auth-service/health
Document Length: 2 bytesConcurrency Level: 100
Time taken for tests: 4.399 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 1820000 bytes
HTML transferred: 20000 bytes
Requests per second: 2273.37 [#/sec] (mean)
Time per request: 43.988 [ms] (mean)
Time per request: 0.440 [ms] (mean, across all concurrent requests)
Transfer rate: 404.06 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max
Connect: 0 4 4.7 2 36
Processing: 6 40 9.5 39 89
Waiting: 6 39 9.7 38 89
Total: 13 44 8.7 42 91Percentage of the requests served within a certain time (ms)50% 4266% 4575% 4780% 4990% 5595% 5998% 6699% 72100% 91 (longest request)
4.3、100000个请求、500并发场景
-
kong网关
[root@localhost wrk-4.2.0]# ab -n 100000 -c 500 http://192.168.188.101:8000/auth-service/health This is ApacheBench, Version 2.3 <$Revision: 1430300 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.188.101 (be patient) Completed 10000 requests Completed 20000 requests Completed 30000 requests Completed 40000 requests Completed 50000 requests Completed 60000 requests Completed 70000 requests Completed 80000 requests Completed 90000 requests Completed 100000 requests Finished 100000 requestsServer Software: kong/3.9.0.0-enterprise-edition Server Hostname: 192.168.188.101 Server Port: 8000Document Path: /auth-service/health Document Length: 2 bytesConcurrency Level: 500 Time taken for tests: 14.316 seconds Complete requests: 100000 Failed requests: 0 Write errors: 0 Total transferred: 32598168 bytes HTML transferred: 200000 bytes Requests per second: 6985.06 [#/sec] (mean) Time per request: 71.581 [ms] (mean) Time per request: 0.143 [ms] (mean, across all concurrent requests) Transfer rate: 2223.64 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max Connect: 0 33 64.3 29 3032 Processing: 13 38 18.7 35 353 Waiting: 3 37 18.5 35 352 Total: 23 70 67.0 65 3067Percentage of the requests served within a certain time (ms)50% 6566% 6775% 6980% 7190% 7595% 8198% 9399% 120100% 3067 (longest request)
-
spring cloud gateway
[root@localhost wrk-4.2.0]# ab -n 100000 -c 500 http://192.168.188.108:8171/auth-service/health
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.188.108 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requestsServer Software:
Server Hostname: 192.168.188.108
Server Port: 8171Document Path: /auth-service/health
Document Length: 2 bytesConcurrency Level: 500
Time taken for tests: 41.851 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 18200000 bytes
HTML transferred: 200000 bytes
Requests per second: 2389.42 [#/sec] (mean)
Time per request: 209.256 [ms] (mean)
Time per request: 0.419 [ms] (mean, across all concurrent requests)
Transfer rate: 424.68 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max
Connect: 0 130 711.8 2 15067
Processing: 7 73 13.3 71 285
Waiting: 6 73 13.0 70 234
Total: 19 203 712.8 74 15156Percentage of the requests served within a certain time (ms)50% 7466% 7775% 8180% 8490% 10495% 107898% 307299% 3093100% 15156 (longest request)
kong网关与Spring cloud网关的性能对比 | |||
---|---|---|---|
测试场景 | 指标 | Kong 网关 | Spring Cloud Gateway |
十万 请求, 10并发 | 请求完成时间 (秒) | 37.815 | 53.754 |
每秒请求数 (#/sec) | 2644.48 | 1860.34 | |
平均每个请求时间 (ms) | 3.781 | 5.375 | |
传输速率 (Kbytes/sec) | 839.31 | 330.65 | |
50% 响应时间 (ms) | 3 | 5 | |
95% 响应时间 (ms) | 8 | 7 | |
最大响应时间 (ms) | 20 | 83 | |
十万 请求, 50并发 | 请求完成时间 (秒) | 17.018 | 39.327 |
每秒请求数 (#/sec) | 5876.28 | 2542.79 | |
平均每个请求时间 (ms) | 8.509 | 19.663 | |
传输速率 (Kbytes/sec) | 1865.07 | 451.94 | |
50% 响应时间 (ms) | 8 | 19 | |
95% 响应时间 (ms) | 13 | 26 | |
最大响应时间 (ms) | 59 | 162 | |
十万 请求, 100 并发 | 请求完成时间 (秒) | 15.573 | 39.906 |
每秒请求数 (#/sec) | 6421.28 | 2505.89 | |
平均每个请求时间 (ms) | 15.573 | 39.906 | |
传输速率 (Kbytes/sec) | 2031.99 | 445.38 | |
50% 响应时间 (ms) | 15 | 38 | |
95% 响应时间 (ms) | 25 | 55 | |
最大响应时间 (ms) | 76 | 183 | |
十万 请求, 200 并发 | 请求完成时间 (秒) | 14.861 | 41.003 |
每秒请求数 (#/sec) | 6729.09 | 2438.82 | |
平均每个请求时间 (ms) | 29.722 | 82.007 | |
传输速率 (Kbytes/sec) | 2049.31 | 433.46 | |
50% 响应时间 (ms) | 29 | 79 | |
95% 响应时间 (ms) | 42 | 98 | |
最大响应时间 (ms) | 120 | 212 | |
十万 请求, 500 并发 | 请求完成时间 (秒) | 15.054 | 43.48 |
每秒请求数 (#/sec) | 6642.81 | 2299.91 | |
平均每个请求时间 (ms) | 75.269 | 217.4 | |
传输速率 (Kbytes/sec) | 2108.14 | 408.77 | |
50% 响应时间 (ms) | 68 | 81 | |
95% 响应时间 (ms) | 96 | 1091 | |
最大响应时间 (ms) | 1111 | 15144 | |
Kong 网关在高并发情况下整体性能优于 Spring Cloud Gateway,主要体现在更快的响应时间、更高的每秒请求数以及较低的延迟波动。 |
相关文章:

kong 网关和spring cloud gateway网关性能测试对比
该测试只是简单在同一台机器设备对spring cloud gateway网关和kong网关进行对比,受限于笔者所拥有的资源,此处仅做简单评测。 一、使用spring boot 的auth-service作为服务提供者 该服务提供了一个/health接口,接口返回"OK"&…...

【2024 CSDN博客之星】个人收获分享
目录 [ C 语言 ] [ 数据结构 ] [ 算法 ] [ C ] [Linux] [Mysql] [Redis 文档学习] [Docker 云原生] [Git] [Qt] 转眼间大学就过了一年半,这一年半间好像习惯了,开心了那就学会吧,不开心了学会吧就开心了......期间在学习上面也走了…...
Codeforces Round 998 (Div. 3)(部分题解)
补题链接 A. Fibonacciness 思路:了解清楚题意,求得是最大的斐波那契的度,数组只有5个数(最多度为3),能列出其对应的式子 或 或 #include <bits/stdc.h> using namespace std; #define int long long void solve() {int …...

[创业之路-261]:《向流程设计要效率》-1-流程体系的建立是一场全方位的变革,一定会遇到各种阻力,需要全方位、系统性地进行流程管理
目录 一、思想和思维方式的转变 1.1 使能流程的战略 1.2 使能流程的组织 1. 流程决定组织 2. 基于流程分配责权利与资源 3. 从“管控”到“赋能” 1.3 使能流程的人才 1. 人才战略:从职能导向到流程导向 2. 能力模型:从职能专家到作战专家 3. …...

深入理解 Spring 的 Lazy Loading:原理、实现与应用场景
延迟加载(Lazy Loading)是 Spring 容器管理 Bean 的一种策略,指 只有在需要时(调用 getBean() 方法获取 Bean 时)才会实例化该 Bean。这是 Spring 提供的一种优化机制,用于提高启动效率和降低资源占用。 1.…...

扬帆数据结构算法之雅舟航程,漫步C++幽谷——LeetCode刷题之移除链表元素、反转链表、找中间节点、合并有序链表、链表的回文结构
人无完人,持之以恒,方能见真我!!! 共同进步!! 文章目录 一、移除链表元素思路一思路二 二、合并两个有序链表思路:优化: 三、反转链表思路一思路二 四、链表的中间节点思…...

【unity游戏开发之InputSystem——02】InputAction的使用介绍(基于unity6开发介绍)
文章目录 一、InputAction简介1、InputAction是什么?2、示例 二、InputAction参数相关1、点击齿轮1.1 Actions 动作(1)动作类型(Action Type)(2)初始状态检查(Initial State Check&a…...

Excel常用功能总结
Excel 是微软办公软件套装中的一个重要组件,用于数据处理和分析。以下是一些 Excel 的常用功能总结: 基本操作 1.单元格操作:选择、插入、删除单元格、行或列。 2.数据输入:输入文本、数字、日期和时间。 3.格式设置:设…...

【go语言】变量和常量
一、变量 1.1 变量的定义 程序 : 我们向电脑说了一段话,需要电脑才能理解 (沟通机制 ,xxx语言 -- 汇编 -- 机器码),电脑实际上识别的是机器码 : 0 1 1 1 0 1 (高低电频)…...

Node.js——express中间件(全局中间件、路由中间件、静态资源中间件)
个人简介 👀个人主页: 前端杂货铺 🙋♂️学习方向: 主攻前端方向,正逐渐往全干发展 📃个人状态: 研发工程师,现效力于中国工业软件事业 🚀人生格言: 积跬步…...

大语言模型的语境中“越狱”和思维链
大语言模型的语境中“越狱”和思维链 越狱(Jailbreaking) 含义:在大语言模型的语境中,“越狱”是指用户试图绕过语言模型的安全限制和使用规则,让模型生成违反伦理道德、包含有害内容(如暴力、歧视、恶意软件代码等)的输出。这些安全限制是由模型开发者设置的,目的是确…...

JAVA学习记录4
文章为个人学习记录,仅供参考,如有错误请指出。 上期说到IDEA的安装,具体的使用方法就不记录了。这篇主要记录一些基础语法。 类型转换-自动类型转换 类型范围小的变量,可以直接赋值给类型范围大的变量。 在表达式中&…...

手机网络性能测试仪器介绍
手机网络性能测试仪器是用于检测和评估手机网络性能的精密设备。这些仪器通常具备多种测试功能,以确保手机在不同网络环境下的表现都能得到准确评估。以下是对手机网络性能测试仪器的详细介绍: 一、主要类型 手机综合测试仪:如R&SCMU200…...

vue3+ts watch 整理
watch() 一共可以接受三个参数,侦听数据源、回调函数和配置选项 作用:监视数据的变化(和Vue2中的watch作用一致) 特点:Vue3中的watch只能监视以下四种数据: ref定义的数据。 reactive定义的数据。 函数返…...

【Elasticsearch入门到落地】6、索引库的操作
接上篇《5、安装IK分词器》 上一篇我们进行了IK分词器的安装与测试,本篇我们来学习ElasticSearch的索引库的操作,学习mapping映射属性以及CRUD操作。 一、前情回顾 我们在前几篇学习了ElasticSearch的基本概念,并动手搭建了ElasticSearch环…...

Java TCP可靠传输(1)
TCP 可靠传输 一. 确认应答 由发送方填充,再由接收方在序号的基础上1,填充到确认序号中,来表示已经接收到前面发送的,表明下一个从哪个位置发送。 二. 超时重传 数据在网络上传输时会经过很多网络设备,如果其中一个…...

ipad和macbook同步zotero文献附件失败的解决办法
背景:我所有的文献及其附件pdf都是在台式机(windows系统),想要把这些文献同步到云上,然后再从云上同步到平板和其他笔记本电脑比如macbook。文献同步虽已成功,但文献附件都无法打开。 平板报错如下…...

linux-ubuntu学习笔记碎记
~指/home/user_name这个目录 查看软件安装目录:whereis vim 查看当前路径:pwd 终端中键入ctrls会挂起终端,即终端不响应键鼠;ctrlq可以恢复。 和虚拟机开启共享文件夹互传文件 点击桌面,按ctrlaltt,开…...

RV1126+FFMPEG推流项目(11)编码音视频数据 + FFMPEG时间戳处理
本节介绍本章节主要讲解的是push_server_thread线程的具体处理流程, push_server_thread这个线程的主要功能是通过时间戳比较,来处理音频、视频的数据并最终推流到SRT、RTMP、UDP、RTSP服务器 push_server_thread:流程如下 上图,…...

人工智能的出现,给生命科学领域的研究带来全新的视角|行业前沿·25-01-22
小罗碎碎念 今天和大家分享一份白皮书,系统总结并陈述人工智能在生命科学领域的应用。 人工智能在生命科学领域的应用,具体包括——单细胞转录组、疾病诊疗、医疗文本处理、RNA结构预测等多个方面,通过这份报告,我们可以详细了解相…...

python注释格式总结
三个双引号的用于文件,类,函数注释。 没有统一的规定,以下是比较清晰的写法。 文件注释(文件顶部):文件用途空行作者信息(每行一个键:值) 类注释(类名下行)…...

Django实现数据库的表间三种关系
Django实现数据库的表间三种关系 1. 一对多(One-to-Many)关系示例:关系说明:查询示例: 2. 一对一(One-to-One)关系示例:关系说明:查询示例: 3. 多对多&#x…...

C++蓝桥真题讲解
本篇文章和大家一起来试试一些简单的蓝桥真题 注意:本篇文章将全程使用devc和蓝桥官网,如果有小伙伴找不到devc安装包的可以本篇文章中下载。 赛前必知点 1.正式比赛时,先从蓝桥官网下载题目文档,然后用devc进行编译,…...

【21】Word:德国旅游业务❗
目录 题目 NO1.2.3 NO4 NO5.6 NO7 NO8.9.10.11 题目 NO1.2.3 F12:另存为布局→页面设置→页边距:上下左右选中“德国主要城市”→开始→字体对话框→字体/字号→文本效果:段落对话框→对齐方式/字符间距/段落间距 NO4 布局→表对话框…...

如何分辨ddos攻击和cc攻击?
DDoS(分布式拒绝服务)攻击和 CC(Challenge Collapsar)攻击都属于网络攻击手段,主要通过消耗目标服务器资源使其无法正常提供服务,但它们在攻击原理、攻击特征等方面存在区别: 攻击原理 DDoS 攻…...

enum EPOLL_EVENTS详解
enum EPOLL_EVENTS 是 Linux 中 epoll 机制的核心定义之一,它定义了 epoll 支持的所有事件类型。每个事件类型对应一个唯一的位掩码(bitmask),通过按位或(|)可以组合多个事件类型,通过按位与&am…...

阿里前端开发规范
文章目录 1. 为什么前端写代码要规范?一、代码规范的必要性二、 规范带来的好处 2. 资源一、推荐 1. 为什么前端写代码要规范? 一、代码规范的必要性 可维护性 统一的代码风格便于理解和修改减少代码维护成本降低项目交接难度 团队协作 提高团队开发效…...

从函数式编程到响应式编程:现代开发中的范式转变
引言 随着软件开发领域的不断进化,编程范式也在经历着一场又一场的变革。从面向过程到面向对象,再到近年来流行的函数式编程和响应式编程,开发者正逐步适应不同的编程思想来解决现代软件开发中的复杂问题。本文将带你了解函数式编程和响应式编…...

Django学习笔记(启动项目)-03
Django学习笔记(启动项目)-03 1、在urls文件中配置一个路由url 2、在views文件中创建视图函数 3、启动项目测试结果 # 输入项目启动命令 python manage.py runserver4、创建HTML模版和静态文件 1、在templates文件夹中创建一个html 2、创建url路由与视图函数 3、测试效果 4、…...

量变引起质变
量变引起质变,这个是最本质的规律,重复进行一件事情,这件事情就会越来越完善,越来越完美,哪怕是菜鸟,重复多了就是大佬。 我从说话结结巴巴,到说话流畅,只是用了15天直播写代码&…...