In early October, Cloudflare announced support for gRPC proxying, an open source framework for remote procedure calls. The innovation is still in beta testing: you can register on the Network tab in the Cloudflare dashboard:
Protocols like JSON-REST have been the backbone of APIs for a long time. They are great because they run on top of HTTP, are easy to read, and have an impressive set of tools for quickly configuring APIs. However, using JSON , for example, can be quite computationally intensive.
In 2015, Google introduced a new gRPC protocol. High performance is achieved due to the use of the HTTP / 2 protocol and Protocol Buffers:
Source - Cloudflare Blog
Yes, it makes the data difficult to read, but it leads to more efficient processing. Thus, gRPC is becoming especially popular in the era of microservices as it addresses the shortcomings outlined above.
Digging deeper, RPC (Remote Procedure Call) is more efficient than REST due to the ability to make batch requests - that is, calling several procedures at once. At the same time, due to the fact that for each request you need to establish a connection, REST requests are slower.
By proxying your gRPC APIs to Cloudflare, you immediately get all the advantages that the service provides:
To start taking advantage of these benefits in conjunction with the reliability and security of Cloudflare, all you have to do is sign up for the beta version in your control panel. Service representatives urge you to leave feedback on the tested gRPC support.
#статьи #api #cloudflare #json