際際滷

際際滷Share a Scribd company logo
仂弍亟仂于舒 仄从仂亠于仆仂
从仂仄仆从舒 仆舒 仂仆仂于 gRPC:
束亰舒損  束仗仂亳損 仆舒 仂仆仂于 仆舒仂亞仂 亟仂于亟
亞仂 舒从亳仆从亳亶
Head of Engineering FORMA, Universe Group
舒仄
6 仂从于
130+ 仍ミ莞黍
于 从仂仄舒仆亟
弌于仂ム仄仂 仗仂亟从亳 亟仍 仗仂仆舒亟 83 仄仍仆
从仂亳于舒于 亰 180 从舒仆 于
Universe Group 仂亞仂亟仆
Universe Group
R&D
Agenda
01 从仂亠于仆舒 从仂仄仆从舒
02
03
04
05 亠亟仂仍从亳 gRPC
06
07
08
HTTP API
仆仂于仆 仗亳仆亳仗亳 仂弍仂亳 gRPC
亠亠于舒亞亳 gRPC
仂弍亳亳亶 亟仂于亟 舒 亠从仗亠亳仄亠仆
亟仍舒亟从舒 从仂亟
舒仍舒仆于舒仆仆 仆舒于舒仆舒亢亠仆仆
仆仂于仆 仗亳仆亳仗亳
仄从仂亠于仆仂 从仂仄仆从舒
 亠亰舒仍亠亢仆 亠于于: 从仂亢亠仆 仄从仂亠于
仗仂于亳仆亠仆 弍亳 仆亠亰舒仍亠亢仆亳仄 舒 舒于仂仆仂仄仆亳仄.
 丼从 从仂仆舒从亳 API: 仄从仂亠于亳 仗仂于亳仆仆
仄舒亳 从仂 于亳亰仆舒亠仆 从仂仆舒从亳, 磻 仂仗亳ム
仂仄舒  亳仗亳 亟舒仆亳, 仂 仗亠亠亟舒ム.
 弌亶从 亟仂 于亟仄仂于.
 舒舒弍仂于舒仆: 亳亠仄舒 仗仂于亳仆仆舒 弍亳
亰亟舒仆舒 亟仂 仄舒舒弍于舒仆仆 仂从亠仄亳
仄从仂亠于于.
 仆亳亶 仄仂仆仂亳仆亞 舒 仍仂亞于舒仆仆.
丐亳仗亳 仄从仂亠于仆仂
从仂仄仆从舒  sync/async
 亠亰舒仍亠亢仆 亠于于: 从仂亢亠仆 仄从仂亠于 仗仂于亳仆亠仆
弍亳 仆亠亰舒仍亠亢仆亳仄 舒 舒于仂仆仂仄仆亳仄.
 丼从 从仂仆舒从亳 API: 仄从仂亠于亳 仗仂于亳仆仆 仄舒亳
从仂 于亳亰仆舒亠仆 API 从仂仆舒从亳, 磻 仂仗亳ム
仂仄舒  亳仗亳 亟舒仆亳, 仂 仗亠亠亟舒ム.
 弌亶从 亟仂 于亟仄仂于.
 舒舒弍仂于舒仆: 亳亠仄舒 仗仂于亳仆仆舒 弍亳 亰亟舒仆舒 亟仂
仄舒舒弍于舒仆仆 仂从亠仄亳 仄从仂亠于于.
 仆亳亶 仄仂仆仂亳仆亞 舒 仍仂亞于舒仆仆.
丐亳仗亳 仄从仂亠于仆仂
从仂仄仆从舒  single/multiple
receivers
 Single receiver: 从仂亢亠仆 亰舒仗亳 仗仂于亳仆亠仆 弍亳
仂弍仂弍仍亠仆亳亶 仍从亳 仂亟仆亳仄 仂亳仄于舒亠仄 舒弍仂
亠于仂仄. 亳从仍舒亟仂仄 舒从仂 从仂仄仆从舒  仗舒亠仆
Command.
 Multiple receivers: 亰舒仗亳 仄仂亢亠 弍亳 仂弍仂弍仍亠仆亳亶
从仍从仂仄舒 仂亟亠亢于舒舒仄亳. 丐舒从亳亶 亳仗 从仂仄仆从舒
仗仂于亳仆亠仆 弍亳 舒亳仆仂仆仆亳仄.
 亟仗亳从舒/仗弍仍从舒: 于亳从仂亳仂于 于
舒亠从, 从亠仂于舒仆亶 仗仂亟礆亳, 亟亠 仂仆仂于仍亠仆仆
亟舒仆亳 仗亠亠亟舒ム 亠亠亰 仗仂亟 仄亢 从仍从仂仄舒
仄从仂亠于舒仄亳.
 丿亳仆舒 仗仂于亟仂仄仍亠仆: 亰舒亰于亳舒亶 亠舒仍亰
亠亠亰 亠于仆 亳仆, 磻-仂 MQTT Bus, 亰
于亳从仂亳舒仆仆礆 亠仄  仗亟仗亳仂从.
 Single receiver: 从仂亢亠仆 亰舒仗亳 仗仂于亳仆亠仆 弍亳
