Hello, Habr. For future students of the "Highload Architect" course we prepared a translation of the material.
We also invite you to register for an open webinar on the topic "Replication as a Pattern of Storage Scale- Out " with Vladislav Rodin (Team Leader and Java Enterprise Development Specialist). In this lesson, participants will walk through replication, one of the database scaling techniques.
I have several microservices that communicate with each other using JSON over REST, and it seems to me that soon they will reach the VPS performance limit, and I will need to upgrade it so that there is no performance drawdown.
, gRPC ( ) , , , gRPC.
gRPC?
, gRPC, gRPC โ (RPC, remote procedure calls), Google, . , (, , ) - IDL (stub), . REST ASP.NET Core WebAPI.
JSON REST, gRPC Protocol Buffers โ . gRPC REST. Protocol Buffers protoc, proto-. , gRPC HTTP/2, , HTTP- .
, :
-. , .
. . .
, . .
gRPC- Protocol Buffers .
(stream) gRPC GetLargePayload
.
RestAPI WebAPI, , : , .
, , .
GrpcAPI gRPC-. ,
GetLargePayload
, .
RESTvsGRPC , 100 200 , . , 100 200 .
, gRPC , . REST. gRPC , . , HTTP/2, , HTTP.
Windows . Windows .
, .
RestAPI: dotnet run -p RestAPI -c Release
GrpcAPI: dotnet run -p GrpcAPI -c Release
.
: dotnet run -p RESTvsGRPC -c Release
gRPC REST . Protocol Buffers HTTP/2 gRPC.
gRPC 45 10 WebAPI. , REST , ( , ASP.NET Core MVC) ( ). gRPC, , , , protoc, Visual Studio . , , ItemGroup "Protobuf" csproj-. , gRPC ASP.NET Core 3.0.
, gRPC.