当前位置:网站首页>Technology sharing | common interface protocol analysis
Technology sharing | common interface protocol analysis
2022-07-06 06:16:00 【The elegance of testing】
Transfer packets between services , Because of different application scenarios , Use different communication protocols for delivery . For example, website access , Often use HTTP Protocol delivery , File transfer usage FTP, Mail delivery use SMTP. The above three types of protocols are in the application layer of the network model . In addition to the common protocols of the application layer , For the transport layer TCP、UDP agreement , as well as Restful Architectural style 、RPC Basic network knowledge such as protocols should be understood and recognized .
Network protocol introduction
Before understanding the specific agreement , You need to know OSI Seven layer model 、TCP/IP Four layer model 、 Five layer architecture these three different network models .
Network protocol model comparison diagram :
OSI The reference model is a conceptual framework for developing standards for coordinating interprocess communication , It is not a standard .
TCP/IP The four layer model is the basic communication architecture of the Internet . It's often seen as a simplified seven level OSI Model .
The five layer agreement is OSI and TCP/IP The synthesis of , The practical application is still TCP/IP Four story structure of .
TCP/IP The protocol stack corresponds to TCP/IP The specific network protocol used in the four layer model .
TCP agreement
TCP The protocol is in the transport layer , A connection oriented 、 reliable 、 Transport layer communication protocol based on byte stream .TCP The working mode of the protocol is that... Is required when establishing a connection “ Three handshakes ”, When terminating the connection, you need to “ Four waves ”.“ Three handshakes ” and “ Four waves ” yes TCP Important knowledge points of the agreement , In the following chapters, we will introduce in detail through the combination of practice and theory .
Applicable scenario
TCP Connection oriented protocol 、 Error retransmission 、 Congestion control and other characteristics , It is suitable for scenarios with high reliability , For example, data transmission involving user information .
UDP agreement
UDP Once the protocol sends the data sent by the application to the network layer , Do not keep data backups . It's only in IP Multiplexing and data verification fields are added to the header of the packet . therefore UDP Packets are often considered unreliable .
Applicable scenario
UDP There is no need to establish a connection in advance 、 Implement simple features , It is very suitable for scenes with high real-time performance , Like streaming media 、 Online games, etc .
HTTP agreement
HTTP Protocol is the most common protocol in interface testing , Is for distributed 、 Application layer protocols for collaborative and hypermedia information systems .HTTP Is the foundation of data communication in the world wide web . The client sends... To the server HTTP request , The server will return the requested data in the response . During the test , It is often necessary to verify the request and response results , So understand HTTP agreement , For interface testing , It's the top priority .
In the following chapters, we will introduce HTTP、HTTPS The difference between agreements , as well as HTTP Basic knowledge information of the agreement .
RESTful agreement
origin
Roy Thomas Fielding Doctor Yu 2000 A style of World Wide Web software architecture proposed in his doctoral dissertation in . Its purpose is to facilitate different software to transmit information in the network .RESTful Is based on HTTP A resource request made on top of a protocol 、 The style of operation , To sum up in one sentence is to use URL To locate resources , Use HTTP Verb description operation .
HTTP The request method is RESTful api Typical applications in :
Be careful : Different companies are using RESTful There are some differences in architectural style .
RPC agreement
RPC The English of is Remote Procedure Call , It's a good interpretation RPC The concept of agreement , That is to realize remote execution by calling local code ,RPC It is mainly used for service invocation within the company .RPC The advantage of the interface is higher transmission efficiency 、 Lower performance loss 、 Built in load balancing strategy 、 Better service governance .
common RPC agreement
Currently commonly used in the industry RPC The main agreements are as follows :
Dubbo:Java High performance based on RPC agreement .
gRPC: High performance general purpose RPC frame , be based on Protocol Buffers.PB It's a language neutral 、 Platform neutral data serialization framework .
Thrift: And gRPC Similar multilingualism RPC frame .
Last : It can be in the official account : Sad spicy bar ! Get one by yourself 216 Page software testing engineer interview guide document information 【 Free of charge 】. And the corresponding video learning tutorial is free to share !, It includes basic knowledge 、Linux necessary 、Shell、 The principles of the Internet 、Mysql database 、 Special topic of bag capturing tools 、 Interface testing tool 、 Test advanced -Python Programming 、Web automated testing 、APP automated testing 、 Interface automation testing 、 Testing advanced continuous integration 、 Test architecture development test framework 、 Performance testing 、 Safety test, etc. .
I recommend one 【Python Automated test communication group :746506216】, We can discuss communication software testing together , Learn software testing together 、 Interview and other aspects of software testing , Help you advance quickly Python automated testing / Test Development , On the road to high pay .
Friends who like software testing , If my blog helps you 、 If you like my blog content , please “ give the thumbs-up ” “ Comment on ” “ Collection ” One Key triple connection !
边栏推荐
- MySQL之数据类型
- [postman] collections - run the imported data file of the configuration
- D - How Many Answers Are Wrong
- 还在为如何编写Web自动化测试用例而烦恼嘛?资深测试工程师手把手教你Selenium 测试用例编写
- Manhattan distance sum - print diamond
- Overview of three core areas of Mathematics: geometry
- Basic knowledge of error
- Left matching principle of joint index
- Detailed explanation of P problem, NP problem, NPC problem and NP hard problem
- 使用Nacos管理配置
猜你喜欢
Function of activation function
黑猫带你学UFS协议第4篇:UFS协议栈详解
异常检测方法总结
Seven imperceptible truths in software testing
Coordinatorlayout+nestedscrollview+recyclerview pull up the bottom display is incomplete
IP day 16 VLAN MPLS configuration
MFC关于长字符串unsigned char与CString转换及显示问题
F - true liars (category and search set +dp)
【Postman】Monitors 监测API可定时周期运行
调用链监控Zipkin、sleuth搭建与整合
随机推荐
模拟卷Leetcode【普通】1219. 黄金矿工
【Postman】Collections-运行配置之导入数据文件
E - 食物链
多线程应用的测试与调试
职场进阶指南:大厂人必看书籍推荐
模拟卷Leetcode【普通】1447. 最简分数
联合索引的左匹配原则
模拟卷Leetcode【普通】1109. 航班预订统计
Nodejs realizes the third-party login of Weibo
在uni-app中使用腾讯视频插件播放视频
Web界面元素的测试
MySQL之数据类型
[wechat applet] build a development tool environment
【API接口工具】postman-界面使用介绍
Manage configuration using Nacos
【Tera Term】黑猫带你学TTL脚本——嵌入式开发中串口自动化神技能
Sqlmap tutorial (III) practical skills II
Idea new UI usage
leaflet 地图
Company video accelerated playback