仂弍仂弍仍亠仆亳亶 仍从亳 仂亟仆亳仄 仂亳仄于舒亠仄 舒弍仂
亠于仂仄. 亳从仍舒亟仂仄 舒从仂 从仂仄仆从舒  仗舒亠仆
Command.
 Multiple receivers: 亰舒仗亳 仄仂亢亠 弍亳 仂弍仂弍仍亠仆亳亶
从仍从仂仄舒 仂亟亠亢于舒舒仄亳. 丐舒从亳亶 亳仗 从仂仄仆从舒
仗仂于亳仆亠仆 弍亳 舒亳仆仂仆仆亳仄.
 亟仗亳从舒/仗弍仍从舒: 于亳从仂亳仂于 于
舒亠从, 从亠仂于舒仆亶 仗仂亟礆亳, 亟亠 仂仆仂于仍亠仆仆
亟舒仆亳 仗亠亠亟舒ム 亠亠亰 仗仂亟 仄亢 从仍从仂仄舒
仄从仂亠于舒仄亳.
 丿亳仆舒 仗仂于亟仂仄仍亠仆: 亰舒亰于亳舒亶 亠舒仍亰
亠亠亰 亠于仆 亳仆, 磻-仂 MQTT Bus, 亰
于亳从仂亳舒仆仆礆 亠仄  仗亟仗亳仂从.
丐亳仗亳 仄从仂亠于仆仂
从仂仄仆从舒  single/multiple
receivers
HTTP RESTful APIs
HTTP RESTful APIs
 Stateless
 Uniform Interface
 Cacheable
 Client-Server
 Layered System
 Code on Demand
仂亟亠仍 亰仍仂
舒亟仂仆舒
 Level 0: 于亳亰仆舒舒仄仂 亟亳仆亳亶 URI, 于 亰舒仗亳亳
于亳从仂仆仄仂 仄亠仂亟仂仄 POST 仆舒 亠亶 URI.
 Level 1: 于仂ム仄仂 仂从亠仄 URIs 亟仍
从仂亢仆仂亞仂 亠.
 Level 2: 于亳从仂亳仂于仄仂 HTTP 仄亠仂亟亳 亟仍
亰仆亳 亳仗于 仂仗亠舒亶 仆舒亟 亠舒仄亳.
 Level 3: 于亳从仂亳仂于仄仂 hypermedia
gRPC 
Google Remote
Procedure Call
仆仂于仆 仗亳仆亳仗亳
 亳从仂亳仂于 仗仂仂从仂仍 HTTP/2 亟仍
舒仆仗仂于舒仆仆 弍仆舒仆亳 仗仂于亟仂仄仍亠仆
 亳从仂亳仂于 Protocol Buffers language
亟仍 于亳亰仆舒亠仆仆 亠于仆亳 从仂仆舒从于
 仍仆 仄仂亢亠 弍亠亰仗仂亠亠亟仆仂 于亳从仍亳从舒亳
仄亠仂亟 (仗仂亠亟) 仆舒 亠于亠
 亠仆亠 client 舒 server bindings 亟仍
亰仆亳 仄仂于 仗仂亞舒仄于舒仆仆
 亠仍亰 于亟弍于  2016 仂
 个仂仄舒 亟仍 亠舒仍亰舒 从仂于舒仆亳 亟舒仆亳.
 仂亰仂弍仍亠仆亳亶 Google  2008 ., 亰舒仗从舒于 磻
舒仍亠仆舒亳于舒 XML.
 亟亳仄 弍舒亞舒仂 仄仂于 仗仂亞舒仄于舒仆仆, 舒
亰舒弍亠亰仗亠 仄仆 仄亢 仆亳仄亳.
 亳从仂亳仂于 弍仆舒仆亳亶 仂仄舒.
 亳从仂亳仂于 .proto 舒亶仍亳 亟仍 于亳亰仆舒亠仆仆
从亳 亟舒仆亳.
Protobuf (protocol
buffers)
亠仆亠亟亢仄亠仆 .proto 舒亶仍于
Git Submodule: 亟仂亟舒于舒仆仆
仗仍仆仂亞仂 亠仗仂亰亳仂 磻
submodule
仂仆仂亠仗仂亰亳仂亶: 于 .proto 舒亶仍亳
亰弍亠亞舒ム 于 仂亟仆仂仄 仗仍仆仂仄
亠仗仂亰亳仂
NPM: 仆舒 亠舒仗 CI-CD, 于仂ム
舒 仗弍仍从 npm 仗舒从亠 亰 .proto
舒亶仍舒仄亳
亳于 亳从仍亳 RPC
 Unary RPCs: 从仍仆 仆舒亟亳仍舒 仂亟亳仆 亰舒仗亳 
仂亳仄 仂亟仆 于亟仗仂于亟 于亟 亠于亠舒, 仗仂亟弍仆仂 亟仂
亰于亳舒亶仆仂亞仂 于亳从仍亳从 仆从.
 Server Streaming RPCs: 从仍仆 仆舒亟亳仍舒 亰舒仗亳, 舒
