Backend Development 9 min read

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

This article explains the fundamental differences between RPC and HTTP services, covering OSI layers, RPC architecture, synchronous and asynchronous calls, and popular RPC frameworks such as gRPC, Thrift, and Dubbo, while also comparing their suitability for large‑scale versus small‑scale applications.

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

Many developers are unclear about the distinction between RPC (Remote Procedure Call) and HTTP calls; this article clarifies their differences by first reviewing the OSI seven‑layer model (often simplified to five layers) and emphasizing the roles of the application and transport layers.

The OSI model consists of Application, Presentation, Session, Transport, Network, Data Link, and Physical layers; in practice, Presentation and Session are merged with Application, leaving Application and Transport as the key layers for understanding why RPC can be more efficient than HTTP.

RPC Services

RPC architecture includes four core components: Client, Server, Client Stub, and Server Stub. The client initiates requests, the client stub packages parameters and sends them over the network, the server stub receives and unpacks the request, and the server executes the actual service.

Client: the caller of the service.

Server: the provider of the service.

Client Stub: holds server address information and packages request data.

Server Stub: unpacks received data and invokes local methods.

RPC is favored in large enterprises due to its efficiency, especially when using Maven for project management and packaging interfaces into JAR files to reduce client size and improve decoupling.

Synchronous vs Asynchronous Calls

Synchronous calls block the client until a response is returned, while asynchronous calls allow the client to continue processing and receive results later via callbacks or futures, similar to Java's Callable and Runnable interfaces.

Popular RPC Frameworks

gRPC: Google’s open‑source framework built on HTTP/2, supporting multiple languages and using Netty under the hood.

Thrift: Facebook’s cross‑language service framework with an IDL and code generator.

Dubbo: Alibaba’s widely used Java RPC framework with pluggable protocols and serialization, integrated with Spring.

HTTP Services

HTTP (often RESTful) is simple and suitable for small projects or low‑traffic scenarios, using standard request methods and returning JSON or XML payloads.

However, for large enterprises with many internal systems, RPC offers advantages such as persistent connections (reducing handshake overhead), built‑in service registries, monitoring, and dynamic scaling.

Conclusion

RPC services are generally better for large‑scale, performance‑critical applications, while HTTP services excel in rapid development and smaller projects; the choice should be based on a thorough evaluation of project requirements rather than trends.

Backend DevelopmentRPCDubbogRPChttpNetwork ProtocolsThrift
Architecture Digest
Written by

Architecture Digest

Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.

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.