Backend Development 8 min read

Understanding RPC vs HTTP Services: Architecture, Call Types, and Popular Frameworks

This article explains the OSI model basics, compares RPC and HTTP service architectures, details synchronous and asynchronous calls, introduces major RPC frameworks like gRPC, Thrift, and Dubbo, and offers guidance on choosing between RPC and HTTP based on project needs.

Top Architect
Top Architect
Top Architect
Understanding RPC vs HTTP Services: Architecture, Call Types, and Popular Frameworks

Before diving into RPC and HTTP differences, the article reviews the OSI seven‑layer model, highlighting the application and transport layers relevant to RPC (TCP) and HTTP (application).

It then describes the typical RPC architecture consisting of a client, server, client stub and server stub, explaining their roles in request packaging and handling.

The article distinguishes synchronous calls, where the client waits for a result, from asynchronous calls, which return immediately and may use callbacks, relating them to Java's Callable/Future and Runnable interfaces.

Three popular open‑source RPC frameworks are introduced: gRPC (built on HTTP/2 and Netty), Apache Thrift (cross‑language with IDL code generation), and Dubbo (Alibaba’s Java‑centric framework with pluggable protocols and serialization).

In contrast, HTTP services are presented as RESTful APIs using the HTTP protocol, with a simple example of a POST request:

POST http://www.httpexample.com/restful/buyer/info/shar

The article compares the two approaches, noting that RPC is often preferred in large enterprises for higher efficiency, persistent connections, and built‑in service registries, while HTTP is simpler and faster to develop for smaller projects.

Finally, it advises choosing the appropriate technology based on project requirements rather than following trends.

Microservicesbackend developmentRPCDubbogRPChttpThrift
Top Architect
Written by

Top Architect

Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.