亠于亠 仗亠亠亟舒 仗仂从 仗仂于亟仂仄仍亠仆  于亟仗仂于亟.
仂磲仂从 仗仂于亟仂仄仍亠仆 亰弍亠亞舒.
 Client Streaming RPCs: 从仍仆 仆舒亟亳仍舒 亠
仗仂于亟仂仄仍亠仆, 舒 亠于亠 亳舒   于亟仗仂于亟舒 仗仍
亰舒于亠亠仆仆 仗亠亠亟舒. 仂磲仂从 仗仂于亟仂仄仍亠仆
亰弍亠亞舒.
 Bidirectional Streaming RPCs: 仂弍亳亟于 仂仂仆亳
仂弍仄仆ムム 仗仂于亟仂仄仍亠仆仆礆亳 亠亠亰 仗仂从,
仗舒ムム亳 仆亠亰舒仍亠亢仆仂 仂亟亳仆 于亟 仂亟仆仂亞仂,
亰弍亠亞舒ム亳 亞仆从  仗仂磲从 亳舒仆仆 舒
亰舒仗亳.
亟从仍ム亠仆仆 gRPC
仂亟舒仄仂 gRPC 舒 Protobuf 弍弍仍仂亠从亳
亰舒 亟仂仗仂仄仂亞仂 仗舒从亠仆仂亞仂 仄亠仆亠亟亢亠舒
(仆舒仗亳从仍舒亟, npm, Maven, etc)
亳亰仆舒舒仄仂 从亳 亟舒仆亳 舒 亠于亳
- 于仂ム仄仂 .proto 舒亶仍, 磻亳亶 仂仗亳
从 亟舒仆亳  亠于亳 gRPC,
于从仍ム舒ム亳 仆 仄亠仂亟亳
亠仆亠舒 从仂亟: gRPC 从仂仄仗仍仂 仆舒
仂仆仂于 .proto 舒亶仍, 亞亠仆亠 从仍仆从亳亶
舒 亠于亠仆亳亶 从仂亟 (舒 舒从仂亢 亳仗亳 )
仄仗仍亠仄亠仆舒 仄亠仂亟于
01 02
03 04
丐亠于舒仆仆 gRPC
gRPC vs REST
Protocol
Payload
API contract
Code generation
Security
Streaming
Security
gRPC
HTTP/2 (fast)
Protobuf (binary, small)
Strict, required (proto)
Built-in (protoc)
TLS/SSL
Bidirectional streaming
Limited (require gRPC-web)
HTTP Rest API
HTTP/1.1 (slow)
JSON (text, large)
Loose, optional OpenAPI
Third-party tools Swagger)
TLS/SSL
Client server request only
Yes
仂于亠亟亠仄仂 亠从仗亠亳仄亠仆
 仍仆 仂弍亳 仗仂亳亶 亰舒仗亳 仆舒 亠于亠 舒弍仂
于亳从仍亳从舒 仗仂亠亟, 舒 亠于亠 仗仂仂
仗仂于亠舒 亰仆舒亠仆仆 弍亠亰 弍亟-磻仂 从仍舒亟仆仂
仍仂亞从亳, 仂从仍从亳 仄亠仂  于亳亰仆舒亠仆仆
仗仂亟从亳于仆仂 仗仂仂从仂仍.
 亳从仂亳仂于仄仂 亟于舒 AWS EC2 c5.2xLarge
instance.
  亠 于亳亰仆舒舒 从仍从 仄仂亢仍亳于亳
亰舒仗亳于 亰舒 仂亟亳仆亳 舒.
 丐舒从仂亢 于亳亰仆舒舒仄仂 舒 仆舒 于亳从仂仆舒仆仆 100从
亰舒仗亳于 舒弍仂 亢 于亳从仍亳从于 仗仂亠亟.
仂于亠亟亠仄仂
亠从仗亠亳仄亠仆
从仗亠亳仄亠仆 Rest vs gRPC
亠亰仍舒亳 亠从仗亠亳仄亠仆
HTTP Post request gRPC procedure call
100k async requests, sec 32.342 4.370
Requests per second 2147 26102
CPU usage  ms/req 491 ms / per request 211 ms / per request
亟仂亟亳 亟仂 弍舒仍舒仆于舒仆仆
仆舒于舒仆舒亢亠仆仆
亟仂亟亳 亟仂 弍舒仍舒仆于舒仆仆
仆舒于舒仆舒亢亠仆仆  Proxy
亟仂亟亳 亟仂 弍舒仍舒仆于舒仆仆
仆舒于舒仆舒亢亠仆仆  Client Side
舒仍舒仆于舒仆仆 仆舒于舒仆舒亢亠仆仆
Proxy Client Side
亠亠于舒亞亳  亠仄舒 仆仂仄舒 仆舒 仂仂仆
从仍仆舒 仗仂 弍亠从亠仆亟
 仂仂  亠舒仍亰舒
 亳仂从舒 仗仂亟从亳于仆, 仂从仍从亳
