当前位置:网站首页>RPC details
RPC details
2022-06-11 00:44:00 【A music loving programmer】
List of articles
One 、RPC What is it? ?
RPC(Remote Procedure Call) Remote procedure call protocol , An application is deployed in A Server , Want to call B Application provided function methods on the server , Because it's not in a memory space , Can't call directly , We need to express the semantics and data of the call through the network .
RPC The protocol allows one host program to call another host program in the Internet , Programmers do not need to program this interaction process . stay RPC The agreement stresses that A Program call B When a function or method in a program ,A I don't know B The specific implementation of the method in .
RPC It's the upper level agreement , The bottom layer can be based on TCP agreement , It can also be based on HTTP agreement . Generally speaking, we say RPC It's all based on RPC The concrete realization of , Such as :Dubbo frame . In a broad sense, as long as it meets the requirements of communication calls in the network, it is collectively referred to as RPC, even to the extent that HTTP Agreements can be said to be RPC The concrete realization of , But the specific analysis seems RPC The agreement is better than HTTP More efficient protocol , be based on RPC The framework has more functions .
RPC The protocol is based on the distributed architecture , therefore RPC It has unique advantages in distributed projects .
Two 、RPC and HTTP contrast
1. Concrete realization
RPC: Can be based on TCP agreement , It can also be based on HTTP agreement .
HTTP: be based on HTTP agreement
2. efficiency
RPC: Customizing the concrete implementation can reduce many useless message contents , Make the message volume smaller .
HTTP: If it is HTTP 1.1 Many contents in the message are useless . If it is HTTP2.0 Later and RPC Little difference , Than RPC Less likely are some functions such as service governance .
3. How to connect
RPC: Long connection support .
HTTP: Every connection is 3 The second handshake .
4. performance
RPC: Can be based on many serialization methods . Such as :thrift
HTTP: Mainly through JSON, Serialization and deserialization are less efficient .
5. Registry Center
RPC : commonly RPC All have a registration center .
HTTP: It's all direct connection .
6. Load balancing
RPC: most RPC The frameworks all have load balancing measurements .
HTTP: Third party tools are usually required . Such as :nginx
summary
RPC Frameworks generally have rich functions such as service governance , It is more suitable for enterprise internal interface calls . and HTTP It is more suitable for mutual calls between multiple platforms .
边栏推荐
- [no title] 66666
- Is it safe to open an account for stock speculation in Shanghai?
- The mystery of number idempotent and perfect square
- LeetCode 1996. 游戏中弱角色的数量*
- Multipass中文文档-概览
- Unable to return to the default page after page Jump
- Mysql database table backup
- How word removes the header line
- ts+fetch实现选择文件上传
- How to handle file cache and session?
猜你喜欢
随机推荐
[network counting] 1.4 network delay, packet loss and throughput
Rich text activity test 1
阻塞隊列 — DelayedWorkQueue源碼分析
Décomposition détaillée du problème de chemin le plus court du graphique
Yum source update
f‘s‘f‘s‘f‘s‘d
Kubernetes入门介绍与基础搭建
Multipass Chinese documentation - Tutorial
Chapter I General introduction - Fundamentals of accounting
Multipass中文文档-使用指引(目录页)
[network planning] 2.4 DNS: directory service of the Internet
JVM garbage collection mechanism and common garbage collectors
Installation of phpstudy
快手处置超过5.4万个违规账号:如何打击平台上的违规账号
unity 网格面片生成抛物线,折线
[kingcraft] 3.1 link layer - functions of data link layer
How to guarantee the quality of real-time data, the cornerstone of the 100 million level search system (Youku Video Search)? v2020
[JVM] class loading mechanism
Njupt Nanyou Discrete Mathematics_ Experiment 3
[untitled] test






![[network planning] 2.2.4 Web cache / proxy server](/img/a8/74a1b44ce4d8b0b1a85043a091a91d.jpg)
![[no title] 66666](/img/6c/df2ebb3e39d1e47b8dd74cfdddbb06.gif)
