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:

What is gRPC?

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:

How RPC WorksSource -  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.

Key benefits of gRPC

  1. Generates an API based on specifications.
  2. Is more performant than REST.
  3. Implemented by Google.
  4. Open Source.

Benefits of gRPC at Cloudflare

By proxying your gRPC APIs to Cloudflare, you immediately get all the advantages that the service provides:

  1. Ability to add security elements such as WAF and Bot Management.
  2. Argo Smart Routing for increased productivity.
  3. You can use Load Balancer to improve reliability: configure multiple gRPC backends to handle the load and allow Cloudflare to distribute the load between them.
  4. Convenient for those who already use Cloudflare.

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

Cloudflare анонсировал поддержку gRPC
1.15 GEEK