于舒仆仂于仍ム 仗礆亠 亰`亟仆舒仆仆 仄亢
仄从仂亠于舒仄亳
亠亟仂仍从亳  亠仂弍亟仆 亟仂亟舒从仂于仂
仆舒从亳
 弍仄亠亢亠仆仆 于 仄舒舒弍于舒仆仆
 弍仍ム 亰舒亳仄从亳
 弌从仍舒亟仆 亠舒仍亰舒
 亠仂弍亟仆仂 仄仂仆仂亳亳 亰舒于舒仆舒亢亠仆
仆舒 仂仂仆 从仍仆舒
仂亳仍舒仆仆
仆舒 从仂仆舒从亳:
磻
亰舒 于舒亞!

More Related Content

Similar to "gRPC-based microservice communication: pros and cons based on our experience", Ihor Zakutynskyi (20)

仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒
仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒
仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒
Helen Pata
Opc
OpcOpc
Opc
仗亠仆舒 仍亠从舒仆亟
Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆
Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆
Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆
cit-cit
弌亊丐 束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損
弌亊丐  束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損弌亊丐  束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損
弌亊丐 束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損
QADay
Wcf module 1
Wcf module 1Wcf module 1
Wcf module 1
Andrii Hladkyi
"Rethinking Continuous Delivery", Andrii Nasinnyk
"Rethinking Continuous Delivery",  Andrii Nasinnyk"Rethinking Continuous Delivery",  Andrii Nasinnyk
"Rethinking Continuous Delivery", Andrii Nasinnyk
Fwdays
Pro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdf
Pro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdfPro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdf
Pro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdf
Pro Magento Community
"Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ...
"Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ..."Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ...
"Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ...
Fwdays
Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)
Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)
Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)
content75
1 3 osi 于仆
1 3 osi 于仆 1 3 osi 于仆
1 3 osi 于仆
仗亠仆舒 仍亠从舒仆亟
9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx
9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx
9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx
cy2cdqqjd8
Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...
Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...
Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...
Fwdays
亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄 仗仂仄仂 Embedded System
亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄  仗仂仄仂 Embedded System亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄  仗仂仄仂 Embedded System
亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄 仗仂仄仂 Embedded System
itconnect2016
弌亠从 仗仂仂从仂仍于 IPsec
弌亠从 仗仂仂从仂仍于 IPsec弌亠从 仗仂仂从仂仍于 IPsec
弌亠从 仗仂仂从仂仍于 IPsec
Shevchenko Andriy
仆亠仆亠 15
仆亠仆亠 15仆亠仆亠 15
仆亠仆亠 15
Tamara tamara
Pashkov v
Pashkov vPashkov v
Pashkov v
garasym
仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒
仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒
仂从 17 9 从仍舒 仂从舒仍仆舒 从仂仄仗'ム亠仆舒 仄亠亠亢舒
Helen Pata
Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆
Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆
Lec16 仗仂仄i亢仆亠 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆
cit-cit
弌亊丐 束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損
弌亊丐  束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損弌亊丐  束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損
弌亊丐 束乂仂 仄仂亢仆舒 于亳磪仆亳 亰 仄仂弍仍仆亳 亟仂亟舒从于損
QADay
"Rethinking Continuous Delivery", Andrii Nasinnyk
"Rethinking Continuous Delivery",  Andrii Nasinnyk"Rethinking Continuous Delivery",  Andrii Nasinnyk
"Rethinking Continuous Delivery", Andrii Nasinnyk
Fwdays
Pro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdf
Pro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdfPro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdf
Pro Magento MeetUp #9 - Deep dive into Magento2 queuing functionality.pdf
Pro Magento Community
"Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ...
"Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ..."Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ...
"Simplifying the Complex: Effective Management of Large-Scale PHP Projects", ...
Fwdays
Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)
Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)
Igor Dumbur: 仆亢亠仆亠仆舒 亟仂从仂仆舒仍 舒 DevOps(UA)
content75
9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx
9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx
9 从仍舒. 02-仗舒仆亠 亶 仗仂亞舒仄仆亠 亰舒弍亠亰仗亠亠仆仆 从仂仄仗. 仄亠亠亢. 亟亠舒.pptx
cy2cdqqjd8
Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...
Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...
Oleksandr Brychuk "UniSender architecture. Growth from 100kk to 1.5kkk letter...
Fwdays
亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄 仗仂仄仂 Embedded System
亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄  仗仂仄仂 Embedded System亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄  仗仂仄仂 Embedded System
亰亠仆亳亠 亳仆亠亠亶仂于 仂仗亠舒亳仂仆仆 亳亠仄 仗仂仄仂 Embedded System
itconnect2016
弌亠从 仗仂仂从仂仍于 IPsec
弌亠从 仗仂仂从仂仍于 IPsec弌亠从 仗仂仂从仂仍于 IPsec
弌亠从 仗仂仂从仂仍于 IPsec
Shevchenko Andriy
Pashkov v
Pashkov vPashkov v
Pashkov v
garasym

More from Fwdays (20)

"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy
"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy
"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy
Fwdays
"Building Trust: Strengthening Your Software Supply Chain Security", Serhii V...
"Building Trust: Strengthening Your Software Supply Chain Security", Serhii V..."Building Trust: Strengthening Your Software Supply Chain Security", Serhii V...
"Building Trust: Strengthening Your Software Supply Chain Security", Serhii V...
Fwdays
"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak
Fwdays
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
Fwdays
"Zero-sales lost Incident Management", Igor Drozd
"Zero-sales lost  Incident Management", Igor Drozd"Zero-sales lost  Incident Management", Igor Drozd
"Zero-sales lost Incident Management", Igor Drozd
Fwdays
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
Fwdays
"Kubernetes operators. How we migrated Release Management to controllers", De...
"Kubernetes operators. How we migrated Release Management to controllers", De..."Kubernetes operators. How we migrated Release Management to controllers", De...
"Kubernetes operators. How we migrated Release Management to controllers", De...
Fwdays
"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov
"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov
"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov
Fwdays
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O..."DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
Fwdays
What we've learned by implementing a domestic microservices system for 5 year...
What we've learned by implementing a domestic microservices system for 5 year...What we've learned by implementing a domestic microservices system for 5 year...
What we've learned by implementing a domestic microservices system for 5 year...
Fwdays
The Frugal Architecture in Practice.pptx
The Frugal Architecture in Practice.pptxThe Frugal Architecture in Practice.pptx
The Frugal Architecture in Practice.pptx
Fwdays
"Transition from Bench to Reserve: how to effectively manage and motivate peo...
"Transition from Bench to Reserve: how to effectively manage and motivate peo..."Transition from Bench to Reserve: how to effectively manage and motivate peo...
"Transition from Bench to Reserve: how to effectively manage and motivate peo...
Fwdays
"Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ...
"Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ..."Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ...
"Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ...
Fwdays
"Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr...
"Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr..."Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr...
"Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr...
Fwdays
"Technological Roulette",Alex Kovalchuk .pptx
"Technological Roulette",Alex Kovalchuk .pptx"Technological Roulette",Alex Kovalchuk .pptx
"Technological Roulette",Alex Kovalchuk .pptx
Fwdays
"Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal...
"Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal..."Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal...
"Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal...
Fwdays
"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx
"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx
"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx
Fwdays
"Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real...
"Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real..."Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real...
"Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real...
Fwdays
"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf
"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf
"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf
Fwdays
"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx
"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx
"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx
Fwdays
"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy
"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy
"Spin-up pgbouncer for fun and profit", Vitaliy Kharytonskiy
Fwdays
"Building Trust: Strengthening Your Software Supply Chain Security", Serhii V...
"Building Trust: Strengthening Your Software Supply Chain Security", Serhii V..."Building Trust: Strengthening Your Software Supply Chain Security", Serhii V...
"Building Trust: Strengthening Your Software Supply Chain Security", Serhii V...
Fwdays
"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak
Fwdays
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
Fwdays
"Zero-sales lost Incident Management", Igor Drozd
"Zero-sales lost  Incident Management", Igor Drozd"Zero-sales lost  Incident Management", Igor Drozd
"Zero-sales lost Incident Management", Igor Drozd
Fwdays
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
Fwdays
"Kubernetes operators. How we migrated Release Management to controllers", De...
"Kubernetes operators. How we migrated Release Management to controllers", De..."Kubernetes operators. How we migrated Release Management to controllers", De...
"Kubernetes operators. How we migrated Release Management to controllers", De...
Fwdays
"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov
"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov
"How AI infrastructure differs from common infrastructure", Vsevolod Polyakov
Fwdays
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O..."DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
Fwdays
What we've learned by implementing a domestic microservices system for 5 year...
What we've learned by implementing a domestic microservices system for 5 year...What we've learned by implementing a domestic microservices system for 5 year...
What we've learned by implementing a domestic microservices system for 5 year...
Fwdays
The Frugal Architecture in Practice.pptx
The Frugal Architecture in Practice.pptxThe Frugal Architecture in Practice.pptx
The Frugal Architecture in Practice.pptx
Fwdays
"Transition from Bench to Reserve: how to effectively manage and motivate peo...
"Transition from Bench to Reserve: how to effectively manage and motivate peo..."Transition from Bench to Reserve: how to effectively manage and motivate peo...
"Transition from Bench to Reserve: how to effectively manage and motivate peo...
Fwdays
"Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ...
"Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ..."Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ...
"Money and Startups: How to Get $200,000+ in Equite Free Funding for Startup ...
Fwdays
"Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr...
"Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr..."Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr...
"Slow but Steady vs Fast and Furious: The Dilemma of Modern Development", Kyr...
Fwdays
"Technological Roulette",Alex Kovalchuk .pptx
"Technological Roulette",Alex Kovalchuk .pptx"Technological Roulette",Alex Kovalchuk .pptx
"Technological Roulette",Alex Kovalchuk .pptx
Fwdays
"Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal...
"Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal..."Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal...
"Optimization of Retrieval-Augmented Generation (RAG) for eCommerce: Personal...
Fwdays
"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx
"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx
"Secrets of Scaling a Product from 2 to 30 Teams", Igor Drozd.pptx
Fwdays
"Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real...
"Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real..."Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real...
"Ukrainian cloud and AWS/Azure/GCP: Smart vs Porsche. Is the alternative real...
Fwdays
"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf
"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf
"5 years at RozetkaPay in 30 minutes: get it all done", Oleksandr Tarasenko.pdf
Fwdays
"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx
"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx
"Reducing Incident Impact: Practical Case Studies", Dmytro Dziubenko.pptx
Fwdays

"gRPC-based microservice communication: pros and cons based on our experience", Ihor Zakutynskyi

  • 1. 仂弍亟仂于舒 仄从仂亠于仆仂 从仂仄仆从舒 仆舒 仂仆仂于 gRPC: 束亰舒損 束仗仂亳損 仆舒 仂仆仂于 仆舒仂亞仂 亟仂于亟 亞仂 舒从亳仆从亳亶 Head of Engineering FORMA, Universe Group
  • 2. 舒仄 6 仂从于 130+ 仍ミ莞黍 于 从仂仄舒仆亟 弌于仂ム仄仂 仗仂亟从亳 亟仍 仗仂仆舒亟 83 仄仍仆 从仂亳于舒于 亰 180 从舒仆 于 Universe Group 仂亞仂亟仆
  • 4. Agenda 01 从仂亠于仆舒 从仂仄仆从舒 02 03 04 05 亠亟仂仍从亳 gRPC 06 07 08 HTTP API 仆仂于仆 仗亳仆亳仗亳 仂弍仂亳 gRPC 亠亠于舒亞亳 gRPC 仂弍亳亳亶 亟仂于亟 舒 亠从仗亠亳仄亠仆 亟仍舒亟从舒 从仂亟 舒仍舒仆于舒仆仆 仆舒于舒仆舒亢亠仆仆
  • 5. 仆仂于仆 仗亳仆亳仗亳 仄从仂亠于仆仂 从仂仄仆从舒 亠亰舒仍亠亢仆 亠于于: 从仂亢亠仆 仄从仂亠于 仗仂于亳仆亠仆 弍亳 仆亠亰舒仍亠亢仆亳仄 舒 舒于仂仆仂仄仆亳仄. 丼从 从仂仆舒从亳 API: 仄从仂亠于亳 仗仂于亳仆仆 仄舒亳 从仂 于亳亰仆舒亠仆 从仂仆舒从亳, 磻 仂仗亳ム 仂仄舒 亳仗亳 亟舒仆亳, 仂 仗亠亠亟舒ム. 弌亶从 亟仂 于亟仄仂于. 舒舒弍仂于舒仆: 亳亠仄舒 仗仂于亳仆仆舒 弍亳 亰亟舒仆舒 亟仂 仄舒舒弍于舒仆仆 仂从亠仄亳 仄从仂亠于于. 仆亳亶 仄仂仆仂亳仆亞 舒 仍仂亞于舒仆仆.
  • 6. 丐亳仗亳 仄从仂亠于仆仂 从仂仄仆从舒 sync/async 亠亰舒仍亠亢仆 亠于于: 从仂亢亠仆 仄从仂亠于 仗仂于亳仆亠仆 弍亳 仆亠亰舒仍亠亢仆亳仄 舒 舒于仂仆仂仄仆亳仄. 丼从 从仂仆舒从亳 API: 仄从仂亠于亳 仗仂于亳仆仆 仄舒亳 从仂 于亳亰仆舒亠仆 API 从仂仆舒从亳, 磻 仂仗亳ム 仂仄舒 亳仗亳 亟舒仆亳, 仂 仗亠亠亟舒ム. 弌亶从 亟仂 于亟仄仂于. 舒舒弍仂于舒仆: 亳亠仄舒 仗仂于亳仆仆舒 弍亳 亰亟舒仆舒 亟仂 仄舒舒弍于舒仆仆 仂从亠仄亳 仄从仂亠于于. 仆亳亶 仄仂仆仂亳仆亞 舒 仍仂亞于舒仆仆.
  • 7. 丐亳仗亳 仄从仂亠于仆仂 从仂仄仆从舒 single/multiple receivers Single receiver: 从仂亢亠仆 亰舒仗亳 仗仂于亳仆亠仆 弍亳 仂弍仂弍仍亠仆亳亶 仍从亳 仂亟仆亳仄 仂亳仄于舒亠仄 舒弍仂 亠于仂仄. 亳从仍舒亟仂仄 舒从仂 从仂仄仆从舒 仗舒亠仆 Command. Multiple receivers: 亰舒仗亳 仄仂亢亠 弍亳 仂弍仂弍仍亠仆亳亶 从仍从仂仄舒 仂亟亠亢于舒舒仄亳. 丐舒从亳亶 亳仗 从仂仄仆从舒 仗仂于亳仆亠仆 弍亳 舒亳仆仂仆仆亳仄. 亟仗亳从舒/仗弍仍从舒: 于亳从仂亳仂于 于 舒亠从, 从亠仂于舒仆亶 仗仂亟礆亳, 亟亠 仂仆仂于仍亠仆仆 亟舒仆亳 仗亠亠亟舒ム 亠亠亰 仗仂亟 仄亢 从仍从仂仄舒 仄从仂亠于舒仄亳. 丿亳仆舒 仗仂于亟仂仄仍亠仆: 亰舒亰于亳舒亶 亠舒仍亰 亠亠亰 亠于仆 亳仆, 磻-仂 MQTT Bus, 亰 于亳从仂亳舒仆仆礆 亠仄 仗亟仗亳仂从.
  • 8. Single receiver: 从仂亢亠仆 亰舒仗亳 仗仂于亳仆亠仆 弍亳 仂弍仂弍仍亠仆亳亶 仍从亳 仂亟仆亳仄 仂亳仄于舒亠仄 舒弍仂 亠于仂仄. 亳从仍舒亟仂仄 舒从仂 从仂仄仆从舒 仗舒亠仆 Command. Multiple receivers: 亰舒仗亳 仄仂亢亠 弍亳 仂弍仂弍仍亠仆亳亶 从仍从仂仄舒 仂亟亠亢于舒舒仄亳. 丐舒从亳亶 亳仗 从仂仄仆从舒 仗仂于亳仆亠仆 弍亳 舒亳仆仂仆仆亳仄. 亟仗亳从舒/仗弍仍从舒: 于亳从仂亳仂于 于 舒亠从, 从亠仂于舒仆亶 仗仂亟礆亳, 亟亠 仂仆仂于仍亠仆仆 亟舒仆亳 仗亠亠亟舒ム 亠亠亰 仗仂亟 仄亢 从仍从仂仄舒 仄从仂亠于舒仄亳. 丿亳仆舒 仗仂于亟仂仄仍亠仆: 亰舒亰于亳舒亶 亠舒仍亰 亠亠亰 亠于仆 亳仆, 磻-仂 MQTT Bus, 亰 于亳从仂亳舒仆仆礆 亠仄 仗亟仗亳仂从. 丐亳仗亳 仄从仂亠于仆仂 从仂仄仆从舒 single/multiple receivers
  • 10. HTTP RESTful APIs Stateless Uniform Interface Cacheable Client-Server Layered System Code on Demand
  • 11. 仂亟亠仍 亰仍仂 舒亟仂仆舒 Level 0: 于亳亰仆舒舒仄仂 亟亳仆亳亶 URI, 于 亰舒仗亳亳 于亳从仂仆仄仂 仄亠仂亟仂仄 POST 仆舒 亠亶 URI. Level 1: 于仂ム仄仂 仂从亠仄 URIs 亟仍 从仂亢仆仂亞仂 亠. Level 2: 于亳从仂亳仂于仄仂 HTTP 仄亠仂亟亳 亟仍 亰仆亳 亳仗于 仂仗亠舒亶 仆舒亟 亠舒仄亳. Level 3: 于亳从仂亳仂于仄仂 hypermedia
  • 13. 仆仂于仆 仗亳仆亳仗亳 亳从仂亳仂于 仗仂仂从仂仍 HTTP/2 亟仍 舒仆仗仂于舒仆仆 弍仆舒仆亳 仗仂于亟仂仄仍亠仆 亳从仂亳仂于 Protocol Buffers language 亟仍 于亳亰仆舒亠仆仆 亠于仆亳 从仂仆舒从于 仍仆 仄仂亢亠 弍亠亰仗仂亠亠亟仆仂 于亳从仍亳从舒亳 仄亠仂亟 (仗仂亠亟) 仆舒 亠于亠 亠仆亠 client 舒 server bindings 亟仍 亰仆亳 仄仂于 仗仂亞舒仄于舒仆仆 亠仍亰 于亟弍于 2016 仂
  • 14. 个仂仄舒 亟仍 亠舒仍亰舒 从仂于舒仆亳 亟舒仆亳. 仂亰仂弍仍亠仆亳亶 Google 2008 ., 亰舒仗从舒于 磻 舒仍亠仆舒亳于舒 XML. 亟亳仄 弍舒亞舒仂 仄仂于 仗仂亞舒仄于舒仆仆, 舒 亰舒弍亠亰仗亠 仄仆 仄亢 仆亳仄亳. 亳从仂亳仂于 弍仆舒仆亳亶 仂仄舒. 亳从仂亳仂于 .proto 舒亶仍亳 亟仍 于亳亰仆舒亠仆仆 从亳 亟舒仆亳. Protobuf (protocol buffers)
  • 15. 亠仆亠亟亢仄亠仆 .proto 舒亶仍于 Git Submodule: 亟仂亟舒于舒仆仆 仗仍仆仂亞仂 亠仗仂亰亳仂 磻 submodule 仂仆仂亠仗仂亰亳仂亶: 于 .proto 舒亶仍亳 亰弍亠亞舒ム 于 仂亟仆仂仄 仗仍仆仂仄 亠仗仂亰亳仂 NPM: 仆舒 亠舒仗 CI-CD, 于仂ム 舒 仗弍仍从 npm 仗舒从亠 亰 .proto 舒亶仍舒仄亳
  • 16. 亳于 亳从仍亳 RPC Unary RPCs: 从仍仆 仆舒亟亳仍舒 仂亟亳仆 亰舒仗亳 仂亳仄 仂亟仆 于亟仗仂于亟 于亟 亠于亠舒, 仗仂亟弍仆仂 亟仂 亰于亳舒亶仆仂亞仂 于亳从仍亳从 仆从. Server Streaming RPCs: 从仍仆 仆舒亟亳仍舒 亰舒仗亳, 舒 亠于亠 仗亠亠亟舒 仗仂从 仗仂于亟仂仄仍亠仆 于亟仗仂于亟. 仂磲仂从 仗仂于亟仂仄仍亠仆 亰弍亠亞舒. Client Streaming RPCs: 从仍仆 仆舒亟亳仍舒 亠 仗仂于亟仂仄仍亠仆, 舒 亠于亠 亳舒 于亟仗仂于亟舒 仗仍 亰舒于亠亠仆仆 仗亠亠亟舒. 仂磲仂从 仗仂于亟仂仄仍亠仆 亰弍亠亞舒. Bidirectional Streaming RPCs: 仂弍亳亟于 仂仂仆亳 仂弍仄仆ムム 仗仂于亟仂仄仍亠仆仆礆亳 亠亠亰 仗仂从, 仗舒ムム亳 仆亠亰舒仍亠亢仆仂 仂亟亳仆 于亟 仂亟仆仂亞仂, 亰弍亠亞舒ム亳 亞仆从 仗仂磲从 亳舒仆仆 舒 亰舒仗亳.
  • 17. 亟从仍ム亠仆仆 gRPC 仂亟舒仄仂 gRPC 舒 Protobuf 弍弍仍仂亠从亳 亰舒 亟仂仗仂仄仂亞仂 仗舒从亠仆仂亞仂 仄亠仆亠亟亢亠舒 (仆舒仗亳从仍舒亟, npm, Maven, etc) 亳亰仆舒舒仄仂 从亳 亟舒仆亳 舒 亠于亳 - 于仂ム仄仂 .proto 舒亶仍, 磻亳亶 仂仗亳 从 亟舒仆亳 亠于亳 gRPC, 于从仍ム舒ム亳 仆 仄亠仂亟亳 亠仆亠舒 从仂亟: gRPC 从仂仄仗仍仂 仆舒 仂仆仂于 .proto 舒亶仍, 亞亠仆亠 从仍仆从亳亶 舒 亠于亠仆亳亶 从仂亟 (舒 舒从仂亢 亳仗亳 ) 仄仗仍亠仄亠仆舒 仄亠仂亟于 01 02 03 04
  • 19. gRPC vs REST Protocol Payload API contract Code generation Security Streaming Security gRPC HTTP/2 (fast) Protobuf (binary, small) Strict, required (proto) Built-in (protoc) TLS/SSL Bidirectional streaming Limited (require gRPC-web) HTTP Rest API HTTP/1.1 (slow) JSON (text, large) Loose, optional OpenAPI Third-party tools Swagger) TLS/SSL Client server request only Yes
  • 21. 仍仆 仂弍亳 仗仂亳亶 亰舒仗亳 仆舒 亠于亠 舒弍仂 于亳从仍亳从舒 仗仂亠亟, 舒 亠于亠 仗仂仂 仗仂于亠舒 亰仆舒亠仆仆 弍亠亰 弍亟-磻仂 从仍舒亟仆仂 仍仂亞从亳, 仂从仍从亳 仄亠仂 于亳亰仆舒亠仆仆 仗仂亟从亳于仆仂 仗仂仂从仂仍. 亳从仂亳仂于仄仂 亟于舒 AWS EC2 c5.2xLarge instance. 亠 于亳亰仆舒舒 从仍从 仄仂亢仍亳于亳 亰舒仗亳于 亰舒 仂亟亳仆亳 舒. 丐舒从仂亢 于亳亰仆舒舒仄仂 舒 仆舒 于亳从仂仆舒仆仆 100从 亰舒仗亳于 舒弍仂 亢 于亳从仍亳从于 仗仂亠亟. 仂于亠亟亠仄仂 亠从仗亠亳仄亠仆
  • 23. 亠亰仍舒亳 亠从仗亠亳仄亠仆 HTTP Post request gRPC procedure call 100k async requests, sec 32.342 4.370 Requests per second 2147 26102 CPU usage ms/req 491 ms / per request 211 ms / per request
  • 27. 舒仍舒仆于舒仆仆 仆舒于舒仆舒亢亠仆仆 Proxy Client Side 亠亠于舒亞亳 亠仄舒 仆仂仄舒 仆舒 仂仂仆 从仍仆舒 仗仂 弍亠从亠仆亟 仂仂 亠舒仍亰舒 亳仂从舒 仗仂亟从亳于仆, 仂从仍从亳 于舒仆仂于仍ム 仗礆亠 亰`亟仆舒仆仆 仄亢 仄从仂亠于舒仄亳 亠亟仂仍从亳 亠仂弍亟仆 亟仂亟舒从仂于仂 仆舒从亳 弍仄亠亢亠仆仆 于 仄舒舒弍于舒仆仆 弍仍ム 亰舒亳仄从亳 弌从仍舒亟仆 亠舒仍亰舒 亠仂弍亟仆仂 仄仂仆仂亳亳 亰舒于舒仆舒亢亠仆 仆舒 仂仂仆 从仍仆舒